diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-26 11:55:03 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-26 11:55:03 +0000 |
commit | 68803264c6476fd96311bc83937f04164348cce4 (patch) | |
tree | 3e88f86684643cd2e05fcf1b0cc6add400bf1831 /mod/ecml/views/default/ecml | |
parent | 49d3c5b5f577b1120f75b11e90849f597747f71b (diff) | |
download | elgg-68803264c6476fd96311bc83937f04164348cce4.tar.gz elgg-68803264c6476fd96311bc83937f04164348cce4.tar.bz2 |
moving ecml to plugins repository as it won't be a part of 1.8.0. It will be back though...
git-svn-id: http://code.elgg.org/elgg/trunk@7938 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/ecml/views/default/ecml')
22 files changed, 0 insertions, 610 deletions
diff --git a/mod/ecml/views/default/ecml/admin/css.php b/mod/ecml/views/default/ecml/admin/css.php deleted file mode 100644 index 0b018733a..000000000 --- a/mod/ecml/views/default/ecml/admin/css.php +++ /dev/null @@ -1,156 +0,0 @@ -<?php -/** -* ECML CSS -*/ -?> - -.ecml_admin_table { - width:100%; -} -.ecml_admin_table td, th { - border: 1px solid gray; - text-align: center; - padding: 5px; -} -.ecml_admin_table th, .ecml_keyword_desc { - font-weight: bold; -} -.ecml_row_odd { - background-color: #EEE; -} -.ecml_row_even { - -} -.ecml_restricted { - color: #555; -} - - -/* ecml embed web services list */ -.ecml_web_service_list { - margin:0; - padding:0; -} -.ecml_web_service_list li { - list-style: none; - margin:0 0 0 0; - padding:0; - /* display:inline; */ - -} -.ecml_web_service_list li a { - display:block; - float:left; - height:41px; - width:152px; - background-position: center center; - background-repeat: no-repeat; - text-indent: -900em; - border:2px solid transparent; - margin:0 20px 10px 0; -} -.ecml_web_service_list li a.selected { - border-color:#999999; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; -} -.ecml_web_service_list li a.youtube { - background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_youtube.gif); - width:102px; -} -.ecml_web_service_list li a.slideshare { - background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_slideshare.gif); -} -.ecml_web_service_list li a.vimeo { - background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_vimeo.gif); - width:130px; -} -.ecml_web_service_list li a.googlemaps { - background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_googlemaps.gif); -} -.ecml_web_service_list li a.blip_tv { - background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_bliptv.gif); - width:102px; -} -.ecml_web_service_list li a.dailymotion { - background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_dailymotion.gif); -} -.ecml_web_service_list li a.livevideo { - background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_livevideo.gif); - width:166px; -} -.ecml_web_service_list li a.redlasso { - background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_redlasso.gif); - background-position:center 4px; - width:130px; -} - -.embed_content_section { - border:none; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - background-color:#EEEEEE; - margin:10px 0 10px 0; - padding:5px; - width:auto; -} -.ecml_generated_code { - color:#666666; - font-size:85%; - font-style:normal; - line-height: 1.3em; - margin:5px 0; -} -.ecml_embed_instructions, -.ecml_embed_preview { - background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png); - background-repeat: no-repeat; - background-position: 0px -367px; - padding-left: 12px; -} -.ecml_embed_instructions.open, -.ecml_embed_preview.open { - background-position: 0px -388px; -} -#embed_service_url { - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - background-color:#EEEEEE; - margin:10px 0 10px 0; - padding:5px; - width:auto; -} -#web_services_resource { - width:670px; -} -#url_status { - width:30px; - height:30px; - float:right; -} -#url_status.success { - background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/url_status.png); - background-repeat: no-repeat; - background-position: left top; -} -#url_status.failure { - background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/url_status.png); - background-repeat: no-repeat; - background-position: left bottom; -} -#embed_ecml_keyword_help, -#ecml_preview { - padding:10px; -} -#ecml_preview object, -#ecml_preview embed, -#ecml_preview iframe { - width: auto; - max-height:240px; -} -#embed_submit { - margin:10px 0 0 0; -} - - - diff --git a/mod/ecml/views/default/ecml/help.php b/mod/ecml/views/default/ecml/help.php deleted file mode 100644 index 4fca93a2a..000000000 --- a/mod/ecml/views/default/ecml/help.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Lists available keywords - * - * @package ECML - */ - -$keywords = $vars['config']->ecml_keywords; -$title = elgg_echo('ecml:keywords_title'); -$instructions = elgg_echo('ecml:keywords_instructions'); -$more_info = elgg_echo('ecml:keywords_instructions_more'); - -$keywords_html = ''; -foreach ($keywords as $keyword => $info) { - $desc = htmlentities($info['description']); - $keywords_html .= " -<dt>[$keyword]</dt> -<dd>$desc</dd>"; -} - -echo " -<h3>$title</h3> -<p>$instructions</p> -$more_info -<dl> - $keywords_html -</dl> -";
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/blip.tv.php b/mod/ecml/views/default/ecml/help/blip.tv.php deleted file mode 100644 index bac4c99c3..000000000 --- a/mod/ecml/views/default/ecml/help/blip.tv.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/** - * ECML help for blip.tv - */ - -echo '<h3>' . elgg_echo('ecml:keywords:blip.tv') . '</h3>'; -echo '<p>' . elgg_echo('ecml:keywords:blip.tv:desc') . '</p>'; -echo '<p>' . elgg_echo('ecml:keywords:blip.tv:usage') . '</p>'; - -?> - -<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/blip.tv.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/dailymotion.php b/mod/ecml/views/default/ecml/help/dailymotion.php deleted file mode 100644 index 80efa91e7..000000000 --- a/mod/ecml/views/default/ecml/help/dailymotion.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/** - * ECML help for dailymotion - */ - -echo '<h3>' . elgg_echo('ecml:keywords:dailymotion') . '</h3>'; -echo '<p>' . elgg_echo('ecml:keywords:dailymotion:desc') . '</p>'; -echo '<p>' . elgg_echo('ecml:keywords:dailymotion:usage') . '</p>'; - -?> - -<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/dailymotion.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/googlemaps.php b/mod/ecml/views/default/ecml/help/googlemaps.php deleted file mode 100644 index d55c351fb..000000000 --- a/mod/ecml/views/default/ecml/help/googlemaps.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/** - * ECML help for googlemaps - */ - -echo '<h3>' . elgg_echo('ecml:keywords:googlemaps') . '</h3>'; -echo '<p>' . elgg_echo('ecml:keywords:googlemaps:desc') . '</p>'; -echo '<p>' . elgg_echo('ecml:keywords:googlemaps:usage') . '</p>'; - -?> - -<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/googlemaps.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/livevideo.php b/mod/ecml/views/default/ecml/help/livevideo.php deleted file mode 100644 index 1343a34da..000000000 --- a/mod/ecml/views/default/ecml/help/livevideo.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/** - * ECML help for livevideo - */ - -echo '<h3>' . elgg_echo('ecml:keywords:livevideo') . '</h3>'; -echo '<p>' . elgg_echo('ecml:keywords:livevideo:desc') . '</p>'; -echo '<p>' . elgg_echo('ecml:keywords:livevideo:usage') . '</p>'; - -?> - -<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/livevideo.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/redlasso.php b/mod/ecml/views/default/ecml/help/redlasso.php deleted file mode 100644 index 07b497913..000000000 --- a/mod/ecml/views/default/ecml/help/redlasso.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * ECML help for redlasso - */ - -echo '<h3>' . elgg_echo('ecml:keywords:redlasso') . '</h3>'; -echo '<p>' . elgg_echo('ecml:keywords:redlasso:desc') . '</p>'; -echo '<p>' . elgg_echo('ecml:keywords:redlasso:usage') . '</p>'; - -?> - -<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/redlasso_1.png" /> -<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/redlasso_2.png" /> diff --git a/mod/ecml/views/default/ecml/help/slideshare.php b/mod/ecml/views/default/ecml/help/slideshare.php deleted file mode 100644 index 45ada4b54..000000000 --- a/mod/ecml/views/default/ecml/help/slideshare.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/** - * ECML help for youtube - */ - -echo '<h3>' . elgg_echo('ecml:keywords:slideshare') . '</h3>'; -echo '<p>' . elgg_echo('ecml:keywords:slideshare:desc') . '</p>'; -echo '<p>' . elgg_echo('ecml:keywords:slideshare:usage') . '</p>'; - -?> - -<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/slideshare.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/vimeo.php b/mod/ecml/views/default/ecml/help/vimeo.php deleted file mode 100644 index e5f6ae28a..000000000 --- a/mod/ecml/views/default/ecml/help/vimeo.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/** - * ECML help for vimeo - */ - -echo '<h3>' . elgg_echo('ecml:keywords:vimeo') . '</h3>'; -echo '<p>' . elgg_echo('ecml:keywords:vimeo:desc') . '</p>'; -echo '<p>' . elgg_echo('ecml:keywords:vimeo:usage') . '</p>'; - -?> - -<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/vimeo.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/youtube.php b/mod/ecml/views/default/ecml/help/youtube.php deleted file mode 100644 index 53be4a3c0..000000000 --- a/mod/ecml/views/default/ecml/help/youtube.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/** - * ECML help for youtube - */ - -echo '<h3>' . elgg_echo('ecml:keywords:youtube') . '</h3>'; -echo '<p>' . elgg_echo('ecml:keywords:youtube:desc') . '</p>'; -echo '<p>' . elgg_echo('ecml:keywords:youtube:usage') . '</p>'; - -?> - -<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/youtube.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/input_ext.php b/mod/ecml/views/default/ecml/input_ext.php deleted file mode 100644 index d5da6dd13..000000000 --- a/mod/ecml/views/default/ecml/input_ext.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * Displays an ECML icon on ECML-enabled forms - * - * @package ECML - */ - -$docs_href = elgg_get_site_url()."pg/ecml"; -?> -<a href="<?php echo $docs_href; ?>" class="elgg-longtext-control" title="<?php echo elgg_echo('ecml:help'); ?>" target="_new"><img src="<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/ecml.png" width="50" height="15" alt="ECML" /></a>
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/keyword_help.php b/mod/ecml/views/default/ecml/keyword_help.php deleted file mode 100644 index 6f9021fdd..000000000 --- a/mod/ecml/views/default/ecml/keyword_help.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php -/** - * Specific keyword help. - * - * Looks for a view ecml/help/keyword - * - */ - -$keyword = elgg_get_array_value('keyword', $vars); -$content = elgg_view("ecml/help/$keyword"); - -if (!$keyword || !ecml_is_valid_keyword($keyword)) { - echo elgg_echo('ecml:help:invalid_keyword'); -} elseif (!$content) { - echo elgg_echo('ecml:help:no_help'); -} else { - echo $content; -}
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/keywords/blip.tv.php b/mod/ecml/views/default/ecml/keywords/blip.tv.php deleted file mode 100644 index 453026533..000000000 --- a/mod/ecml/views/default/ecml/keywords/blip.tv.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -/** - * ECML Blip.tv support - * - * @package ECML - */ - -$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 deleted file mode 100644 index 4060d6117..000000000 --- a/mod/ecml/views/default/ecml/keywords/dailymotion.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * ECML Daily Motion support - * - * @package ECML - */ - -$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/entity.php b/mod/ecml/views/default/ecml/keywords/entity.php deleted file mode 100644 index 73491f6a3..000000000 --- a/mod/ecml/views/default/ecml/keywords/entity.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * ECML Generic Object GUID - * - * @package ECML - */ - -$guid = $vars['guid']; - -if ($entity = get_entity($guid)) { - echo elgg_view('output/url', array( - 'href' => $entity->getURL(), - 'title' => $entity->title, - 'text' => $entity->title, - 'class' => "embeded_file link", - // abusing the js attribute - 'js' => "style=\"background-image:url({$entity->getIcon('tiny')})\"" - - )); -} else { - echo elgg_echo('ecml:entity:invalid'); -}
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/keywords/googlemaps.php b/mod/ecml/views/default/ecml/keywords/googlemaps.php deleted file mode 100644 index 2e13f9f43..000000000 --- a/mod/ecml/views/default/ecml/keywords/googlemaps.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * ECML Google Maps support - * - * @package ECML - */ - -$src = (isset($vars['src'])) ? $vars['src'] : FALSE; -$width = (isset($vars['width'])) ? $vars['width'] : 425; -$height = (isset($vars['height'])) ? $vars['height'] : 350; - -if ($src) { - $src = html_entity_decode($src); - - $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 " -<iframe width=\"$width\" height=\"$height\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"$embed_src\"></iframe> -<br /> -<small><a href=\"$link_href\" style=\"color:#0000FF;text-align:left\">" . elgg_echo('ecml:googlemaps:view_larger_map') . "</a></small> -"; -}
\ 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 deleted file mode 100644 index b445f4575..000000000 --- a/mod/ecml/views/default/ecml/keywords/livevideo.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * ECML Live Video support - * - * @package ECML - */ - -$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[0]; - - // 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 deleted file mode 100644 index 462865bec..000000000 --- a/mod/ecml/views/default/ecml/keywords/redlasso.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * ECML Red Lasso support - * - * @package ECML - */ - -$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 diff --git a/mod/ecml/views/default/ecml/keywords/slideshare.php b/mod/ecml/views/default/ecml/keywords/slideshare.php deleted file mode 100644 index 34db6aed5..000000000 --- a/mod/ecml/views/default/ecml/keywords/slideshare.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/** - * ECML Slideshare support - * - * @package ECML - */ - -// this wants the "wordpress.com" embed code. -// to make life easier on users, don't require them to add the "s -// and just chop out the id= bit here from the full attr list - -$id = str_replace('id=', '', $vars['ecml_params_string']); -$width = (isset($vars['width'])) ? $vars['width'] : 450; -$height = (isset($vars['height'])) ? $vars['height'] : 369; - -if ($id) { - // @todo need to check if the & should be encoded. - - $slide_url = "http://static.slideshare.net/swf/ssplayer2.swf?id=$id"; - - echo " -<object type=\"application/x-shockwave-flash\" wmode=\"opaque\" data=\"$slide_url\" width=\"$width\" height=\"$height\"> - <param name=\"movie\" value=\"$slide_url\" /> - <param name=\"allowFullScreen\" value=\"true\" /> - <param name=\"allowScriptAccess\" value=\"always\" /> - - <embed src=\"$slide_url\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"$width\" height=\"$height\"></embed> -</object> -"; -}
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/keywords/user_list.php b/mod/ecml/views/default/ecml/keywords/user_list.php deleted file mode 100644 index b1c398e2e..000000000 --- a/mod/ecml/views/default/ecml/keywords/user_list.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -/** - * Lists users - * - * @package SitePages - */ - -$only_with_avatars = (isset($vars['only_with_avatars'])) ? $vars['only_with_avatars'] : TRUE; -$list_type = (isset($vars['list_type'])) ? $vars['list_type'] : 'newest'; -$limit = (isset($vars['limit'])) ? $vars['limit'] : 10; - -$options = array( - 'type' => 'user', - 'limit' => $limit -); - -if ($only_with_avatars == TRUE) { - $options['metadata_name_value_pairs'] = array('name' => 'icontime', 'operand' => '!=', 'value' => 0); -} - -switch ($list_type) { - case 'newest': - $options['order_by'] = 'e.time_created DESC'; - break; - - case 'online': - // show people with a last action of < 10 minutes. - $last_action = time() - 10 * 60; - $options['joins'] = array("JOIN {$vars['config']->dbprefix}users_entity ue on ue.guid = e.guid"); - $options['wheres'] = array("ue.last_action > $last_action"); - break; - - case 'random': - $options['order_by'] = 'RAND()'; - break; - - default: - break; -} - -$users = elgg_get_entities_from_metadata($options); - -echo elgg_view_entity_list($users, count($users), 0, $limit, FALSE, FALSE, FALSE);
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/keywords/vimeo.php b/mod/ecml/views/default/ecml/keywords/vimeo.php deleted file mode 100644 index 263eb3740..000000000 --- a/mod/ecml/views/default/ecml/keywords/vimeo.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -/** - * ECML vimeo support - * - * @package ECML - */ - -$src = (isset($vars['src'])) ? $vars['src'] : FALSE; -$width = (isset($vars['width'])) ? $vars['width'] : 480; -$height = (isset($vars['height'])) ? $vars['height'] : 385; - -// need to extract the video id. -// the src arg can take a full url or an id. -// assume if no youtube.com that it's an id. -if (strpos($src, 'vimeo.com') === FALSE) { - $vid = $src; -} else { - // we love vimeo. - list($address, $vid) = explode('vimeo.com/', $src); -} - -if ($vid) { - $movie_url = "http://vimeo.com/moogaloop.swf?"; - $query = array('clip_id' => $vid, 'server' => 'vimeo.com'); - - $params = array( - 'show_title' => 1, - 'show_byline' => 1, - 'show_portrait' => 0, - 'color' => '', - 'fullscreen' => 1 - ); - - foreach ($params as $param => $default) { - $query[$param] = (isset($vars[$param])) ? $vars[$param] : $default; - } - - $query_str = http_build_query($query); - $movie_url .= $query_str; - - echo " -<object width=\"$width\" height=\"$height\"> - <param name=\"allowfullscreen\" value=\"true\" /> - <param name=\"allowscriptaccess\" value=\"always\" /> - <param name=\"movie\" value=\"$movie_url\" /> - <embed src=\"$movie_url\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\"> - </embed> -</object> - "; -}
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/keywords/youtube.php b/mod/ecml/views/default/ecml/keywords/youtube.php deleted file mode 100644 index c212f6841..000000000 --- a/mod/ecml/views/default/ecml/keywords/youtube.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -/** - * ECML Youtube support - * - * @package ECML - */ - -$src = (isset($vars['src'])) ? $vars['src'] : FALSE; -$width = (isset($vars['width'])) ? $vars['width'] : 480; -$height = (isset($vars['height'])) ? $vars['height'] : 385; - -// need to extract the video id. -// the src arg can take a full url or an id. -// assume if no youtube.com that it's an id. -if (strpos($src, 'youtube.com') === FALSE) { - $vid = $src; -} else { - // grab the v param - if ($parts = parse_url($src)) { - if (isset($parts['query'])) { - parse_str($parts['query'], $query_arr); - $vid = (isset($query_arr['v'])) ? $query_arr['v'] : FALSE; - } - } -} - -if ($vid) { - $movie_url = "http://www.youtube.com/v/$vid"; - - echo " -<object width=\"$width\" height=\"$height\"> - <param name=\"movie\" value=\"$movie_url\"></param> - <param name=\"allowFullScreen\" value=\"true\"></param> - <param name=\"allowscriptaccess\" value=\"always\"></param> - - <embed src=\"$movie_url\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"$width\" height=\"$height\"></embed> -</object> - "; -}
\ No newline at end of file |