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/forms/browsetube.php | 355 ++++++++++++++++++------------------- 1 file changed, 177 insertions(+), 178 deletions(-) (limited to 'views/default/forms/browsetube.php') diff --git a/views/default/forms/browsetube.php b/views/default/forms/browsetube.php index 601fb4e6a..0a54f0d10 100644 --- a/views/default/forms/browsetube.php +++ b/views/default/forms/browsetube.php @@ -1,106 +1,105 @@ - * @copyright Prateek Choudhary - */ +/** + * Elgg Video Plugin + * This plugin allows users to create a library of youtube/vimeo/metacafe videos + * @file - load the browse view + * @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 + */ $getcontainer_guid = get_input("container"); $container_guid = explode(":", $getcontainer_guid); if($container_guid[0] == "group"){ $container = $container_guid[1]; -} -else{ +} else{ $container = $getcontainer_guid; } - $error = array( - 'no-search' => 1 - ); - $error_msg = array( - 'no-search' => "Please enter a valid search term" - ); - $browseCat = get_input('q'); - if(empty($browseCat) || !isset($browseCat)) - $browseCat = "youtube"; - $confirm_action = get_input('video_action'); - - if(isset($confirm_action) && ($confirm_action == 'search_video')) - { - if(isset($title_search) && ($title_search != '')) - $error['no-search'] = 0; - else - $error['no-search'] = 1; - } +$error = array( + 'no-search' => 1 + ); +$error_msg = array( + 'no-search' => "Please enter a valid search term" + ); +$browseCat = get_input('q'); +if(empty($browseCat) || !isset($browseCat)) { + $browseCat = "youtube"; +} + +$confirm_action = get_input('video_action'); + +if(isset($confirm_action) && ($confirm_action == 'search_video')) { + if(isset($title_search) && ($title_search != '')) { + $error['no-search'] = 0; + } else { + $error['no-search'] = 1; + } +} + +//$body = '
'; +//Load youtube menu +$body .= "
"; +$body .= "
    "; +$body .= "
  • "; +$body .= "YouTube"; +$body .= "
  • "; +$body .= "
  • "; +$body .= "Metacafe"; +$body .= "
  • "; +$body .= "
  • "; +$body .= "Vimeo"; +$body .= "
  • "; +/* +$body .= "
  • "; +$body .= "Google Videos"; +$body .= "
  • "; +*/ +$body .= "
"; +$body .= "
"; + +$body .= "
"; + +//$body .= "
"; +$body .= '
'; +//$body .= ""; +$body .= elgg_view('input/hidden',array('internalname'=>'video_action', 'value'=>'search_video')); +$body .= elgg_view('input/hidden',array('internalname'=>'guid', 'value'=>$vars['guid'])); +//$body .= elgg_view('input/hidden',array('internalname'=>'start_index', 'value'=>1)); + +switch($browseCat) { + case "youtube" : + $body .= elgg_view('forms/labels/youtube'); + break; + case "metacafe" : + $body .= elgg_view('forms/labels/metacafe'); + break; + case "vimeo" : + $body .= elgg_view('forms/labels/vimeo'); + break; + case "googlevideos" : + $body .= elgg_view('forms/labels/googlevideos'); + break; + default : + $body .= elgg_view('forms/labels/youtube'); + break; +} +$body .= elgg_view('input/hidden',array('internalname'=>'page', 'value'=>$browseCat)); +$body .= '
'; +//$body .= '
'; +//$body .= '
'; + +$body .= '
'; +$body .= '
'; +$body .= '
'; +$body .= '
'; +$body .= '
'; +$body .= '
'; + +print $body."

"; + - - //$body = '
'; - //Load youtube menu - $body .= "
"; - $body .= "
    "; - $body .= "
  • "; - $body .= "YouTube"; - $body .= "
  • "; - $body .= "
  • "; - $body .= "Metacafe"; - $body .= "
  • "; - $body .= "
  • "; - $body .= "Vimeo"; - $body .= "
  • "; - /* - $body .= "
  • "; - $body .= "Google Videos"; - $body .= "
  • "; - */ - $body .= "
"; - $body .= "
"; - - $body .= "
"; - - //$body .= "
"; - $body .= '
'; - //$body .= ""; - $body .= elgg_view('input/hidden',array('internalname'=>'video_action', 'value'=>'search_video')); - $body .= elgg_view('input/hidden',array('internalname'=>'guid', 'value'=>$vars['guid'])); - //$body .= elgg_view('input/hidden',array('internalname'=>'start_index', 'value'=>1)); - - switch($browseCat) - { - case "youtube" : - $body .= elgg_view('forms/labels/youtube'); - break; - case "metacafe" : - $body .= elgg_view('forms/labels/metacafe'); - break; - case "vimeo" : - $body .= elgg_view('forms/labels/vimeo'); - break; - case "googlevideos" : - $body .= elgg_view('forms/labels/googlevideos'); - break; - default : - $body .= elgg_view('forms/labels/youtube'); - break; - } - $body .= elgg_view('input/hidden',array('internalname'=>'page', 'value'=>$browseCat)); - $body .= '
'; - //$body .= '
'; - //$body .= '
'; - - $body .= '
'; - $body .= '
'; - $body .= '
'; - $body .= '
'; - $body .= '
'; - $body .= '
'; - - print $body."

"; - - ?>