diff options
-rw-r--r-- | all.php | 5 | ||||
-rw-r--r-- | friends.php | 12 | ||||
-rw-r--r-- | index.php | 4 |
3 files changed, 14 insertions, 7 deletions
@@ -21,9 +21,10 @@ if ($page_owner === false || is_null($page_owner)) { } $title = sprintf(elgg_echo("videolist:search")); - +// get the filter menu +$friend_link = $CONFIG->wwwroot . "pg/videolist/friends/" . $page_owner->username; // Get objects -$area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'videolist')); +$area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'videolist', 'friend_link' => $friend_link)); set_input('show_viewtype', 'all'); $area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'videolist', 'limit' => 10, 'full_view' => TRUE, 'view_type_toggle' => FALSE, 'pagination' => TRUE)); // include a view for plugins to extend diff --git a/friends.php b/friends.php index dc0bd35ad..86e3b0fd3 100644 --- a/friends.php +++ b/friends.php @@ -11,16 +11,20 @@ // Start engine require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); - -// get the filter menu -$area1 = elgg_view("page_elements/content_header", array('context' => "friends", 'type' => 'videolist')); +global $CONFIG; + $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 = $CONFIG->wwwroot . "pg/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); @@ -38,7 +38,9 @@ $title = sprintf(elgg_echo("videolist:home"), "$owner->name"); //set videolist header if(page_owner() == get_loggedin_userid()) { - $area1 .= elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'videolist')); + // get the filter menu + $friend_link = $CONFIG->wwwroot . "pg/videolist/friends/" . $page_owner->username; + $area1 .= elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'videolist', 'friend_link' => $friend_link)); }elseif(page_owner_entity() instanceof ElggGroup){ $area1 .= elgg_view('navigation/breadcrumbs'); $area1 .= elgg_view('videolist/group_video_header'); |