diff options
author | Sem <sembrestels@riseup.net> | 2011-11-03 21:18:37 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2011-11-03 21:18:37 +0100 |
commit | df7ae7792a78e33d1cd31bc99ad34f4e0940eb21 (patch) | |
tree | a9a886d659e2f7dca9834563430cbfdffee67892 /pages/videolist/friends.php | |
parent | bf9e75cf3ebbf8b68f90cf5e1784254c31270896 (diff) | |
download | elgg-df7ae7792a78e33d1cd31bc99ad34f4e0940eb21.tar.gz elgg-df7ae7792a78e33d1cd31bc99ad34f4e0940eb21.tar.bz2 |
Upgraded pagehandler.
Diffstat (limited to 'pages/videolist/friends.php')
-rw-r--r-- | pages/videolist/friends.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pages/videolist/friends.php b/pages/videolist/friends.php new file mode 100644 index 000000000..8d90ae1a3 --- /dev/null +++ b/pages/videolist/friends.php @@ -0,0 +1,45 @@ +<?php +/** + * Elgg Video Plugin + * This plugin allows users to create a library of youtube/vimeo/metacafe videos + * + * @package Elgg + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Prateek Choudhary <synapticfield@gmail.com> + * @copyright Prateek Choudhary + */ + +// Start engine +require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); + +$page_owner = page_owner_entity(); +if ($page_owner === false || is_null($page_owner)) { + $page_owner = $_SESSION['user']; + set_page_owner($page_owner->getGUID()); +} + +// get the filter menu +$friend_link = elgg_get_site_url() . "videolist/friends/" . $page_owner->username; +// get the filter menu +$area1 = elgg_view("page_elements/content_header", array('context' => "friends", 'type' => 'videolist', 'friend_link' => $friend_link)); + +// List videos +set_context('search'); +$area2 .= list_user_friends_objects($page_owner->getGUID(), 'videolist', 10, false, false); +set_context('videolist'); + +// include a view for plugins to extend +$area3 = elgg_view("videolist/sidebar", array("object_type" => 'videolist')); + +// fetch & display latest comments on friends videos +$comments = get_annotations(0, "object", "videolist", "generic_comment", "", 0, 4, 0, "desc"); +$area3 .= elgg_view('annotation/latest_comments', array('comments' => $comments)); + +// tag-cloud display +$area3 .= display_tagcloud(0, 50, 'tags', 'object', 'videolist'); + +// Format page +$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3); + +// Draw it +echo page_draw(elgg_echo('videolist:friends'),$body); |