diff options
author | Pete Harris <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-30 14:23:05 +0000 |
---|---|---|
committer | Pete Harris <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-30 14:23:05 +0000 |
commit | 05129a184b2c88cf082ebf230a3dce7b6510ec8f (patch) | |
tree | 744402f97eba2cb76978224eb48c75850604d58f /views/default/object | |
parent | 4fa7aaa7e363514dc2def25cceafd8cf4333404c (diff) | |
download | elgg-05129a184b2c88cf082ebf230a3dce7b6510ec8f.tar.gz elgg-05129a184b2c88cf082ebf230a3dce7b6510ec8f.tar.bz2 |
Further updates to VideoList UI. Search results styled to match new elgg list style. Videos from search now play in popup modal with screen greyed out. Individual video page now has edit and delete, breadcrumbs, latest comments etc..
Diffstat (limited to 'views/default/object')
-rw-r--r-- | views/default/object/videolist.php | 4 | ||||
-rw-r--r-- | views/default/object/watch.php | 34 |
2 files changed, 21 insertions, 17 deletions
diff --git a/views/default/object/videolist.php b/views/default/object/videolist.php index 4563f04b4..19015384a 100644 --- a/views/default/object/videolist.php +++ b/views/default/object/videolist.php @@ -40,13 +40,13 @@ if(!empty($video_file)) { if(get_input('show_viewtype') == "all") { $info .= '<p class="entity_title"><a href="' .$watch_URL. '">'.$title.'</a></p>'; - $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}"; + $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}pg/videolist/owned/{$owner->username}\">{$owner->name}</a> {$friendlytime}"; $info .= "</p>"; $icon = "<a class='video_icon' href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>"; echo "<div class='video_entity'>".elgg_view_listing($icon, $info)."</div>"; } else { $info .= '<p class="entity_title"><a href="' .$watch_URL. '">'.$title.'</a></p>'; - $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}"; + $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}pg/videolist/owned/{$owner->username}\">{$owner->name}</a> {$friendlytime}"; $info .= "</p>"; $icon = "<a class='video_icon' href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>"; echo "<div class='video_entity'>".elgg_view_listing($icon, $info)."</div>"; diff --git a/views/default/object/watch.php b/views/default/object/watch.php index 66fde240f..f8dd1ceac 100644 --- a/views/default/object/watch.php +++ b/views/default/object/watch.php @@ -1,13 +1,14 @@ <?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 - */ +* 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"; @@ -17,24 +18,27 @@ if(isset($vars['entity'])) { $title = $videos->title; $url = $videos->url; $videoid = $videos->video_id; - $videodiv = "<h2>".$title."</h2>"; + + $videodiv .= "<div class='video_view'>"; + + // view for plugins to extend + $videodiv .= elgg_view('videolist/options', array('entity' => $videos)); + 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>"; + $videodiv .= "<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 .= "<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."&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=".$videoid."&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\"></embed></object>"; + $videodiv .= "<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."&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=".$videoid."&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"$width\" height=\"$height\"></embed></object>"; } + $videodiv .= "<br />".elgg_view_likes($videos); $videodiv .= "</div>"; - $videodiv .= elgg_view_likes($videos); $videodiv .= elgg_view_comments($videos); print $videodiv; - - //echo elgg_view_comments($videos); }
\ No newline at end of file |