aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--all.php5
-rw-r--r--friends.php12
-rw-r--r--index.php4
3 files changed, 14 insertions, 7 deletions
diff --git a/all.php b/all.php
index 7318da3c6..e601a34f5 100644
--- a/all.php
+++ b/all.php
@@ -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);
diff --git a/index.php b/index.php
index 35989bb42..c36458579 100644
--- a/index.php
+++ b/index.php
@@ -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');