diff options
Diffstat (limited to 'mod/ecml/views')
| -rw-r--r-- | mod/ecml/views/default/ecml/admin/css.php | 26 | ||||
| -rw-r--r-- | mod/ecml/views/default/ecml/admin/ecml_admin.php | 143 | ||||
| -rw-r--r-- | mod/ecml/views/default/ecml/help.php | 32 | ||||
| -rw-r--r-- | mod/ecml/views/default/ecml/input_ext.php | 14 | ||||
| -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/googlemaps.php | 25 | ||||
| -rw-r--r-- | mod/ecml/views/default/ecml/keywords/livevideo.php | 28 | ||||
| -rw-r--r-- | mod/ecml/views/default/ecml/keywords/redlasso.php | 27 | ||||
| -rw-r--r-- | mod/ecml/views/default/ecml/keywords/slideshare.php | 34 | ||||
| -rw-r--r-- | mod/ecml/views/default/ecml/keywords/user_list.php | 47 | ||||
| -rw-r--r-- | mod/ecml/views/default/ecml/keywords/vimeo.php | 54 | ||||
| -rw-r--r-- | mod/ecml/views/default/ecml/keywords/youtube.php | 43 |
13 files changed, 0 insertions, 527 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 e6cd7cfb2..000000000 --- a/mod/ecml/views/default/ecml/admin/css.php +++ /dev/null @@ -1,26 +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; -}
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/admin/ecml_admin.php b/mod/ecml/views/default/ecml/admin/ecml_admin.php deleted file mode 100644 index b7038b54c..000000000 --- a/mod/ecml/views/default/ecml/admin/ecml_admin.php +++ /dev/null @@ -1,143 +0,0 @@ -<?php -/** - * Configs granular access - * - * @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/ - */ - -$views = $vars['config']->ecml_parse_views; -$keywords = $vars['config']->ecml_keywords; -$perms = $vars['config']->ecml_permissions; - -ksort($views); -ksort($keywords); - -echo elgg_view_title(elgg_echo('ecml:admin')); -echo '<p class="margin_top">' . elgg_echo('ecml:admin:instruction') . '</p>'; - -// yes I'm using a table because this is table. -$form_body = <<<___END -<table class="ecml_admin_table"> - <tr> - <th> </th> -___END; - -foreach ($views as $view => $view_desc) { - $form_body .= "<th><acronym class=\"ecml_view ecml_check_all\" title=\"$view\">$view_desc</acronym></th>"; - $n++; -} -$form_body .= '</tr>'; - -$odd = 'odd'; -foreach ($keywords as $keyword => $keyword_info) { - $keyword_desc = $keyword_info['description']; - if (isset($keyword_info['restricted'])) { - $restricted = elgg_echo('ecml:admin:restricted'); - $form_body .= " - <tr class=\"ecml_row_$odd\"> - <td class=\"ecml_keyword_desc\"><acronym class=\"ecml_keyword ecml_restricted\" title=\"$keyword_desc\">$keyword ($restricted)</acronym></td> - "; - } else { - $form_body .= " - <tr class=\"ecml_row_$odd\"> - <td class=\"ecml_keyword_desc\"><acronym class=\"ecml_keyword ecml_check_all\" title=\"$keyword_desc\">$keyword</acronym></td> - "; - } - foreach ($views as $view => $view_info) { - // if this is restricted and we're not on the specified view don't allow changes - // since we don't save this, no need to pass a name - if (isset($keyword_info['restricted'])) { - $checked = (in_array($view, $keyword_info['restricted'])) ? 'checked="checked"' : ''; - $form_body .= "<td><input type=\"checkbox\" $checked name=\"whitelist[$view][]\" value=\"$keyword\" disabled=\"disabled\"/></td>"; - } else { - $checked = (!in_array($keyword, $perms[$view])) ? 'checked="checked"' : ''; - - // ooook. input/checkboxes isn't overly useful. - // do it ourself. - $form_body .= "<td><input type=\"checkbox\" name=\"whitelist[$view][]\" value=\"$keyword\" $checked /></td>"; - } - } - $form_body .= '</tr>'; - - $odd = ($odd == 'odd') ? 'even' : 'odd'; -} - -$form_body .= '</table>'; -$form_body .= elgg_view('input/submit', array('value' => elgg_echo('submit'))); -$form_body .= elgg_view('input/reset', array('value' => elgg_echo('reset'), 'class' => 'cancel_button')); - -echo elgg_view('input/form', array( - 'body' => $form_body, - 'action' => $vars['url'] . 'action/ecml/save_permissions' -)); - -?> -<script type="text/javascript"> - -$(document).ready(function() { - // append check all link - $('.ecml_check_all').before('<input type="checkbox" checked="checked" class="check_all">'); - - // determin initial state of checkall checkbox. - $('.ecml_check_all').each(function() { - var keyword = $(this).hasClass('ecml_keyword'); - var checkbox = $(this).parent().find('input[type=checkbox]'); - var checked; - - // no keywords checked, checkall unchecked - // any keyword checked, checkall unchecked - // all keywords checked, checkall checked - - // if keyword, check the TR - if (keyword) { - checked = true; - $(this).parent().parent().find('input').each(function() { - if (!$(this).hasClass('check_all') && !$(this).attr('disabled')) { - checked = (checked && $(this).attr('checked')); - // can't break... - } - }); - checkbox.attr('checked', checked); - } else { - checked = true; - var rowIndex = $(this).parent().parent().children().index($(this).parent()); - - $('.ecml_admin_table > tbody > tr td:nth-child(' + (rowIndex + 1) + ') input[type=checkbox]').each(function() { - if (!$(this).hasClass('check_all') && !$(this).attr('disabled')) { - checked = (checked && $(this).attr('checked')); - // can't break... - } - }); - checkbox.attr('checked', checked); - } - }); - - // handle checkall boxes - $('input.check_all').click(function() { - // yoinked from - // http://stackoverflow.com/questions/788225/table-row-and-column-number-in-jquery - var rowIndex = $(this).parent().parent().children().index($(this).parent()); - var check = $(this).attr('checked'); - - // clicked on a keyword on the left, check all boxes in the tr - if (rowIndex == 0) { - $(this).parent().parent().find('input').each(function() { - if (!$(this).attr('disabled')) { - $(this).attr('checked', check); - } - }); - } else { - boxes = $('.ecml_admin_table > tbody > tr td:nth-child(' + (rowIndex + 1) + ') input[type=checkbox]'); - boxes.each(function() { - if (!$(this).attr('disabled')) { - $(this).attr('checked', check); - } - }); - } - }); -}); -</script> diff --git a/mod/ecml/views/default/ecml/help.php b/mod/ecml/views/default/ecml/help.php deleted file mode 100644 index 2b33f4f7a..000000000 --- a/mod/ecml/views/default/ecml/help.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/** - * Lists available keywords - * - * @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/ - */ - -$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/input_ext.php b/mod/ecml/views/default/ecml/input_ext.php deleted file mode 100644 index 5a68f2fa8..000000000 --- a/mod/ecml/views/default/ecml/input_ext.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php -/** - * Displays an ECML icon on ECML-enabled forms - * - * @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/ - */ - -$docs_href = "{$vars['url']}pg/ecml"; -?> -<a href="<?php echo $docs_href; ?>" class="longtext_control" title="<?php echo elgg_echo('ecml:help'); ?>" target="_new"><img src="<?php echo $vars['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/keywords/blip.tv.php b/mod/ecml/views/default/ecml/keywords/blip.tv.php deleted file mode 100644 index 44e14059c..000000000 --- a/mod/ecml/views/default/ecml/keywords/blip.tv.php +++ /dev/null @@ -1,23 +0,0 @@ -<?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 deleted file mode 100644 index 1c97792eb..000000000 --- a/mod/ecml/views/default/ecml/keywords/dailymotion.php +++ /dev/null @@ -1,31 +0,0 @@ -<?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/googlemaps.php b/mod/ecml/views/default/ecml/keywords/googlemaps.php deleted file mode 100644 index 4f31a4531..000000000 --- a/mod/ecml/views/default/ecml/keywords/googlemaps.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * ECML Google Maps 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/ - */ - -$src = (isset($vars['src'])) ? $vars['src'] : FALSE; -$width = (isset($vars['width'])) ? $vars['width'] : 425; -$height = (isset($vars['height'])) ? $vars['height'] : 350; - -if ($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 b067b1ab6..000000000 --- a/mod/ecml/views/default/ecml/keywords/livevideo.php +++ /dev/null @@ -1,28 +0,0 @@ -<?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 deleted file mode 100644 index e36a4a92a..000000000 --- a/mod/ecml/views/default/ecml/keywords/redlasso.php +++ /dev/null @@ -1,27 +0,0 @@ -<?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 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 1881a1a89..000000000 --- a/mod/ecml/views/default/ecml/keywords/slideshare.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -/** - * ECML Slideshare 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/ - */ - -// 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 2f2f09c49..000000000 --- a/mod/ecml/views/default/ecml/keywords/user_list.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php -/** - * Lists users - * - * @package SitePages - * @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/ - */ - -$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 6ca1294a8..000000000 --- a/mod/ecml/views/default/ecml/keywords/vimeo.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * ECML vimeo 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/ - */ - -$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 87fb669d2..000000000 --- a/mod/ecml/views/default/ecml/keywords/youtube.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -/** - * ECML Youtube 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/ - */ - -$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 |
