From f29b327342068543b8a2a3f0f487953468f3c9a5 Mon Sep 17 00:00:00 2001
From: brettp
Date: Fri, 16 Apr 2010 01:21:32 +0000
Subject: Added more video sources. Allowing the . character in keywords.
git-svn-id: http://code.elgg.org/elgg/trunk@5759 36083f99-b078-4883-b0ff-0f9b5a30f544
---
mod/ecml/start.php | 16 +++++++++--
mod/ecml/views/default/ecml/keywords/blip.tv.php | 23 ++++++++++++++++
.../views/default/ecml/keywords/dailymotion.php | 31 ++++++++++++++++++++++
mod/ecml/views/default/ecml/keywords/livevideo.php | 28 +++++++++++++++++++
mod/ecml/views/default/ecml/keywords/redlasso.php | 27 +++++++++++++++++++
5 files changed, 123 insertions(+), 2 deletions(-)
create mode 100644 mod/ecml/views/default/ecml/keywords/blip.tv.php
create mode 100644 mod/ecml/views/default/ecml/keywords/dailymotion.php
create mode 100644 mod/ecml/views/default/ecml/keywords/livevideo.php
create mode 100644 mod/ecml/views/default/ecml/keywords/redlasso.php
(limited to 'mod')
diff --git a/mod/ecml/start.php b/mod/ecml/start.php
index 983894511..287bdc730 100644
--- a/mod/ecml/start.php
+++ b/mod/ecml/start.php
@@ -120,7 +120,7 @@ function ecml_parse_view($hook, $entity_type, $return_value, $params) {
// give me everything that is not a ], possibly followed by a :, and surrounded by [[ ]]s
//$keyword_regex = '/\[\[([a-z0-9_]+):?([^\]]+)?\]\]/';
- $keyword_regex = '/\[\[([a-z0-9]+)([^\]]+)?\]\]/';
+ $keyword_regex = '/\[\[([a-z0-9\.]+)([^\]]+)?\]\]/';
$CONFIG->ecml_current_view = $params['view'];
$return_value = preg_replace_callback($keyword_regex, 'ecml_parse_view_match', $return_value);
@@ -140,7 +140,19 @@ function ecml_parse_view($hook, $entity_type, $return_value, $params) {
function ecml_keyword_hook($hook, $type, $value, $params) {
// I keep going back and forth about entity and view. They're powerful, but
// a great way to let a site get hacked if the admin doesn't lock them down.
- $keywords = array('entity', 'view', 'youtube', 'slideshare', 'vimeo', 'googlemaps');
+ $keywords = array(
+ 'entity',
+ 'view',
+ 'youtube',
+ 'slideshare',
+ 'vimeo',
+ 'googlemaps',
+ 'scribd',
+ 'blip.tv',
+ 'dailymotion',
+ 'livevideo',
+ 'redlasso'
+ );
foreach ($keywords as $keyword) {
$value[$keyword] = array(
diff --git a/mod/ecml/views/default/ecml/keywords/blip.tv.php b/mod/ecml/views/default/ecml/keywords/blip.tv.php
new file mode 100644
index 000000000..44e14059c
--- /dev/null
+++ b/mod/ecml/views/default/ecml/keywords/blip.tv.php
@@ -0,0 +1,23 @@
+ 'embed'));
+ $link_href = elgg_http_add_url_query_elements($src, array('source' => 'embed'));
+
+ echo "
+
+";
+}
\ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/keywords/dailymotion.php b/mod/ecml/views/default/ecml/keywords/dailymotion.php
new file mode 100644
index 000000000..1c97792eb
--- /dev/null
+++ b/mod/ecml/views/default/ecml/keywords/dailymotion.php
@@ -0,0 +1,31 @@
+
+
+
+";
+}
\ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/keywords/livevideo.php b/mod/ecml/views/default/ecml/keywords/livevideo.php
new file mode 100644
index 000000000..b067b1ab6
--- /dev/null
+++ b/mod/ecml/views/default/ecml/keywords/livevideo.php
@@ -0,0 +1,28 @@
+
+
+
+";
+}
\ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/keywords/redlasso.php b/mod/ecml/views/default/ecml/keywords/redlasso.php
new file mode 100644
index 000000000..e36a4a92a
--- /dev/null
+++ b/mod/ecml/views/default/ecml/keywords/redlasso.php
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+";
+}
\ No newline at end of file
--
cgit v1.2.3