From a161b38e65fa698133402f4fb23548242f494018 Mon Sep 17 00:00:00 2001 From: Dave Tosh Date: Tue, 23 Mar 2010 17:30:14 +0000 Subject: This videolist plugin shows real promise so we shall work on it for v1.8 then release it back to the community. --- views/default/widgets/videolist_view/view.php | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 views/default/widgets/videolist_view/view.php (limited to 'views/default/widgets/videolist_view/view.php') diff --git a/views/default/widgets/videolist_view/view.php b/views/default/widgets/videolist_view/view.php new file mode 100644 index 000000000..889ee5726 --- /dev/null +++ b/views/default/widgets/videolist_view/view.php @@ -0,0 +1,58 @@ + + * @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"); + } + +?> -- cgit v1.2.3