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. --- watch.php | 76 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'watch.php') diff --git a/watch.php b/watch.php index 982bb8851..20c39f527 100644 --- a/watch.php +++ b/watch.php @@ -1,44 +1,44 @@ - * @copyright Prateek Choudhary - */ +/** + * Elgg Video Plugin + * This plugin allows users to create a library of youtube/vimeo/metacafe videos + * + * @package Elgg + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Prateek Choudhary + * @copyright Prateek Choudhary + */ + require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); +// Get objects +$video_id = (int) get_input('video_id'); - // Get objects - $video_id = (int) get_input('video_id'); - - // If we can get out the video corresponding to video_id object ... - if ($videos = get_entity($video_id)) { - set_page_owner($videos->container_guid); - $videos_container = get_entity($videos->container_guid); - if($videos_container->type == "group") - set_context("groupsvideos"); - $page_owner = page_owner_entity(); - $title = sprintf(elgg_echo("videolist:home"),page_owner_entity()->name); - // Display it - $area2 = elgg_view("object/watch",array( - 'entity' => $video_id, - 'entity_owner' => $page_owner, - 'full' => true - )); - //$area2 .= elgg_view("videolist/comments", array('entity' => $videos)); - $body = elgg_view_layout("one_column_with_sidebar", $area1 . $area2); - } - else - { - // Display the 'post not found' page instead - $body = elgg_view("videolist/notfound"); - $title = elgg_echo("video:none"); - +// If we can get out the video corresponding to video_id object ... +if ($videos = get_entity($video_id)) { + set_page_owner($videos->container_guid); + $videos_container = get_entity($videos->container_guid); + + if($videos_container->type == "group") { + set_context("groupsvideos"); } - // Finally draw the page - page_draw($title, $body); -?> + $page_owner = page_owner_entity(); + $title = sprintf(elgg_echo("videolist:home"),page_owner_entity()->name); + // Display it + $area2 = elgg_view("object/watch",array( + 'entity' => $video_id, + 'entity_owner' => $page_owner, + 'full' => true + )); + //$area2 .= elgg_view("videolist/comments", array('entity' => $videos)); + $body = elgg_view_layout("one_column_with_sidebar", $area1 . $area2); +} else { + // Display the 'post not found' page instead + $body = elgg_view("videolist/notfound"); + $title = elgg_echo("video:none"); + +} + +// Finally draw the page +page_draw($title, $body); -- cgit v1.2.3