aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/forms/add.php322
-rw-r--r--views/default/forms/browsetube.php355
-rw-r--r--views/default/forms/labels/googlevideos.php60
-rw-r--r--views/default/forms/labels/metacafe.php60
-rw-r--r--views/default/forms/labels/vimeo.php60
-rw-r--r--views/default/forms/labels/youtube.php60
-rw-r--r--views/default/object/videolist.php168
-rw-r--r--views/default/object/watch.php59
-rw-r--r--views/default/river/object/videolist/annotate.php18
-rw-r--r--views/default/river/object/videolist/create.php33
-rw-r--r--views/default/staticvideo/index.php34
-rw-r--r--views/default/videolist/css.php270
-rw-r--r--views/default/videolist/groupprofile_videolist.php96
-rw-r--r--views/default/videolist/icon.php41
-rw-r--r--views/default/videolist/notfound.php30
-rw-r--r--views/default/widgets/videolist_view/edit.php40
-rw-r--r--views/default/widgets/videolist_view/view.php108
17 files changed, 881 insertions, 933 deletions
diff --git a/views/default/forms/add.php b/views/default/forms/add.php
index b387731f8..f6d5ed4c2 100644
--- a/views/default/forms/add.php
+++ b/views/default/forms/add.php
@@ -1,176 +1,156 @@
<?php
- /**
- * Elgg Video Plugin
- * This plugin allows users to create a library of youtube/vimeo/metacafe videos
- * @file - the add user interface
- * @package Elgg
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
+/**
+ * Elgg Video Plugin
+ * This plugin allows users to create a library of youtube/vimeo/metacafe videos
+ * @file - the add user interface
+ * @package Elgg
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Prateek Choudhary <synapticfield@gmail.com>
+ * @copyright Prateek Choudhary
+ */
// Make sure we're logged in (send us to the front page if not)
- gatekeeper();
- $page_owner = page_owner_entity();
- $error = array(
- 'no-video' => 1
- );
- $error_msg = array(
- 'no-video' => "Please enter a valid video url"
- );
-
- $container_guid = get_input("container_guid");
- set_page_owner($container_guid);
-
- $confirm_action = get_input('video_action');
- $guid = get_input('guid');
- $access_id = get_input('access_id');
- $title_videourl = get_input('title_videourl');
- $Pagecontainer = get_input('page');
- $get_addvideourl = get_input('add_videourl');
- $timestamp = time();
- $token = generate_action_token(time());
- if(!empty($get_addvideourl) && ($Pagecontainer == "youtube"))
- $title_add_videourl = "http://www.youtube.com/watch?v=".$get_addvideourl;
- else if(!empty($get_addvideourl) && ($Pagecontainer == "metacafe"))
- $title_add_videourl = "http://www.metacafe.com/api/item/".$get_addvideourl;
- else if(!empty($get_addvideourl) && ($Pagecontainer == "vimeo"))
- $title_add_videourl = "http://vimeo.com/".$get_addvideourl;
- else
- $title_add_videourl = "";
-
-
- $tags = get_input('videolisttags');
-
- function video_youtube_parse_url($url)
- {
- if (!preg_match('/(http:\/\/)([a-zA-Z]{2,3}\.)(youtube\.com\/)(.*)/', $url, $matches))
- {
- return false;
- }
-
- $domain = $matches[2] . $matches[3];
- $path = $matches[4];
-
- if (!preg_match('/^(watch\?v=)([a-zA-Z0-9_-]*)(&.*)?$/',$path, $matches))
- {
- return false;
- }
-
- $hash = $matches[2];
-
-
- return $domain . 'v/' . $hash;
- }
-
- function video_vimeo_parse_url($url)
- {
- if (!preg_match('/(http:\/\/)([a-zA-Z]{2,3}\.)(vimeo\.com\/)(.*)/', $url, $matches))
- {
- return false;
- }
-
- $domain = $matches[2] . $matches[3];
- $path = $matches[4];
-
- $hash = $matches[2];
-
-
- return $domain . '/' . $hash;
- }
-
- function video_metacafe_parse_url($url)
- {
- if (!preg_match('/(http:\/\/)([a-zA-Z]{2,3}\.)(metacafe\.com\/)(.*)/', $url, $matches))
- {
- return false;
- }
-
- $domain = $matches[2] . $matches[3];
- $path = $matches[4];
-
- $hash = $matches[2];
-
-
- return $domain . '/' . $hash;
- }
-
- if(isset($confirm_action) && ($confirm_action == 'add_video'))
- {
- if(isset($title_videourl) && ($title_videourl != ''))
- {
- if($Pagecontainer != "youtube" || $Pagecontainer != "vimeo" || $Pagecontainer != "metacafe"){
- if(preg_match("/youtube/i", $title_videourl))
- $Pagecontainer = "youtube";
- if(preg_match("/vimeo/i", $title_videourl))
- $Pagecontainer = "vimeo";
- if(preg_match("/metacafe/i", $title_videourl))
- $Pagecontainer = "metacafe";
- }
- if($Pagecontainer == "youtube")
- $is_valid_video = video_youtube_parse_url($title_videourl);
- else if($Pagecontainer == "vimeo"){
- $is_valid_video = video_vimeo_parse_url($title_videourl);
- $is_valid_video = $get_addvideourl;
- }
- else if($Pagecontainer == "metacafe"){
- $is_valid_video = video_metacafe_parse_url($title_videourl);
- $is_valid_video = $get_addvideourl;
- }
- if($is_valid_video)
- {
- $error['no-video'] = 1;
- $_SESSION['candidate_profile_video'] = $is_valid_video;
- $_SESSION['candidate_profile_video_access_id'] = $access_id;
- $_SESSION['videolisttags'] = $tags;
- $_SESSION['Pagecontainer'] = $Pagecontainer;
- $_SESSION['container_guid'] = $container_guid;
- //echo $_SESSION['candidate_profile_video'];
- $url = "action/videolist/addvideo?__elgg_ts={$timestamp}&__elgg_token={$token}";
- forward($url);
- }
- else
- $error['no-video'] = 0;
- }
- else
- {
- $error['no-video'] = 0;
+gatekeeper();
+$page_owner = page_owner_entity();
+$error = array(
+ 'no-video' => 1
+ );
+$error_msg = array(
+ 'no-video' => "Please enter a valid video url"
+ );
+
+$container_guid = get_input("container_guid");
+set_page_owner($container_guid);
+
+$confirm_action = get_input('video_action');
+$guid = get_input('guid');
+$access_id = get_input('access_id');
+$title_videourl = get_input('title_videourl');
+$Pagecontainer = get_input('page');
+$get_addvideourl = get_input('add_videourl');
+$timestamp = time();
+$token = generate_action_token(time());
+if (!empty($get_addvideourl) && ($Pagecontainer == "youtube")) {
+ $title_add_videourl = "http://www.youtube.com/watch?v=".$get_addvideourl;
+} else if(!empty($get_addvideourl) && ($Pagecontainer == "metacafe")) {
+ $title_add_videourl = "http://www.metacafe.com/api/item/".$get_addvideourl;
+} else if(!empty($get_addvideourl) && ($Pagecontainer == "vimeo")) {
+ $title_add_videourl = "http://vimeo.com/".$get_addvideourl;
+} else {
+ $title_add_videourl = "";
+}
+
+$tags = get_input('videolisttags');
+
+function video_youtube_parse_url($url) {
+ if (!preg_match('/(http:\/\/)([a-zA-Z]{2,3}\.)(youtube\.com\/)(.*)/', $url, $matches)) {
+ return false;
+ }
+
+ $domain = $matches[2] . $matches[3];
+ $path = $matches[4];
+
+ if (!preg_match('/^(watch\?v=)([a-zA-Z0-9_-]*)(&.*)?$/',$path, $matches)) {
+ return false;
+ }
+
+ $hash = $matches[2];
+ return $domain . 'v/' . $hash;
+}
+
+function video_vimeo_parse_url($url) {
+ if (!preg_match('/(http:\/\/)([a-zA-Z]{2,3}\.)(vimeo\.com\/)(.*)/', $url, $matches)) {
+ return false;
+ }
+
+ $domain = $matches[2] . $matches[3];
+ $path = $matches[4];
+
+ $hash = $matches[2];
+
+ return $domain . '/' . $hash;
+}
+
+function video_metacafe_parse_url($url) {
+ if (!preg_match('/(http:\/\/)([a-zA-Z]{2,3}\.)(metacafe\.com\/)(.*)/', $url, $matches)) {
+ return false;
+ }
+
+ $domain = $matches[2] . $matches[3];
+ $path = $matches[4];
+
+ $hash = $matches[2];
+
+ return $domain . '/' . $hash;
+}
+
+if(isset($confirm_action) && ($confirm_action == 'add_video')) {
+ if(isset($title_videourl) && ($title_videourl != '')) {
+ if($Pagecontainer != "youtube" || $Pagecontainer != "vimeo" || $Pagecontainer != "metacafe"){
+ if(preg_match("/youtube/i", $title_videourl)) {
+ $Pagecontainer = "youtube";
+ }
+
+ if(preg_match("/vimeo/i", $title_videourl)) {
+ $Pagecontainer = "vimeo";
+ }
+
+ if(preg_match("/metacafe/i", $title_videourl)) {
+ $Pagecontainer = "metacafe";
}
- }
-
-
-
- $body = '<div class="videolist-content">';
-
- $body .= '<form action="'.$_SERVER['php_self'].'" method="post">';
- $body .= elgg_view('input/hidden',array('internalname'=>'video_action', 'value'=>'add_video'));
- $body .= elgg_view('input/hidden',array('internalname'=>'guid', 'value'=>$vars['guid']));
-
-
- $body .= '<p><label>'.elgg_echo("videolist:title_videourl").'<br />';
- $body .= elgg_view("input/text",array('internalname' => 'title_videourl','value'=>$title_add_videourl));
- if($error['no-video'] == 0)
- {
- $body .= '<div class="error">'.$error_msg['no-video'].'</div>';
}
- $body .= '</label></p>';
-
- $body .= '<p><label>'.elgg_echo('videolist:tags');
- $body .= elgg_view('input/tags', array('internalname' => 'videolisttags', 'value' => $tags));
- $body .= '</label></p>';
-
- $body .= '<p><label>'.elgg_echo("videolist:title_access").'<br />';
- $body .= elgg_view('input/access',array('internalname'=>'access_id', 'value' => $access_id));
- $body .= '</label></p>';
- $body .= elgg_view('input/submit', array('internalname'=>'submit','value'=>elgg_echo('videolist:submit')));
- $body .= '</form>';
- $body .= '</div>';
-
- print $body."<br /><br />";
-
-
-?>
-
-<script type="text/javascript">
-
-</script>
+ if($Pagecontainer == "youtube") {
+ $is_valid_video = video_youtube_parse_url($title_videourl);
+ } else if($Pagecontainer == "vimeo") {
+ $is_valid_video = video_vimeo_parse_url($title_videourl);
+ $is_valid_video = $get_addvideourl;
+ } else if($Pagecontainer == "metacafe"){
+ $is_valid_video = video_metacafe_parse_url($title_videourl);
+ $is_valid_video = $get_addvideourl;
+ }
+
+ if($is_valid_video) {
+ $error['no-video'] = 1;
+ $_SESSION['candidate_profile_video'] = $is_valid_video;
+ $_SESSION['candidate_profile_video_access_id'] = $access_id;
+ $_SESSION['videolisttags'] = $tags;
+ $_SESSION['Pagecontainer'] = $Pagecontainer;
+ $_SESSION['container_guid'] = $container_guid;
+ //echo $_SESSION['candidate_profile_video'];
+ $url = "action/videolist/addvideo?__elgg_ts={$timestamp}&__elgg_token={$token}";
+ forward($url);
+ }
+ else
+ $error['no-video'] = 0;
+ }
+ else {
+ $error['no-video'] = 0;
+ }
+}
+
+$body = '<div class="videolist-content">';
+
+$body .= '<form action="'.$_SERVER['php_self'].'" method="post">';
+$body .= elgg_view('input/hidden',array('internalname'=>'video_action', 'value'=>'add_video'));
+$body .= elgg_view('input/hidden',array('internalname'=>'guid', 'value'=>$vars['guid']));
+
+
+$body .= '<p><label>'.elgg_echo("videolist:title_videourl").'<br />';
+$body .= elgg_view("input/text",array('internalname' => 'title_videourl','value'=>$title_add_videourl));
+if($error['no-video'] == 0) {
+ $body .= '<div class="error">'.$error_msg['no-video'].'</div>';
+}
+$body .= '</label></p>';
+
+$body .= '<p><label>'.elgg_echo('videolist:tags');
+$body .= elgg_view('input/tags', array('internalname' => 'videolisttags', 'value' => $tags));
+$body .= '</label></p>';
+
+$body .= '<p><label>'.elgg_echo("videolist:title_access").'<br />';
+$body .= elgg_view('input/access',array('internalname'=>'access_id', 'value' => $access_id));
+$body .= '</label></p>';
+$body .= elgg_view('input/submit', array('internalname'=>'submit','value'=>elgg_echo('videolist:submit')));
+$body .= '</form>';
+$body .= '</div>';
+
+print $body."<br /><br />";
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 @@
<?php
- /**
- * 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 <synapticfield@gmail.com>
- * @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 <synapticfield@gmail.com>
+ * @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 = '<div class="videolist-content">';
+//Load youtube menu
+$body .= "<br /><div class=\"elgg_horizontal_tabbed_nav\">";
+$body .= "<ul id=\"videonav\">";
+$body .= "<li class=\"active\" id=\"YT\">";
+$body .= "<a href=\"".$vars['url']."pg/videolist/browse/".$getcontainer_guid."?q=youtube\">YouTube</a>";
+$body .= "</li>";
+$body .= "<li id=\"MC\">";
+$body .= "<a href=\"".$vars['url']."pg/videolist/browse/".$getcontainer_guid."?q=metacafe\">Metacafe</a>";
+$body .= "</li>";
+$body .= "<li id=\"VM\">";
+$body .= "<a href=\"".$vars['url']."pg/videolist/browse/".$getcontainer_guid."?q=vimeo\">Vimeo</a>";
+$body .= "</li>";
+/*
+$body .= "<li id=\"GV\">";
+$body .= "<a href=\"".$vars['url']."pg/videolist/browse?q=googlevideos\">Google Videos</a>";
+$body .= "</li>";
+*/
+$body .= "</ul>";
+$body .= "</div>";
+
+$body .= "<div class=\"clearfloat\"></div>";
+
+//$body .= "<div id=\"videosearch-interface\">";
+$body .= '<form action="javascript:sendSearchRequest(1);" method="get">';
+//$body .= "<form action=\"".$vars['url']."action/videolist/tubesearch\" method=\"get\">";
+$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 .= '</form>';
+//$body .= '</div>';
+//$body .= '</div>';
+
+$body .= '<div id="SearchContainer">';
+$body .= '<div id="loadingSearch">';
+$body .= '</div>';
+$body .= '<div id="responseSearch" align="center">';
+$body .= '</div>';
+$body .= '</div>';
+
+print $body."<br /><br />";
+
-
- //$body = '<div class="videolist-content">';
- //Load youtube menu
- $body .= "<br /><div class=\"elgg_horizontal_tabbed_nav\">";
- $body .= "<ul id=\"videonav\">";
- $body .= "<li class=\"active\" id=\"YT\">";
- $body .= "<a href=\"".$vars['url']."pg/videolist/browse/".$getcontainer_guid."?q=youtube\">YouTube</a>";
- $body .= "</li>";
- $body .= "<li id=\"MC\">";
- $body .= "<a href=\"".$vars['url']."pg/videolist/browse/".$getcontainer_guid."?q=metacafe\">Metacafe</a>";
- $body .= "</li>";
- $body .= "<li id=\"VM\">";
- $body .= "<a href=\"".$vars['url']."pg/videolist/browse/".$getcontainer_guid."?q=vimeo\">Vimeo</a>";
- $body .= "</li>";
- /*
- $body .= "<li id=\"GV\">";
- $body .= "<a href=\"".$vars['url']."pg/videolist/browse?q=googlevideos\">Google Videos</a>";
- $body .= "</li>";
- */
- $body .= "</ul>";
- $body .= "</div>";
-
- $body .= "<div class=\"clearfloat\"></div>";
-
- //$body .= "<div id=\"videosearch-interface\">";
- $body .= '<form action="javascript:sendSearchRequest(1);" method="get">';
- //$body .= "<form action=\"".$vars['url']."action/videolist/tubesearch\" method=\"get\">";
- $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 .= '</form>';
- //$body .= '</div>';
- //$body .= '</div>';
-
- $body .= '<div id="SearchContainer">';
- $body .= '<div id="loadingSearch">';
- $body .= '</div>';
- $body .= '<div id="responseSearch" align="center">';
- $body .= '</div>';
- $body .= '</div>';
-
- print $body."<br /><br />";
-
-
?>
<style type="text/css">
#videosearch-menu{
@@ -136,122 +135,122 @@ var container = "<?php echo $container;?>";
$('#videonav li').removeClass();
switch(page)
{
- case "youtube" : $('#YT').removeClass().addClass('active');
- break;
- case "metacafe" : $('#MC').removeClass().addClass('active');
- break;
- case "vimeo" : $('#VM').removeClass().addClass('active');
- break;
- case "googlevideos" : $('#GV').removeClass().addClass('active');
- break;
- default : $('#YT').removeClass().addClass('active');
- break;
+case "youtube" : $('#YT').removeClass().addClass('active');
+ break;
+case "metacafe" : $('#MC').removeClass().addClass('active');
+ break;
+case "vimeo" : $('#VM').removeClass().addClass('active');
+ break;
+case "googlevideos" : $('#GV').removeClass().addClass('active');
+ break;
+default : $('#YT').removeClass().addClass('active');
+ break;
}
function sendSearchRequest(p){
- var queryFeed = $("#title_search").val();
- if(trim(queryFeed) != '')
- {
- $("#loadingSearch").html("<div align=\"center\" class=\"ajax_loader\"></div>");
- var elggTS = "<?php echo time(); ?>";
- var elggToken = "<?php echo generate_action_token(time()); ?>";
- $.ajax({
- type: "GET",
- url: "<?php echo $vars['url']; ?>"+"action/videolist/tubesearch",
- data: "bustcache="+new Date().getTime()+"&__elgg_ts="+elggTS+"&__elgg_token="+elggToken+"&page="+page+"&q="+queryFeed+"&start_index="+p+"&container="+container,
- success: function(html){
- $("#loadingSearch").html("");
- $("#responseSearch").html('');
- $("#responseSearch").html(html);
- }
- });
- }
- else{}
+var queryFeed = $("#title_search").val();
+if(trim(queryFeed) != '')
+{
+ $("#loadingSearch").html("<div align=\"center\" class=\"ajax_loader\"></div>");
+ var elggTS = "<?php echo time(); ?>";
+ var elggToken = "<?php echo generate_action_token(time()); ?>";
+ $.ajax({
+ type: "GET",
+ url: "<?php echo $vars['url']; ?>"+"action/videolist/tubesearch",
+ data: "bustcache="+new Date().getTime()+"&__elgg_ts="+elggTS+"&__elgg_token="+elggToken+"&page="+page+"&q="+queryFeed+"&start_index="+p+"&container="+container,
+ success: function(html){
+ $("#loadingSearch").html("");
+ $("#responseSearch").html('');
+ $("#responseSearch").html(html);
+ }
+ });
+}
+else{}
}
function showV_idFeed(param, param2){
- var arg = param;
- var embed_video = "<div style='text-align:right;'><a href='javascript:void(0);' onclick='javascript:closeit("+param2+");'>close</a></div><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0' width='475' height='350'>"+
- "<param name='movie' value='"+arg+"&amp;autoplay=1'>"+
- "<param name='quality' value='high'>"+
- "<param name='bgcolor' value='#CEEFFF'>"+
- "<!--[if !IE]> <-->"+
- "<object data='"+arg+"&amp;autoplay=1' width='475' height='350' autoplay=1 type='application/x-shockwave-flash'>"+
- "<param name='quality' value='high'>"+
- "<param name='bgcolor' value='#CEEFFF'>"+
- "<param name='pluginurl' value='http://www.adobe.com/go/getflashplayer'>"+
- "FAIL (the browser should render some flash content, not this)."+
- "</object>"+
- "<!--> <![endif]-->"+
- "</object>";
- disableScreen(embed_video, param2);
+var arg = param;
+var embed_video = "<div style='text-align:right;'><a href='javascript:void(0);' onclick='javascript:closeit("+param2+");'>close</a></div><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0' width='475' height='350'>"+
+ "<param name='movie' value='"+arg+"&amp;autoplay=1'>"+
+ "<param name='quality' value='high'>"+
+ "<param name='bgcolor' value='#CEEFFF'>"+
+ "<!--[if !IE]> <-->"+
+ "<object data='"+arg+"&amp;autoplay=1' width='475' height='350' autoplay=1 type='application/x-shockwave-flash'>"+
+ "<param name='quality' value='high'>"+
+ "<param name='bgcolor' value='#CEEFFF'>"+
+ "<param name='pluginurl' value='http://www.adobe.com/go/getflashplayer'>"+
+ "FAIL (the browser should render some flash content, not this)."+
+ "</object>"+
+ "<!--> <![endif]-->"+
+ "</object>";
+disableScreen(embed_video, param2);
}
function showV_idFeedMetacafe(param, param2){
- var argArray = param.split("/");
- var arg = argArray[0]+"/"+argArray[1]+".swf";
- var embed_video = "<div style='text-align:right;'><a href='javascript:void(0);' onclick='javascript:closeit("+param2+");'>close</a></div><object width=\"475\" height=\"350\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"Metacafe_"+argArray[0]+"\" value=\"http://www.metacafe.com/fplayer/"+arg+"&amp;autoplay=1\" /><embed src=\"http://www.metacafe.com/fplayer/"+arg+"&amp;autoplay=1\" type=\"application/x-shockwave-flash\" name=\"Metacafe_"+argArray[0]+"\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"475\" height=\"350\"></embed></object>";
-
- disableScreen(embed_video, param2);
+var argArray = param.split("/");
+var arg = argArray[0]+"/"+argArray[1]+".swf";
+var embed_video = "<div style='text-align:right;'><a href='javascript:void(0);' onclick='javascript:closeit("+param2+");'>close</a></div><object width=\"475\" height=\"350\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"Metacafe_"+argArray[0]+"\" value=\"http://www.metacafe.com/fplayer/"+arg+"&amp;autoplay=1\" /><embed src=\"http://www.metacafe.com/fplayer/"+arg+"&amp;autoplay=1\" type=\"application/x-shockwave-flash\" name=\"Metacafe_"+argArray[0]+"\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"475\" height=\"350\"></embed></object>";
+
+disableScreen(embed_video, param2);
}
function showV_idFeedVimeo(param, param2){
- var arg = param;
- var embed_video = "<div style='text-align:right;'><a href='javascript:void(0);' onclick='javascript:closeit("+param2+");'>close</a></div><object width=\"475\" height=\"350\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id="+arg+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id="+arg+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"475\" height=\"350\"></embed></object>";
- disableScreen(embed_video, param2);
+var arg = param;
+var embed_video = "<div style='text-align:right;'><a href='javascript:void(0);' onclick='javascript:closeit("+param2+");'>close</a></div><object width=\"475\" height=\"350\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id="+arg+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id="+arg+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"475\" height=\"350\"></embed></object>";
+disableScreen(embed_video, param2);
}
function disableScreen(embed_video, param2)
{
- var getContainer = "#vidContainer"+param2;
- $('#page_container').append("<div id='page_overlay' style='position:absolute;'/>");
- $('#page_overlay').css({
- backgroundColor: "#000",
- opacity: "0.8",
- width: $(window).width(),
- height: $('#page_container').height(),
- top: "0px",
- left: -(($(window).width() - $('body').width()) / 2)
- }).fadeIn();
- $(getContainer).css("width", "0%");
- $(getContainer).animate( { width:"45%"}, 300 );
- document.getElementById("vidContainer"+param2).innerHTML = embed_video;
+var getContainer = "#vidContainer"+param2;
+$('#page_container').append("<div id='page_overlay' style='position:absolute;'/>");
+$('#page_overlay').css({
+ backgroundColor: "#000",
+ opacity: "0.8",
+ width: $(window).width(),
+ height: $('#page_container').height(),
+ top: "0px",
+ left: -(($(window).width() - $('body').width()) / 2)
+ }).fadeIn();
+$(getContainer).css("width", "0%");
+$(getContainer).animate( { width:"45%"}, 300 );
+document.getElementById("vidContainer"+param2).innerHTML = embed_video;
}
function trim(stringToTrim)
{
- return ltrim(rtrim(stringToTrim));
+return ltrim(rtrim(stringToTrim));
}
function ltrim(stringToTrim) {
- return stringToTrim.replace(/^\s+/,"");
+return stringToTrim.replace(/^\s+/,"");
}
function rtrim(stringToTrim) {
- return stringToTrim.replace(/\s+$/,"");
+return stringToTrim.replace(/\s+$/,"");
}
function closeit(param){
- document.getElementById("vidContainer"+param).innerHTML = "";
- document.getElementById("vidContainer"+param).style.display = "none";
- $('#page_overlay').remove();
+document.getElementById("vidContainer"+param).innerHTML = "";
+document.getElementById("vidContainer"+param).style.display = "none";
+$('#page_overlay').remove();
}
function InsertVideoUrl(param, param2){
- var actionAction = "add_video";
- var access_id = 2;
- var elggTS = "<?php echo time(); ?>";
- var elggToken = "<?php echo generate_action_token(time()); ?>";
- $.ajax({
- type: "GET",
- url: "<?php echo $vars['url']; ?>"+"action/videolist/addvideo",
- data: "bustcache="+new Date().getTime()+"&__elgg_ts="+elggTS+"&__elgg_token="+elggToken+"&video_action="+actionAction+"&title_videourl="+param+"&videolisttags="+param2+"&access_id="+access_id,
- success: function(html){
- $("#loadingSearch").html("");
- $("#responseSearch").html('');
- $("#responseSearch").html(html);
- }
- });
-
+ var actionAction = "add_video";
+ var access_id = 2;
+ var elggTS = "<?php echo time(); ?>";
+ var elggToken = "<?php echo generate_action_token(time()); ?>";
+ $.ajax({
+ type: "GET",
+ url: "<?php echo $vars['url']; ?>"+"action/videolist/addvideo",
+ data: "bustcache="+new Date().getTime()+"&__elgg_ts="+elggTS+"&__elgg_token="+elggToken+"&video_action="+actionAction+"&title_videourl="+param+"&videolisttags="+param2+"&access_id="+access_id,
+ success: function(html){
+ $("#loadingSearch").html("");
+ $("#responseSearch").html('');
+ $("#responseSearch").html(html);
+ }
+ });
+
}
</script>
diff --git a/views/default/forms/labels/googlevideos.php b/views/default/forms/labels/googlevideos.php
index 76673c10b..41893cea2 100644
--- a/views/default/forms/labels/googlevideos.php
+++ b/views/default/forms/labels/googlevideos.php
@@ -1,34 +1,32 @@
<?php
- /**
- * Elgg User Profile Video Plugin
- * This plugin allows users to browse youtube videos
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
+/**
+ * Elgg User Profile Video Plugin
+ * This plugin allows users to browse youtube videos
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Prateek Choudhary <synapticfield@gmail.com>
+ * @copyright Prateek Choudhary
+ */
- $body = '<p><label>'.elgg_echo("videolist:title_search_tube").'<br />';
- //$body .= elgg_view("input/text",array('internalname' => 'title_search','value' => '', 'id' => 'title_search'));
- $body .= "<div style='width:100%;'>";
- $body .= "<div style='float:left;width:19%;'>";
- $body .= "<a href=\"http://video.google.com\"><img src='".$vars['url']."mod/videolist/graphics/logo_videos.png' width='120'/></a>";
- $body .= "</div>";
- $body .= "<div style='float:left;width:45%;'>";
- $body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/> &nbsp;&nbsp;";
- if($error['no-search'] == 0)
- {
- $body .= '<div class="error">'.$error_msg['no-search'].'</div>';
- }
- $body .= "</div>";
- //$body .= "<div>";
- //$body .= '<input type="submit" value="Submit" class="submit_button" name="submit" onclick="sendSearchRequest(1);"/>';
- $body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos:vimeo')));
- //$body .= "</div>";
- $body .= "</div>";
- $body .= '</label></p>';
- $body .= '<div id="searchcontrol">Loading...</div>';
- print $body;
-?>
+$body = '<p><label>'.elgg_echo("videolist:title_search_tube").'<br />';
+//$body .= elgg_view("input/text",array('internalname' => 'title_search','value' => '', 'id' => 'title_search'));
+$body .= "<div style='width:100%;'>";
+$body .= "<div style='float:left;width:19%;'>";
+$body .= "<a href=\"http://video.google.com\"><img src='".$vars['url']."mod/videolist/graphics/logo_videos.png' width='120'/></a>";
+$body .= "</div>";
+$body .= "<div style='float:left;width:45%;'>";
+$body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/> &nbsp;&nbsp;";
+if($error['no-search'] == 0) {
+ $body .= '<div class="error">'.$error_msg['no-search'].'</div>';
+}
+$body .= "</div>";
+//$body .= "<div>";
+//$body .= '<input type="submit" value="Submit" class="submit_button" name="submit" onclick="sendSearchRequest(1);"/>';
+$body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos:vimeo')));
+//$body .= "</div>";
+$body .= "</div>";
+$body .= '</label></p>';
+$body .= '<div id="searchcontrol">Loading...</div>';
+print $body; \ No newline at end of file
diff --git a/views/default/forms/labels/metacafe.php b/views/default/forms/labels/metacafe.php
index 7003b6743..08edbcfdd 100644
--- a/views/default/forms/labels/metacafe.php
+++ b/views/default/forms/labels/metacafe.php
@@ -1,34 +1,32 @@
<?php
- /**
- * Elgg Video Plugin
- * This plugin allows users to create a library of youtube/vimeo/metacafe videos
- * @file - load metacafe label
- * @package Elgg
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
+/**
+ * Elgg Video Plugin
+ * This plugin allows users to create a library of youtube/vimeo/metacafe videos
+ * @file - load metacafe label
+ * @package Elgg
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Prateek Choudhary <synapticfield@gmail.com>
+ * @copyright Prateek Choudhary
+ */
- $body = '<p><label>'.elgg_echo("videolist:title_search_tube").'<br />';
- //$body .= elgg_view("input/text",array('internalname' => 'title_search','value' => '', 'id' => 'title_search'));
- $body .= "<div style='width:100%;'>";
- $body .= "<div style='float:left;width:19%;'>";
- $body .= "<a href=\"http://www.metacafe.com\"><img src='".$vars['url']."mod/videolist/graphics/metacafe.jpg' width='120'/></a>";
- $body .= "</div>";
- $body .= "<div style='float:left;width:45%;'>";
- $body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/> &nbsp;&nbsp;";
- if($error['no-search'] == 0)
- {
- $body .= '<div class="error">'.$error_msg['no-search'].'</div>';
- }
- $body .= "</div>";
- //$body .= "<div>";
- //$body .= '<input type="submit" value="Submit" class="submit_button" name="submit" onclick="sendSearchRequest(1);"/>';
- $body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos:metacafe')));
- //$body .= "</div>";
- $body .= "</div>";
- $body .= '</label></p>';
-
- print $body;
-?>
+$body = '<p><label>'.elgg_echo("videolist:title_search_tube").'<br />';
+//$body .= elgg_view("input/text",array('internalname' => 'title_search','value' => '', 'id' => 'title_search'));
+$body .= "<div style='width:100%;'>";
+$body .= "<div style='float:left;width:19%;'>";
+$body .= "<a href=\"http://www.metacafe.com\"><img src='".$vars['url']."mod/videolist/graphics/metacafe.jpg' width='120'/></a>";
+$body .= "</div>";
+$body .= "<div style='float:left;width:45%;'>";
+$body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/> &nbsp;&nbsp;";
+if($error['no-search'] == 0) {
+ $body .= '<div class="error">'.$error_msg['no-search'].'</div>';
+}
+$body .= "</div>";
+//$body .= "<div>";
+//$body .= '<input type="submit" value="Submit" class="submit_button" name="submit" onclick="sendSearchRequest(1);"/>';
+$body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos:metacafe')));
+//$body .= "</div>";
+$body .= "</div>";
+$body .= '</label></p>';
+
+print $body; \ No newline at end of file
diff --git a/views/default/forms/labels/vimeo.php b/views/default/forms/labels/vimeo.php
index 6a15909b4..38ffc17f0 100644
--- a/views/default/forms/labels/vimeo.php
+++ b/views/default/forms/labels/vimeo.php
@@ -1,34 +1,32 @@
<?php
- /**
- * Elgg Video Plugin
- * This plugin allows users to create a library of youtube/vimeo/metacafe videos
- * @file - load vimeo label
- * @package Elgg
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
+/**
+ * Elgg Video Plugin
+ * This plugin allows users to create a library of youtube/vimeo/metacafe videos
+ * @file - load vimeo label
+ * @package Elgg
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Prateek Choudhary <synapticfield@gmail.com>
+ * @copyright Prateek Choudhary
+ */
- $body = '<p><label>'.elgg_echo("videolist:title_search_tube").'<br />';
- //$body .= elgg_view("input/text",array('internalname' => 'title_search','value' => '', 'id' => 'title_search'));
- $body .= "<div style='width:100%;'>";
- $body .= "<div style='float:left;width:19%;'>";
- $body .= "<a href=\"http://www.vimeo.com\"><img src='".$vars['url']."mod/videolist/graphics/vimeo_logo.gif' width='120'/></a>";
- $body .= "</div>";
- $body .= "<div style='float:left;width:45%;'>";
- $body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/> &nbsp;&nbsp;";
- if($error['no-search'] == 0)
- {
- $body .= '<div class="error">'.$error_msg['no-search'].'</div>';
- }
- $body .= "</div>";
- //$body .= "<div>";
- //$body .= '<input type="submit" value="Submit" class="submit_button" name="submit" onclick="sendSearchRequest(1);"/>';
- $body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos:vimeo')));
- //$body .= "</div>";
- $body .= "</div>";
- $body .= '</label></p>';
-
- print $body;
-?>
+$body = '<p><label>'.elgg_echo("videolist:title_search_tube").'<br />';
+//$body .= elgg_view("input/text",array('internalname' => 'title_search','value' => '', 'id' => 'title_search'));
+$body .= "<div style='width:100%;'>";
+$body .= "<div style='float:left;width:19%;'>";
+$body .= "<a href=\"http://www.vimeo.com\"><img src='".$vars['url']."mod/videolist/graphics/vimeo_logo.gif' width='120'/></a>";
+$body .= "</div>";
+$body .= "<div style='float:left;width:45%;'>";
+$body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/> &nbsp;&nbsp;";
+if ($error['no-search'] == 0) {
+ $body .= '<div class="error">'.$error_msg['no-search'].'</div>';
+}
+$body .= "</div>";
+//$body .= "<div>";
+//$body .= '<input type="submit" value="Submit" class="submit_button" name="submit" onclick="sendSearchRequest(1);"/>';
+$body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos:vimeo')));
+//$body .= "</div>";
+$body .= "</div>";
+$body .= '</label></p>';
+
+print $body; \ No newline at end of file
diff --git a/views/default/forms/labels/youtube.php b/views/default/forms/labels/youtube.php
index 4ec53b27a..37575c0f1 100644
--- a/views/default/forms/labels/youtube.php
+++ b/views/default/forms/labels/youtube.php
@@ -1,34 +1,32 @@
<?php
- /**
- * Elgg Video Plugin
- * This plugin allows users to create a library of youtube/vimeo/metacafe videos
- * @file - load youtube label
- * @package Elgg
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
+/**
+ * Elgg Video Plugin
+ * This plugin allows users to create a library of youtube/vimeo/metacafe videos
+ * @file - load youtube label
+ * @package Elgg
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Prateek Choudhary <synapticfield@gmail.com>
+ * @copyright Prateek Choudhary
+ */
- $body = '<p><label>'.elgg_echo("videolist:title_search_tube").'<br />';
- //$body .= elgg_view("input/text",array('internalname' => 'title_search','value' => '', 'id' => 'title_search'));
- $body .= "<div style='width:100%;'>";
- $body .= "<div style='float:left;width:10%;'>";
- $body .= "<a href=\"http://www.youtube.com\"><img src='".$vars['url']."mod/videolist/graphics/badge3.gif' height='30'/></a>";
- $body .= "</div>";
- $body .= "<div style='float:left;width:45%;'>";
- $body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/> &nbsp;&nbsp;";
- if($error['no-search'] == 0)
- {
- $body .= '<div class="error">'.$error_msg['no-search'].'</div>';
- }
- $body .= "</div>";
- //$body .= "<div>";
- //$body .= '<input type="submit" value="Submit" class="submit_button" name="submit" onclick="sendSearchRequest(1);"/>';
- $body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos')));
- //$body .= "</div>";
- $body .= "</div>";
- $body .= '</label></p>';
-
- print $body;
-?>
+$body = '<p><label>'.elgg_echo("videolist:title_search_tube").'<br />';
+//$body .= elgg_view("input/text",array('internalname' => 'title_search','value' => '', 'id' => 'title_search'));
+$body .= "<div style='width:100%;'>";
+$body .= "<div style='float:left;width:10%;'>";
+$body .= "<a href=\"http://www.youtube.com\"><img src='".$vars['url']."mod/videolist/graphics/badge3.gif' height='30'/></a>";
+$body .= "</div>";
+$body .= "<div style='float:left;width:45%;'>";
+$body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/> &nbsp;&nbsp;";
+if($error['no-search'] == 0) {
+ $body .= '<div class="error">'.$error_msg['no-search'].'</div>';
+}
+$body .= "</div>";
+//$body .= "<div>";
+//$body .= '<input type="submit" value="Submit" class="submit_button" name="submit" onclick="sendSearchRequest(1);"/>';
+$body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos')));
+//$body .= "</div>";
+$body .= "</div>";
+$body .= '</label></p>';
+
+print $body; \ No newline at end of file
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 @@
<?php
- /*****************************************************************************************
- /* youtube video pluggin
- /* @author : Prateek Choudhary <synapticfield@gmail.com>
- /* 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 .= "<div class=\"filerepo_gallery_item\">";
- $videodiv .= "<div id='videobox'>";
- $videodiv .= $title."<br />";
- $videodiv .= "<a href='".$watch_URL."'>";
- $videodiv .= "<img src='".$thumbnail."' width='120' class='tubesearch'/>";
- $videodiv .= "</a>";
-
- $videodiv .= "</div>";
- //$videodiv .= "<div id='videoDescbox'>";
- //$videodiv .= "<span class='title'>".elgg_echo('videolist:videoTitle')." : </span>".$title."<br />";
- //$videodiv .= "</div>";
-
- $numcomments = elgg_count_comments($video_file);
- $videodiv .= "<div id='videoActionbox'>";
- if ($numcomments)
- $videodiv .= "<a href=\"{$watch_URL}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a> <br />";
- if($video_file->canEdit())
- {
-
- $videodiv .= elgg_view("output/confirmlink", array(
- 'href' => $vars['url'] . "action/videolist/remove?video_id=" . $video_guid,
- 'text' => elgg_echo('delete'),
- 'confirm' => elgg_echo('deleteconfirm'),
- ));
- }
-
- $videodiv .= "</div></div>";
- $videodiv .= "<div class=\"clearfloat\"></div>";
- print $videodiv;
- }
- else if(get_input('show_viewtype') == "all")
- {
- $info .= '<p><a href="' .$watch_URL. '">'.$title.'</a></p>';
- $info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
- $info .= "</p>";
- $icon = "<a href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>";
-
- echo elgg_view_listing($icon, $info);
- }
- else
- {
- /*
- $videodiv .= "<a href='".$vars['url']."pg/videolist/watch/".$video_guid."'>";
- $videodiv .= "<img src='http://img.youtube.com/vi/".$video_id."/default.jpg' width='50' alt='unable to fetch image'/>";
- $videodiv .= "</a> &nbsp;&nbsp;<a href='".$vars['url']."pg/videolist/watch/".$video_guid."'><span class='title'>Title : </span>".$title;
- $videodiv .= "</a><br />";
- */
- //video list-entity view
- $info = '<p><a href="' .$watch_URL. '">'.$title.'</a></p>';
- $info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
- $info .= "</p>";
- $icon = "<a href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>";
-
- echo elgg_view_listing($icon, $info);
- }
-
-
+/*****************************************************************************************
+/* youtube video pluggin
+/* @author : Prateek Choudhary <synapticfield@gmail.com>
+/* 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 .= "<div class=\"filerepo_gallery_item\">";
+ $videodiv .= "<div id='videobox'>";
+ $videodiv .= $title."<br />";
+ $videodiv .= "<a href='".$watch_URL."'>";
+ $videodiv .= "<img src='".$thumbnail."' width='120' class='tubesearch'/>";
+ $videodiv .= "</a>";
+
+ $videodiv .= "</div>";
+ //$videodiv .= "<div id='videoDescbox'>";
+ //$videodiv .= "<span class='title'>".elgg_echo('videolist:videoTitle')." : </span>".$title."<br />";
+ //$videodiv .= "</div>";
+
+ $numcomments = elgg_count_comments($video_file);
+ $videodiv .= "<div id='videoActionbox'>";
+
+ if ($numcomments) {
+ $videodiv .= "<a href=\"{$watch_URL}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a> <br />";
+ }
+
+ if($video_file->canEdit()) {
+ $videodiv .= elgg_view("output/confirmlink", array(
+ 'href' => $vars['url'] . "action/videolist/remove?video_id=" . $video_guid,
+ 'text' => elgg_echo('delete'),
+ 'confirm' => elgg_echo('deleteconfirm'),
+ ));
+ }
+
+ $videodiv .= "</div></div>";
+ $videodiv .= "<div class=\"clearfloat\"></div>";
+ print $videodiv;
+ } else if(get_input('show_viewtype') == "all") {
+ $info .= '<p><a href="' .$watch_URL. '">'.$title.'</a></p>';
+ $info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+ $info .= "</p>";
+ $icon = "<a href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>";
+
+ echo elgg_view_listing($icon, $info);
+ } else {
+ /*
+ $videodiv .= "<a href='".$vars['url']."pg/videolist/watch/".$video_guid."'>";
+ $videodiv .= "<img src='http://img.youtube.com/vi/".$video_id."/default.jpg' width='50' alt='unable to fetch image'/>";
+ $videodiv .= "</a> &nbsp;&nbsp;<a href='".$vars['url']."pg/videolist/watch/".$video_guid."'><span class='title'>Title : </span>".$title;
+ $videodiv .= "</a><br />";
+ */
+ //video list-entity view
+ $info = '<p><a href="' .$watch_URL. '">'.$title.'</a></p>';
+ $info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+ $info .= "</p>";
+ $icon = "<a href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>";
+
+ echo elgg_view_listing($icon, $info);
}
- else
- {
- echo "No videos were found.";
- }
-?>
+} else {
+ echo "No videos were found.";
+} \ No newline at end of file
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 @@
<?php
- /**
+/**
* Elgg Videolist Plugin -
- * This plugin allows users to watch videos
- *
+ * This plugin allows users to watch videos
+ *
* @package Elgg
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Prateek Choudhary <synapticfield@gmail.com>
@@ -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 = "<h2>".$title."</h2>";
+ if ($videos->videotype == "youtube") {
+ $videodiv .= "<div align=\"center\" style=\"margin-top:20px;\"><object width=\"$width\" height=\"$height\"><param name=\"movie\" value=\"http://{$url}&hl=en&fs=1&showinfo=0&auoplay=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"http://{$url}&hl=en&fs=1&showinfo=0&autoplay=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"$width\" height=\"$height\"></embed></object>";
+ } 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 .= "<div align=\"center\" style=\"margin-top:20px;\"><embed src=\"http://www.metacafe.com/fplayer/".$videoid."\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\" name=\"Metacafe_".$videoid_id."\"></embed>";
+ } else if($videos->videotype == "vimeo") {
+ $videodiv .= "<div align=\"center\" style=\"margin-top:20px;\"><object width=\"$width\" height=\"$height\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=".$videoid."&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=".$videoid."&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\"></embed></object>";
+ }
-$videos = get_entity($vars['entity']);
-$title = $videos->title;
-$url = $videos->url;
-$videoid = $videos->video_id;
-$videodiv = "<h2>".$title."</h2>";
-if($videos->videotype == "youtube"){
- $videodiv .= "<div align=\"center\" style=\"margin-top:20px;\"><object width=\"$width\" height=\"$height\"><param name=\"movie\" value=\"http://{$url}&hl=en&fs=1&showinfo=0&auoplay=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"http://{$url}&hl=en&fs=1&showinfo=0&autoplay=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"$width\" height=\"$height\"></embed></object>";
-}
-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 .= "<div align=\"center\" style=\"margin-top:20px;\"><embed src=\"http://www.metacafe.com/fplayer/".$videoid."\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\" name=\"Metacafe_".$videoid_id."\"></embed>";
+ $videodiv .= "</div>";
+ $videodiv .= elgg_view_likes($videos);
+ $videodiv .= elgg_view_comments($videos);
+ print $videodiv;
-}
-else if($videos->videotype == "vimeo"){
- $videodiv .= "<div align=\"center\" style=\"margin-top:20px;\"><object width=\"$width\" height=\"$height\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=".$videoid."&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=".$videoid."&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\"></embed></object>";
-}
-$videodiv .= "</div>";
-$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
diff --git a/views/default/river/object/videolist/annotate.php b/views/default/river/object/videolist/annotate.php
index 6c03d4445..50a4a8397 100644
--- a/views/default/river/object/videolist/annotate.php
+++ b/views/default/river/object/videolist/annotate.php
@@ -1,13 +1,11 @@
<?php
- $statement = $vars['statement'];
- $performed_by = $statement->getSubject();
- $object = $statement->getObject();
-
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = sprintf(elgg_echo("videolist:river:annotate"),$url) . " ";
- $string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("videolist:river:item") . "</a>";
+$statement = $vars['statement'];
+$performed_by = $statement->getSubject();
+$object = $statement->getObject();
- echo $string;
-
-?>
+$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+$string = sprintf(elgg_echo("videolist:river:annotate"),$url) . " ";
+$string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("videolist:river:item") . "</a>";
+
+echo $string;
diff --git a/views/default/river/object/videolist/create.php b/views/default/river/object/videolist/create.php
index 0ed570378..896f706c9 100644
--- a/views/default/river/object/videolist/create.php
+++ b/views/default/river/object/videolist/create.php
@@ -1,18 +1,21 @@
<?php
- $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
- $object = get_entity($vars['item']->object_guid);
- $thumbnail = $object->thumbnail;
- //$url = $object->getURL();
-
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $title = $object->title;
- if(!$title)
- $title = "untitled";
- $string = sprintf(elgg_echo("videolist:river:created"),$url) . " ";
- $string .= elgg_echo("videolist:river:item") . " titled <a href=\"" . $object->getURL() . "\">" . $title . "</a>";
- $string .= "<div class=\"river_content_display\">";
- $string .= "<a href=\"" . $object->getURL() . "\"><img src='".$thumbnail."' width='120' class='tubesearch'/></a>";
- $string .= "</div>";
+$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+$object = get_entity($vars['item']->object_guid);
+$thumbnail = $object->thumbnail;
+//$url = $object->getURL();
- echo $string; \ No newline at end of file
+$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+$title = $object->title;
+
+if(!$title) {
+ $title = "untitled";
+}
+
+$string = sprintf(elgg_echo("videolist:river:created"),$url) . " ";
+$string .= elgg_echo("videolist:river:item") . " titled <a href=\"" . $object->getURL() . "\">" . $title . "</a>";
+$string .= "<div class=\"river_content_display\">";
+$string .= "<a href=\"" . $object->getURL() . "\"><img src='".$thumbnail."' width='120' class='tubesearch'/></a>";
+$string .= "</div>";
+
+echo $string; \ No newline at end of file
diff --git a/views/default/staticvideo/index.php b/views/default/staticvideo/index.php
index 1b32f316b..256eb5b92 100644
--- a/views/default/staticvideo/index.php
+++ b/views/default/staticvideo/index.php
@@ -1,14 +1,14 @@
<?php
/**
- * Elgg Candidate Profile Plugin - file search.php
- * This plugin allows users to create custom candidate profile
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
-
+ * Elgg Candidate Profile Plugin - file search.php
+ * This plugin allows users to create custom candidate profile
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Prateek Choudhary <synapticfield@gmail.com>
+ * @copyright Prateek Choudhary
+ */
+
$owner = $_SESSION['guid'];
$number = 10;
@@ -19,10 +19,8 @@ $height = "275";
?>
<div id="video-list-main">
<?php
-if(!empty($owner_videos))
-{
- foreach($owner_videos as $node)
- {
+if(!empty($owner_videos)) {
+ foreach($owner_videos as $node) {
$url = $node->url;
$title = $node->title;
$video_guid = $node->guid;
@@ -31,12 +29,12 @@ if(!empty($owner_videos))
$videodiv .= "<a href='".$vars['url']."pg/videolist/watch/".$video_guid."'>";
$videodiv .= "<img src='http://img.youtube.com/vi/".$video_id."/default.jpg' width='150' alt='no video'/>";
$videodiv .= "</a>";
-
+
$videodiv .= "</div>";
$videodiv .= "<div id='videoDescbox'>";
$videodiv .= "<span class='title'>Title : </span>".$title."<br />";
$videodiv .= "</div>";
-
+
$videodiv .= "<div id='videoActionbox'>";
$videodiv .= elgg_view("output/confirmlink", array(
'href' => $vars['url'] . "action/videolist/remove?video_id=" . $video_guid,
@@ -51,12 +49,10 @@ if(!empty($owner_videos))
$videodiv .= "</div>";
$videodiv .= "<div class=\"clearfloat\"></div>";
}
+
print $videodiv;
-}
-else
-{
+} else {
echo "No videos were found.";
}
?>
</div>
-
diff --git a/views/default/videolist/css.php b/views/default/videolist/css.php
index 8c52b0e6c..647def873 100644
--- a/views/default/videolist/css.php
+++ b/views/default/videolist/css.php
@@ -1,199 +1,197 @@
<?php
/**
- * Elgg Candidate Profile Video Plugin
- * This plugin allows users to create a library of youtube videos
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
-
-
+ * Elgg Candidate Profile Video Plugin
+ * This plugin allows users to create a library of youtube videos
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Prateek Choudhary <synapticfield@gmail.com>
+ * @copyright Prateek Choudhary
+ */
?>
.error{
-color:red;
-font-weight:bold;
-font-size:11px;
+ color:red;
+ font-weight:bold;
+ font-size:11px;
}
#video-list-main{
-padding:10px;
+ padding:10px;
}
#videocontainer{
-width:100%;
-margin-bottom:10px;
+ width:100%;
+ margin-bottom:10px;
}
.search_gallery_item{
-border:0px solid #CCCCCC;
+ border:0px solid #CCCCCC;
}
#videobox{
-width:98%;
-text-align:center;
-margin-top:10px;
+ width:98%;
+ text-align:center;
+ margin-top:10px;
}
#videoDescbox{
-width:95%;
-margin:0px 5px 0px 8px;
+ width:95%;
+ margin:0px 5px 0px 8px;
}
#videoActionbox{
-width:90%;
-margin:0px 5px 0px 8px;
-float:left;
+ width:90%;
+ margin:0px 5px 0px 8px;
+ float:left;
}
#videothumbnail-box{
-float:left;
-width:35%;
-background: #333333;
-text-align:center;
-padding:3px 1px 3px 0px;
+ float:left;
+ width:35%;
+ background: #333333;
+ text-align:center;
+ padding:3px 1px 3px 0px;
}
#videotitle-box{
-width:60%;
-float:left;
-font-size:12px;
-font-weight:bold;
-text-align:left;
-padding-left:5px;
-color:#474B9F;
+ width:60%;
+ float:left;
+ font-size:12px;
+ font-weight:bold;
+ text-align:left;
+ padding-left:5px;
+ color:#474B9F;
}
.title{
-font-weight:bold;
+ font-weight:bold;
}
#profile_video_widget_container{
-margin:0px 10px 10px 10px;
-padding:8px;
--moz-border-radius-topleft:8px;
--moz-border-radius-topright:8px;
--moz-border-radius-bottomleft:8px;
--moz-border-radius-bottomright:8px;
-border:0px solid #C3C3C3;
-background: #FFFFFF;
-max-height:250px;
-overflow-y:auto;
+ margin:0px 10px 10px 10px;
+ padding:8px;
+ -moz-border-radius-topleft:8px;
+ -moz-border-radius-topright:8px;
+ -moz-border-radius-bottomleft:8px;
+ -moz-border-radius-bottomright:8px;
+ border:0px solid #C3C3C3;
+ background: #FFFFFF;
+ max-height:250px;
+ overflow-y:auto;
}
#profile_video_image_container{
-float:left;
-width:95%;
-margin:6px 2px 0px 6px;
-border-bottom:1px solid #CCC;
-padding-bottom:3px;
+ float:left;
+ width:95%;
+ margin:6px 2px 0px 6px;
+ border-bottom:1px solid #CCC;
+ padding-bottom:3px;
}
#widget_container_header{
-color:#474B9F;
-margin:0px 0px 5px 0px;
-font-weight:bold;
-font-size:13px;
+ color:#474B9F;
+ margin:0px 0px 5px 0px;
+ font-weight:bold;
+ font-size:13px;
}
#loadingSearch{
-width:100%;
+ width:100%;
}
#SearchContainer{
-width:100%;
+ width:100%;
}
#responseSearch{
-padding:15px;
+ padding:15px;
}
#paginateSearch{
--moz-border-radius-topleft:5px;
--moz-border-radius-topright:5px;
-padding:2px 5px 2px 0px;
-text-align:right;
-background:#FFF;
-border:0px solid #CCC;
-color:#666;
+ -moz-border-radius-topleft:5px;
+ -moz-border-radius-topright:5px;
+ padding:2px 5px 2px 0px;
+ text-align:right;
+ background:#FFF;
+ border:0px solid #CCC;
+ color:#666;
}
th{
-text-align:center;
-font-weight:bold;
-font-size:13px;
+ text-align:center;
+ font-weight:bold;
+ font-size:13px;
}
#parentTab{
--moz-border-radius-bottomleft:8px;
--moz-border-radius-bottomright:8px;
--moz-border-radius-topleft:8px;
--moz-border-radius-topright:8px;
-border-top:1px solid #CCC;
-border-bottom:6px solid #CCC;
-border-left:1px solid #CCC;
-border-right:5px solid #CCC;
-background:#FFFFFF;
-margin-top:7px;
+ -moz-border-radius-bottomleft:8px;
+ -moz-border-radius-bottomright:8px;
+ -moz-border-radius-topleft:8px;
+ -moz-border-radius-topright:8px;
+ border-top:1px solid #CCC;
+ border-bottom:6px solid #CCC;
+ border-left:1px solid #CCC;
+ border-right:5px solid #CCC;
+ background:#FFFFFF;
+ margin-top:7px;
}
.tabcellDesc{
-padding:5px 5px 5px 10px;
-text-align: left;
+ padding:5px 5px 5px 10px;
+ text-align: left;
}
.tabcellText{
-padding:5px;
-text-align: center;
+ padding:5px;
+ text-align: center;
}
.videoDisp{
-position:absolute;
--moz-border-radius-topleft:5px;
--moz-border-radius-topright:5px;
--moz-border-radius-bottomleft:5px;
--moz-border-radius-bottomright:5px;
-border:1px solid #000000;
-display:none;
-padding:10px;
-margin-left:120px;
-margin-top:-100px;
-background:#FFFFFF;
-z-index:300000;
+ position:absolute;
+ -moz-border-radius-topleft:5px;
+ -moz-border-radius-topright:5px;
+ -moz-border-radius-bottomleft:5px;
+ -moz-border-radius-bottomright:5px;
+ border:1px solid #000000;
+ display:none;
+ padding:10px;
+ margin-left:120px;
+ margin-top:-100px;
+ background:#FFFFFF;
+ z-index:300000;
}
.videolist-content{
--moz-border-radius-topleft:5px;
--moz-border-radius-topright:5px;
--moz-border-radius-bottomleft:5px;
--moz-border-radius-bottomright:5px;
-border:1px solid #C3C3C3;
-width:675px;
-margin:10px 0px 10px 10px;
-padding:10px;
-background:#FFFFFF;
+ -moz-border-radius-topleft:5px;
+ -moz-border-radius-topright:5px;
+ -moz-border-radius-bottomleft:5px;
+ -moz-border-radius-bottomright:5px;
+ border:1px solid #C3C3C3;
+ width:675px;
+ margin:10px 0px 10px 10px;
+ padding:10px;
+ background:#FFFFFF;
}
.tubesearch{
--moz-border-radius-topleft:5px;
--moz-border-radius-topright:5px;
--moz-border-radius-bottomleft:5px;
--moz-border-radius-bottomright:5px;
-border:1px solid #666666;
+ -moz-border-radius-topleft:5px;
+ -moz-border-radius-topright:5px;
+ -moz-border-radius-bottomleft:5px;
+ -moz-border-radius-bottomright:5px;
+ border:1px solid #666666;
}
#comment_area_video_title{
-padding:10px;
--moz-border-radius-topleft:5px;
--moz-border-radius-topright:5px;
--moz-border-radius-bottomleft:5px;
--moz-border-radius-bottomright:5px;
-border:1px solid #CCCCCC;
-border:1px solid #CCCCCC;
-background:#FFFFFF;
+ padding:10px;
+ -moz-border-radius-topleft:5px;
+ -moz-border-radius-topright:5px;
+ -moz-border-radius-bottomleft:5px;
+ -moz-border-radius-bottomright:5px;
+ border:1px solid #CCCCCC;
+ border:1px solid #CCCCCC;
+ background:#FFFFFF;
}
.vid-comment-widget{
-font-size:11px;
-font-weight:normal;
+ font-size:11px;
+ font-weight:normal;
}
.searchvideorow{
-padding:10px;
--moz-border-radius-topleft:5px;
--moz-border-radius-topright:5px;
--moz-border-radius-bottomleft:5px;
--moz-border-radius-bottomright:5px;
-border:1px solid #CCCCCC;
+ padding:10px;
+ -moz-border-radius-topleft:5px;
+ -moz-border-radius-topright:5px;
+ -moz-border-radius-bottomleft:5px;
+ -moz-border-radius-bottomright:5px;
+ border:1px solid #CCCCCC;
}
#videosearch-tablecontainer{
--moz-border-radius-bottomleft:5px;
--moz-border-radius-bottomright:5px;
-border:1px solid #CCCCCC;
-background:#FFF;
-padding:10px;
+ -moz-border-radius-bottomleft:5px;
+ -moz-border-radius-bottomright:5px;
+ border:1px solid #CCCCCC;
+ background:#FFF;
+ padding:10px;
}
#videosearch-interface{
-border-color:#CCCCCC;
-border-style:solid;
-border-width:0 1px 1px;
-margin-top:-15px;
-padding:15px 0 15px 20px;
+ border-color:#CCCCCC;
+ border-style:solid;
+ border-width:0 1px 1px;
+ margin-top:-15px;
+ padding:15px 0 15px 20px;
}
diff --git a/views/default/videolist/groupprofile_videolist.php b/views/default/videolist/groupprofile_videolist.php
index 1df34a7b2..d89b8e566 100644
--- a/views/default/videolist/groupprofile_videolist.php
+++ b/views/default/videolist/groupprofile_videolist.php
@@ -1,61 +1,59 @@
<?php
+/**
+ * Elgg Video Plugin
+ * This plugin allows users to create a library of videos for groups
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Prateek Choudhary <synapticfield@gmail.com>
+ * @copyright Prateek Choudhary
+ */
- /**
- * Elgg Video Plugin
- * This plugin allows users to create a library of videos for groups
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
-
?>
-<div id="filerepo_widget_layout">
+<div id="filerepo_widget_layout">
<h2><?php echo elgg_echo("videolist:group"); ?></h2>
<?php
- //the number of files to display
- $number = (int) $vars['entity']->num_display;
- if (!$number)
- $number = 5;
-
- //get the user's files
- $videos = get_user_objects($vars['entity']->guid, "videolist", $number, 0);
-
- //if there are some files, go get them
- if ($videos) {
-
- //display in list mode
- echo "<div class=\"filerepo_widget_singleitem\" style=\"width:310px;padding:5px;\">";
- foreach($videos as $f){
-
- $mime = $f->mimetype;
- $owner = get_entity($f->getOwner());
- $numcomments = elgg_count_comments($f);
- echo "<div class=\"filerepo_listview_icon\" style=\"float:left;width:90px;padding:8px 0 0 0;\"><a href=\"{$vars['url']}pg/videolist/watch/{$f->guid}\"><img src=\"".$f->thumbnail."\" border=\"0\" width=\"85\" /></a></div>";
- echo "<div class=\"filerepo_widget_content\" style=\"width:210px;margin-left:100px;\">";
- echo "<div class=\"filerepo_listview_title\"><p class=\"filerepo_title\" style=\"font-weight:normal;font-size:12px;\"><a href=\"{$vars['url']}pg/videolist/watch/{$f->guid}\">" . $f->title ."</a></p><br />by <a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a>";
- if ($numcomments)
- echo "<br /><a href=\"{$vars['url']}pg/videolist/watch/{$f->guid}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
- echo "</div>";
- echo "<div class=\"filerepo_listview_date\"><p class=\"filerepo_timestamp\"><small>" . friendly_time($f->time_created) . "</small></p></div>";
- echo "</div><div class=\"clearfloat\" style=\"height:8px;\"></div>";
-
- }
- echo "</div>";
-
- //get a link to the users files
- $users_file_url = $vars['url'] . "pg/videolist/owned/" . page_owner_entity()->username;
-
- echo "<div class=\"forum_latest\"><a href=\"{$users_file_url}\">" . elgg_echo("videolist:groupall") . "</a></div>";
-
- } else {
-
- echo "<div class=\"forum_latest\">" . elgg_echo("videolist:none") . "</div>";
+//the number of files to display
+$number = (int) $vars['entity']->num_display;
+if (!$number)
+ $number = 5;
+
+//get the user's files
+$videos = get_user_objects($vars['entity']->guid, "videolist", $number, 0);
+
+//if there are some files, go get them
+if ($videos) {
+
+ //display in list mode
+ echo "<div class=\"filerepo_widget_singleitem\" style=\"width:310px;padding:5px;\">";
+
+ foreach($videos as $f){
+ $mime = $f->mimetype;
+ $owner = get_entity($f->getOwner());
+ $numcomments = elgg_count_comments($f);
+ echo "<div class=\"filerepo_listview_icon\" style=\"float:left;width:90px;padding:8px 0 0 0;\"><a href=\"{$vars['url']}pg/videolist/watch/{$f->guid}\"><img src=\"".$f->thumbnail."\" border=\"0\" width=\"85\" /></a></div>";
+ echo "<div class=\"filerepo_widget_content\" style=\"width:210px;margin-left:100px;\">";
+ echo "<div class=\"filerepo_listview_title\"><p class=\"filerepo_title\" style=\"font-weight:normal;font-size:12px;\"><a href=\"{$vars['url']}pg/videolist/watch/{$f->guid}\">" . $f->title ."</a></p><br />by <a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a>";
+ if ($numcomments) {
+ echo "<br /><a href=\"{$vars['url']}pg/videolist/watch/{$f->guid}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
+ echo "</div>";
+ }
+ echo "<div class=\"filerepo_listview_date\"><p class=\"filerepo_timestamp\"><small>" . friendly_time($f->time_created) . "</small></p></div>";
+ echo "</div><div class=\"clearfloat\" style=\"height:8px;\"></div>";
}
+ echo "</div>";
+
+ //get a link to the users files
+ $users_file_url = $vars['url'] . "pg/videolist/owned/" . page_owner_entity()->username;
+
+ echo "<div class=\"forum_latest\"><a href=\"{$users_file_url}\">" . elgg_echo("videolist:groupall") . "</a></div>";
+
+} else {
+ echo "<div class=\"forum_latest\">" . elgg_echo("videolist:none") . "</div>";
+}
?>
<div class="clearfloat" /></div>
diff --git a/views/default/videolist/icon.php b/views/default/videolist/icon.php
index 1d25329ea..46c186db1 100644
--- a/views/default/videolist/icon.php
+++ b/views/default/videolist/icon.php
@@ -1,41 +1,38 @@
<?php
- /**
- * Elgg tidypic icon
- * Optionally you can specify a size.
- *
- * @package ElggFile
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
+/**
+ * Elgg tidypic icon
+ * Optionally you can specify a size.
+ *
+ * @package ElggFile
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+global $CONFIG;
- global $CONFIG;
-
if($vars['videolist']){
echo "<img src=\"{$CONFIG->wwwroot}mod/videolist/graphics/icons/Video_Icon.jpg\" border=\"0\" />";
-}
-else{
-
+} else {
$mime = $vars['mimetype'];
if (isset($vars['thumbnail'])) {
$thumbnail = $vars['thumbnail'];
} else {
$thumbnail = false;
}
-
+
$size = $vars['size'];
if ($size != 'large') {
$size = 'small';
}
- if ($thumbnail && strpos($mime, "image/")!==false)
+ if ($thumbnail && strpos($mime, "image/")!==false) {
echo "<img src=\"{$thumbnail}\" border=\"0\" />";
- else
- {
- if ($size == 'large')
+ } else {
+ if ($size == 'large') {
echo "<img src=\"{$thumbnail}\" border=\"0\" />";
- else
+ } else {
echo "<img src=\"{$CONFIG->wwwroot}mod/videolist/graphics/icons/Video_Icon.jpg\" border=\"0\" />";
+ }
}
-}
-?>
+} \ No newline at end of file
diff --git a/views/default/videolist/notfound.php b/views/default/videolist/notfound.php
index ec69b700c..b797c54f7 100644
--- a/views/default/videolist/notfound.php
+++ b/views/default/videolist/notfound.php
@@ -1,21 +1,19 @@
<?php
- /**
- * Elgg blog not found page
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
+/**
+ * Elgg blog not found page
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
?>
- <p>
- <?php
-
- echo elgg_echo("video:none");
-
- ?>
- </p>
+<p>
+ <?php
+ echo elgg_echo("video:none");
+ ?>
+</p>
diff --git a/views/default/widgets/videolist_view/edit.php b/views/default/widgets/videolist_view/edit.php
index 936d37c34..10ba89af9 100644
--- a/views/default/widgets/videolist_view/edit.php
+++ b/views/default/widgets/videolist_view/edit.php
@@ -1,21 +1,23 @@
<p>
- <?php echo elgg_echo("videolist:num_videos"); ?>:
-
- <?
- if($vars['entity']->num_display == '') $vars['entity']->num_display = 6;
- ?>
- <select name="params[num_display]">
- <option value="1" <?php if($vars['entity']->num_display == 1) echo "SELECTED"; ?>>1</option>
- <option value="2" <?php if($vars['entity']->num_display == 2) echo "SELECTED"; ?>>2</option>
- <option value="3" <?php if($vars['entity']->num_display == 3) echo "SELECTED"; ?>>3</option>
- <option value="4" <?php if($vars['entity']->num_display == 4) echo "SELECTED"; ?>>4</option>
- <option value="5" <?php if($vars['entity']->num_display == 5) echo "SELECTED"; ?>>5</option>
- <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option>
- <option value="7" <?php if($vars['entity']->num_display == 7) echo "SELECTED"; ?>>7</option>
- <option value="8" <?php if($vars['entity']->num_display == 8) echo "SELECTED"; ?>>8</option>
- <option value="9" <?php if($vars['entity']->num_display == 9) echo "SELECTED"; ?>>9</option>
- <option value="10" <?php if($vars['entity']->num_display == 10) echo "SELECTED"; ?>>10</option>
- <option value="15" <?php if($vars['entity']->num_display == 15) echo "SELECTED"; ?>>15</option>
- <option value="20" <?php if($vars['entity']->num_display == 20) echo "SELECTED"; ?>>20</option>
- </select>
+<?php echo elgg_echo("videolist:num_videos"); ?>:
+
+<?
+ if($vars['entity']->num_display == '') {
+ $vars['entity']->num_display = 6;
+ }
+?>
+<select name="params[num_display]">
+ <option value="1" <?php if($vars['entity']->num_display == 1) echo "SELECTED"; ?>>1</option>
+ <option value="2" <?php if($vars['entity']->num_display == 2) echo "SELECTED"; ?>>2</option>
+ <option value="3" <?php if($vars['entity']->num_display == 3) echo "SELECTED"; ?>>3</option>
+ <option value="4" <?php if($vars['entity']->num_display == 4) echo "SELECTED"; ?>>4</option>
+ <option value="5" <?php if($vars['entity']->num_display == 5) echo "SELECTED"; ?>>5</option>
+ <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option>
+ <option value="7" <?php if($vars['entity']->num_display == 7) echo "SELECTED"; ?>>7</option>
+ <option value="8" <?php if($vars['entity']->num_display == 8) echo "SELECTED"; ?>>8</option>
+ <option value="9" <?php if($vars['entity']->num_display == 9) echo "SELECTED"; ?>>9</option>
+ <option value="10" <?php if($vars['entity']->num_display == 10) echo "SELECTED"; ?>>10</option>
+ <option value="15" <?php if($vars['entity']->num_display == 15) echo "SELECTED"; ?>>15</option>
+ <option value="20" <?php if($vars['entity']->num_display == 20) echo "SELECTED"; ?>>20</option>
+</select>
</p>
diff --git a/views/default/widgets/videolist_view/view.php b/views/default/widgets/videolist_view/view.php
index aac2a288b..cd2aa37a3 100644
--- a/views/default/widgets/videolist_view/view.php
+++ b/views/default/widgets/videolist_view/view.php
@@ -1,58 +1,60 @@
<?php
/**
- * Elgg Videolist Plugin
- * This plugin allows users to create a library of youtube videos
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
+ * Elgg Videolist Plugin
+ * This plugin allows users to create a library of youtube videos
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Prateek Choudhary <synapticfield@gmail.com>
+ * @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 "<div class=\"clearfloat\"></div>";
- if ($owner_videos) {
- echo '<div id="profile_video_widget_container">';
- foreach($owner_videos as $videos){
- $url = $videos->url;
- $title = $videos->title;
- $video_id = $videos->video_id;
- $videothumbnail = $videos->thumbnail;
- echo '<div id="profile_video_image_container">';
- //get video cover image
- echo '<div id="videothumbnail-box">';
- echo "<a href='".$vars['url']."pg/videolist/watch/".$videos->guid."'>";
- echo "<img src=\"".$videothumbnail."\" width=\"75\"/>";
- echo '</a>';
- echo '</div>';
- echo '<div id="videotitle-box">';
- echo "<a href='".$vars['url']."pg/videolist/watch/".$videos->guid."'>";
- echo $title;
- echo '</a>';
- $numcomments = elgg_count_comments($videos);
- if ($numcomments)
- echo "<br /><span class='vid-comment-widget'><a href=\"".$vars['url']."pg/videolist/watch/".$videos->guid."\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a></span> <br />";
- echo '</div>';
- echo '</div>';
- }
- echo "</div>";
- echo "<div class=\"clearfloat\"></div>";
- //get a link to the users videos
- $users_video_url = $vars['url'] . "pg/videolist/owned/" . $owner->username;
- echo "<div style=\"margin-left:10px;\">";
- echo "<span class=\"profile_album_link\"><a href=\"{$users_video_url}\">" . elgg_echo('video:more') . "</a></span>";
- echo "</div>";
- echo "<div id=\"widget-boundary\"></div>";
- }
- else {
- echo elgg_echo("album:none");
+
+//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 "<div class=\"clearfloat\"></div>";
+if ($owner_videos) {
+ echo '<div id="profile_video_widget_container">';
+ foreach($owner_videos as $videos) {
+ $url = $videos->url;
+ $title = $videos->title;
+ $video_id = $videos->video_id;
+ $videothumbnail = $videos->thumbnail;
+ echo '<div id="profile_video_image_container">';
+ //get video cover image
+ echo '<div id="videothumbnail-box">';
+ echo "<a href='".$vars['url']."pg/videolist/watch/".$videos->guid."'>";
+ echo "<img src=\"".$videothumbnail."\" width=\"75\"/>";
+ echo '</a>';
+ echo '</div>';
+ echo '<div id="videotitle-box">';
+ echo "<a href='".$vars['url']."pg/videolist/watch/".$videos->guid."'>";
+ echo $title;
+ echo '</a>';
+
+ $numcomments = elgg_count_comments($videos);
+ if ($numcomments) {
+ echo "<br /><span class='vid-comment-widget'><a href=\"".$vars['url']."pg/videolist/watch/".$videos->guid."\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a></span> <br />";
}
-?>
+ echo '</div>';
+ echo '</div>';
+ }
+
+ echo "</div>";
+ echo "<div class=\"clearfloat\"></div>";
+ //get a link to the users videos
+ $users_video_url = $vars['url'] . "pg/videolist/owned/" . $owner->username;
+ echo "<div style=\"margin-left:10px;\">";
+ echo "<span class=\"profile_album_link\"><a href=\"{$users_video_url}\">" . elgg_echo('video:more') . "</a></span>";
+ echo "</div>";
+ echo "<div id=\"widget-boundary\"></div>";
+} else {
+ echo elgg_echo("album:none");
+} \ No newline at end of file