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/object/videolist.php | 168 +++++++++++++++++-------------------- 1 file changed, 79 insertions(+), 89 deletions(-) (limited to 'views/default/object/videolist.php') diff --git a/views/default/object/videolist.php b/views/default/object/videolist.php index 23754a899..b3c070495 100644 --- a/views/default/object/videolist.php +++ b/views/default/object/videolist.php @@ -1,91 +1,81 @@ - /* YouTube/vimeo/metacafe video Object file - /* @copyright Prateek.Choudhary - /*****************************************************************************************/ - - global $CONFIG; - - $video_file = $vars['entity']; - - if(!empty($video_file)) - { - $url = $video_file->url; - $title = $video_file->title; - $video_guid = $video_file->guid; - $video_id = $video_file->video_id; - $videotype = $video_file->videotype; - $videothumbnail = $video_file->thumbnail; - $owner = $vars['entity']->getOwnerEntity(); - $friendlytime = friendly_time($vars['entity']->time_created); - - $mime = "image/html"; - $thumbnail = $videothumbnail; - $watch_URL = $vars['url']."pg/videolist/watch/".$video_guid; - if (get_input('search_viewtype') == "gallery") - { - $videodiv .= ""; - $videodiv .= "
"; - print $videodiv; - } - else if(get_input('show_viewtype') == "all") - { - $info .= '

'.$title.'

'; - $info .= "

username}\">{$owner->name} {$friendlytime}"; - $info .= "

"; - $icon = "" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . ""; - - echo elgg_view_listing($icon, $info); - } - else - { - /* - $videodiv .= ""; - $videodiv .= "unable to fetch image"; - $videodiv .= "   Title : ".$title; - $videodiv .= "
"; - */ - //video list-entity view - $info = '

'.$title.'

'; - $info .= "

username}\">{$owner->name} {$friendlytime}"; - $info .= "

"; - $icon = "" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . ""; - - echo elgg_view_listing($icon, $info); - } - - +/***************************************************************************************** +/* youtube video pluggin +/* @author : Prateek Choudhary +/* YouTube/vimeo/metacafe video Object file +/* @copyright Prateek.Choudhary +/*****************************************************************************************/ + +global $CONFIG; + +$video_file = $vars['entity']; + +if(!empty($video_file)) { + $url = $video_file->url; + $title = $video_file->title; + $video_guid = $video_file->guid; + $video_id = $video_file->video_id; + $videotype = $video_file->videotype; + $videothumbnail = $video_file->thumbnail; + $owner = $vars['entity']->getOwnerEntity(); + $friendlytime = friendly_time($vars['entity']->time_created); + + $mime = "image/html"; + $thumbnail = $videothumbnail; + $watch_URL = $vars['url']."pg/videolist/watch/".$video_guid; + if (get_input('search_viewtype') == "gallery") { + $videodiv .= ""; + $videodiv .= "
"; + print $videodiv; + } else if(get_input('show_viewtype') == "all") { + $info .= '

'.$title.'

'; + $info .= "

username}\">{$owner->name} {$friendlytime}"; + $info .= "

"; + $icon = "" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . ""; + + echo elgg_view_listing($icon, $info); + } else { + /* + $videodiv .= ""; + $videodiv .= "unable to fetch image"; + $videodiv .= "   Title : ".$title; + $videodiv .= "
"; + */ + //video list-entity view + $info = '

'.$title.'

'; + $info .= "

username}\">{$owner->name} {$friendlytime}"; + $info .= "

"; + $icon = "" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . ""; + + echo elgg_view_listing($icon, $info); } - else - { - echo "No videos were found."; - } -?> +} else { + echo "No videos were found."; +} \ No newline at end of file -- cgit v1.2.3