From 52255de580654f351205b19565be601bd4caaacb Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Fri, 26 Mar 2010 22:44:48 +0000 Subject: First pass at cleaning up videolist. --- views/default/widgets/videolist_view/edit.php | 40 +++++----- views/default/widgets/videolist_view/view.php | 108 +++++++++++++------------- 2 files changed, 76 insertions(+), 72 deletions(-) (limited to 'views/default/widgets/videolist_view') diff --git a/views/default/widgets/videolist_view/edit.php b/views/default/widgets/videolist_view/edit.php index 936d37c34..10ba89af9 100644 --- a/views/default/widgets/videolist_view/edit.php +++ b/views/default/widgets/videolist_view/edit.php @@ -1,21 +1,23 @@

- : - - num_display == '') $vars['entity']->num_display = 6; - ?> - +: + +num_display == '') { + $vars['entity']->num_display = 6; + } +?> +

diff --git a/views/default/widgets/videolist_view/view.php b/views/default/widgets/videolist_view/view.php index aac2a288b..cd2aa37a3 100644 --- a/views/default/widgets/videolist_view/view.php +++ b/views/default/widgets/videolist_view/view.php @@ -1,58 +1,60 @@ - * @copyright Prateek Choudhary - */ + * Elgg Videolist Plugin + * This plugin allows users to create a library of youtube videos + * + * @package ElggProfile + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Prateek Choudhary + * @copyright Prateek Choudhary + */ - - //the number of files to display - $number = (int) $vars['entity']->num_display; - if (!$number) - $number = 5; - - $owner = page_owner_entity(); - $owner_videos = get_entities("object", "videolist", page_owner(), $order_by="time_created desc", $limit=$number); - //echo "
"; - if ($owner_videos) { - echo '
'; - foreach($owner_videos as $videos){ - $url = $videos->url; - $title = $videos->title; - $video_id = $videos->video_id; - $videothumbnail = $videos->thumbnail; - echo '
'; - //get video cover image - echo '
'; - echo "guid."'>"; - echo ""; - echo ''; - echo '
'; - echo '
'; - echo "guid."'>"; - echo $title; - echo ''; - $numcomments = elgg_count_comments($videos); - if ($numcomments) - echo "
guid."\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")
"; - echo '
'; - echo '
'; - } - echo "
"; - echo "
"; - //get a link to the users videos - $users_video_url = $vars['url'] . "pg/videolist/owned/" . $owner->username; - echo "
"; - echo "" . elgg_echo('video:more') . ""; - echo "
"; - echo "
"; - } - else { - echo elgg_echo("album:none"); + +//the number of files to display +$number = (int) $vars['entity']->num_display; +if (!$number) { + $number = 5; +} + +$owner = page_owner_entity(); +$owner_videos = get_entities("object", "videolist", page_owner(), $order_by="time_created desc", $limit=$number); +//echo "
"; +if ($owner_videos) { + echo '
'; + foreach($owner_videos as $videos) { + $url = $videos->url; + $title = $videos->title; + $video_id = $videos->video_id; + $videothumbnail = $videos->thumbnail; + echo '
'; + //get video cover image + echo '
'; + echo "guid."'>"; + echo ""; + echo ''; + echo '
'; + echo '
'; + echo "guid."'>"; + echo $title; + echo ''; + + $numcomments = elgg_count_comments($videos); + if ($numcomments) { + echo "
guid."\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")
"; } -?> + echo '
'; + echo '
'; + } + + echo "
"; + echo "
"; + //get a link to the users videos + $users_video_url = $vars['url'] . "pg/videolist/owned/" . $owner->username; + echo "
"; + echo "" . elgg_echo('video:more') . ""; + echo "
"; + echo "
"; +} else { + echo elgg_echo("album:none"); +} \ No newline at end of file -- cgit v1.2.3