diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-16 01:21:32 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-16 01:21:32 +0000 |
commit | f29b327342068543b8a2a3f0f487953468f3c9a5 (patch) | |
tree | 75622302235ff897e3c7fa4971121580d0eb0d50 /mod/ecml/views/default | |
parent | 08441e1e99bbae49418c4b06c302f1a2057c2179 (diff) | |
download | elgg-f29b327342068543b8a2a3f0f487953468f3c9a5.tar.gz elgg-f29b327342068543b8a2a3f0f487953468f3c9a5.tar.bz2 |
Added more video sources.
Allowing the . character in keywords.
git-svn-id: http://code.elgg.org/elgg/trunk@5759 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/ecml/views/default')
-rw-r--r-- | mod/ecml/views/default/ecml/keywords/blip.tv.php | 23 | ||||
-rw-r--r-- | mod/ecml/views/default/ecml/keywords/dailymotion.php | 31 | ||||
-rw-r--r-- | mod/ecml/views/default/ecml/keywords/livevideo.php | 28 | ||||
-rw-r--r-- | mod/ecml/views/default/ecml/keywords/redlasso.php | 27 |
4 files changed, 109 insertions, 0 deletions
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 @@ +<?php +/** + * ECML Blip.tv support + * + * @package ECML + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider Ltd + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.org/ + */ + +$params = str_replace('?', '', $vars['ecml_params_string']); +$width = (isset($vars['width'])) ? $vars['width'] : 425; +$height = (isset($vars['height'])) ? $vars['height'] : 350; + +if ($params) { + $embed_src = elgg_http_add_url_query_elements($src, array('output' => 'embed')); + $link_href = elgg_http_add_url_query_elements($src, array('source' => 'embed')); + + echo " +<p><script type='text/javascript' src='http://blip.tv/syndication/write_player?skin=js&cross_post_destination=-1&view=full_js&$params'></script></p> +"; +}
\ 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 @@ +<?php +/** + * ECML Daily Motion support + * + * @package ECML + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider Ltd + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.org/ + */ + +$base_url = 'http://www.dailymotion.com/video/'; +$src = (isset($vars['src'])) ? str_replace($base_url, '', $vars['src']) : FALSE; +$width = (isset($vars['width'])) ? $vars['width'] : 480; +$height = (isset($vars['height'])) ? $vars['height'] : 270; + +if ($src) { + list($vid, $name) = explode('_', $src); + $url = "http://www.dailymotion.com/swf/video/$vid"; + + echo " + <p> + <object width=\"$width\" height=\"$height\"> + <param name=\"movie\" value=\"$url\"></param> + <param name=\"allowFullScreen\" value=\"true\"></param> + <param name=\"allowScriptAccess\" value=\"always\"></param> + <embed type=\"application/x-shockwave-flash\" src=\"$url\" width=\"$width\" height=\"$height\" allowfullscreen=\"true\" allowscriptaccess=\"always\"></embed> + </object> + </p> +"; +}
\ 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 @@ +<?php +/** + * ECML Live Video support + * + * @package ECML + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider Ltd + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.org/ + */ + +$base_url = 'http://www.livevideo.com/video/'; +$src = (isset($vars['src'])) ? str_replace($base_url, '', $vars['src']) : FALSE; +$width = (isset($vars['width'])) ? $vars['width'] : 445; +$height = (isset($vars['height'])) ? $vars['height'] : 369; + +if ($src) { + $parts = explode('/', $src); + $vid = $parts[1]; + // it automatically autostarts, but not passing it causes control issues + $url = "http://www.livevideo.com/flvplayer/embed/$vid&autoStart=1"; + + echo " + <p> + <embed src=\"$url\" type=\"application/x-shockwave-flash\" quality=\"high\" WIDTH=\"$width\" HEIGHT=\"$height\" wmode=\"transparent\"></embed> + </p> +"; +}
\ 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 @@ +<?php +/** + * ECML Red Lasso support + * + * @package ECML + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider Ltd + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.org/ + */ + +$vid = (isset($vars['id'])) ? $vars['id'] : FALSE; +$width = (isset($vars['width'])) ? $vars['width'] : 390; +$height = (isset($vars['height'])) ? $vars['height'] : 320; + +if ($vid) { + echo " +<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"$width\" height=\"$height\" id=\"Redlasso\"> + <param name=\"movie\" value=\"http://player.redlasso.com/redlasso_player_b1b_deploy.swf\" /> + <param name=\"flashvars\" value=\"embedId=$vid&pid=\" /> + <param name=\"allowScriptAccess\" value=\"always\" /> + <param name=\"allowFullScreen\" value=\"true\" /> + <embed src=\"http://player.redlasso.com/redlasso_player_b1b_deploy.swf\" flashvars=\"embedId=$vid&pid=\" width=\"$width\" height=\"$height\" type=\"application/x-shockwave-flash\" allowScriptAccess=\"always\" allowFullScreen=\"true\" name=\"Redlasso\"> + </embed> +</object> +"; +}
\ No newline at end of file |