aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-06 22:42:30 +0100
committerSem <sembrestels@riseup.net>2011-11-06 22:42:30 +0100
commit84de3a9ab57277bbaedb30c5e24070f8a5ad4431 (patch)
tree17cddf9f8a7e88395366b21aa4ec16b9cc627b2a /views/default
parentbd59fd55caede2a13ec00662152e044d2746522c (diff)
downloadelgg-84de3a9ab57277bbaedb30c5e24070f8a5ad4431.tar.gz
elgg-84de3a9ab57277bbaedb30c5e24070f8a5ad4431.tar.bz2
Videolist objects all in one view.
Diffstat (limited to 'views/default')
-rw-r--r--views/default/object/videolist_item.php (renamed from views/default/object/videolist.php)40
-rw-r--r--views/default/object/watch.php52
2 files changed, 38 insertions, 54 deletions
diff --git a/views/default/object/videolist.php b/views/default/object/videolist_item.php
index d67d35b23..35946579b 100644
--- a/views/default/object/videolist.php
+++ b/views/default/object/videolist_item.php
@@ -7,8 +7,9 @@
/*****************************************************************************************/
$video_file = $vars['entity'];
+$full_view = $vars['full_view'];
-if(!empty($video_file)) {
+if(!$full_view) {
$url = $video_file->url;
$title = $video_file->title;
$video_guid = $video_file->guid;
@@ -50,5 +51,40 @@ if(!empty($video_file)) {
echo "<div class='video_entity'>".elgg_view_listing($icon, $info)."</div>";
}
} else {
- echo "<p class='margin_top'>".elgg_echo('videolist:none:found')."</p>";
+ $videodiv = '';
+ $width = "600";
+ $height = "400";
+ $file = $vars['entity'];
+
+ $videos = get_entity($vars['entity']);
+ $title = $videos->title;
+ $url = $videos->url;
+ $videoid = $videos->video_id;
+ $tags = $videos->tags;
+
+ $videodiv .= "<div class='video_view'>";
+
+ // display any tags for the Video
+ if (!empty($tags)) {
+ $videodiv .= "<p class='tags margin_none'>";
+ $videodiv .= elgg_view('output/tags',array('value' => $tags));
+ $videodiv .= "</p>";
+ }
+
+ if ($videos->videotype == "youtube") {
+ $videodiv .= "<br /><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><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://{$url}&hl=en&fs=1&showinfo=0&autoplay=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"$width\" height=\"$height\" wmode=\"transparent\"></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 .= "<br /><embed src=\"http://www.metacafe.com/fplayer/".$videoid."\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\" wmode=\"transparent\" name=\"Metacafe_".$videoid_id."\"></embed>";
+ } else if($videos->videotype == "vimeo") {
+ $videodiv .= "<br /><object width=\"$width\" height=\"$height\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"wmode\" value=\"transparent\"></param><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\" wmode=\"transparent\"></embed></object>";
+ }
+
+ $videodiv .= "</div>";
+ $videodiv .= elgg_view_comments($videos);
+ print $videodiv;
}
diff --git a/views/default/object/watch.php b/views/default/object/watch.php
deleted file mode 100644
index 5a35bd0ac..000000000
--- a/views/default/object/watch.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/**
-* Elgg Videolist Plugin -
-* 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>
-* @copyright Prateek Choudhary
-*/
-
-$videodiv = '';
-$width = "600";
-$height = "400";
-$file = $vars['entity'];
-if(isset($vars['entity'])) {
- $videos = get_entity($vars['entity']);
- $title = $videos->title;
- $url = $videos->url;
- $videoid = $videos->video_id;
- $tags = $videos->tags;
-
- $videodiv .= "<div class='video_view'>";
-
- // view for plugins to extend
- $videodiv .= elgg_view('videolist/options', array('entity' => $videos)) .
- elgg_view_likes($videos); // include likes
-
- // display any tags for the Video
- if (!empty($tags)) {
- $videodiv .= "<p class='tags margin_none'>";
- $videodiv .= elgg_view('output/tags',array('value' => $tags));
- $videodiv .= "</p>";
- }
-
- if ($videos->videotype == "youtube") {
- $videodiv .= "<br /><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><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://{$url}&hl=en&fs=1&showinfo=0&autoplay=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"$width\" height=\"$height\" wmode=\"transparent\"></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 .= "<br /><embed src=\"http://www.metacafe.com/fplayer/".$videoid."\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\" wmode=\"transparent\" name=\"Metacafe_".$videoid_id."\"></embed>";
- } else if($videos->videotype == "vimeo") {
- $videodiv .= "<br /><object width=\"$width\" height=\"$height\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"wmode\" value=\"transparent\"></param><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\" wmode=\"transparent\"></embed></object>";
- }
-
- $videodiv .= "</div>";
- $videodiv .= elgg_view_comments($videos);
- print $videodiv;
-} \ No newline at end of file