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/watch.php | 59 +++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 32 deletions(-) (limited to 'views/default/object/watch.php') diff --git a/views/default/object/watch.php b/views/default/object/watch.php index 9b3de9626..66fde240f 100644 --- a/views/default/object/watch.php +++ b/views/default/object/watch.php @@ -1,8 +1,8 @@ @@ -12,34 +12,29 @@ $videodiv = ''; $width = "600"; $height = "400"; $file = $vars['entity']; -if(isset($vars['entity'])) -{ +if(isset($vars['entity'])) { + $videos = get_entity($vars['entity']); + $title = $videos->title; + $url = $videos->url; + $videoid = $videos->video_id; + $videodiv = "

".$title."

"; + if ($videos->videotype == "youtube") { + $videodiv .= "
"; + } else if($videos->videotype == "metacafe"){ + $videoid_id = $videoid; + $path = explode("/", $videos->thumbnail); + $path = array_reverse($path); + $thumbnailArray = explode(".", $path[0]); + $videoid = $videoid_id."/".$thumbnailArray[0].".swf"; + $videodiv .= "
"; + } else if($videos->videotype == "vimeo") { + $videodiv .= "
"; + } -$videos = get_entity($vars['entity']); -$title = $videos->title; -$url = $videos->url; -$videoid = $videos->video_id; -$videodiv = "

".$title."

"; -if($videos->videotype == "youtube"){ - $videodiv .= "
"; -} -else if($videos->videotype == "metacafe"){ - $videoid_id = $videoid; - $path = explode("/", $videos->thumbnail); - $path = array_reverse($path); - $thumbnailArray = explode(".", $path[0]); - $videoid = $videoid_id."/".$thumbnailArray[0].".swf"; - $videodiv .= "
"; + $videodiv .= "
"; + $videodiv .= elgg_view_likes($videos); + $videodiv .= elgg_view_comments($videos); + print $videodiv; -} -else if($videos->videotype == "vimeo"){ - $videodiv .= "
"; -} -$videodiv .= "
"; -$videodiv .= elgg_view_likes($videos); -$videodiv .= elgg_view_comments($videos); -print $videodiv; - -//echo elgg_view_comments($videos); -} -?> + //echo elgg_view_comments($videos); +} \ No newline at end of file -- cgit v1.2.3