aboutsummaryrefslogtreecommitdiff
path: root/pages/lightbox/friends.php
blob: 6b0bbb03e1679dfe3cfc0e0a3c268101deac16e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
 * Friends albums
 *
 * @package ElggLightbox
 */

$owner = elgg_get_page_owner_entity();
if (!$owner) {
	forward('photos/all');
}

elgg_push_breadcrumb(elgg_echo('lightbox'), "photos/all");
elgg_push_breadcrumb($owner->name, "photos/owner/$owner->username");
elgg_push_breadcrumb(elgg_echo('friends'));

elgg_register_title_button();

$title = elgg_echo("lightbox:friends");

// offset is grabbed in list_user_friends_objects
$content = list_user_friends_objects($owner->guid, 'albums', 10, false);
if (!$content) {
	$content = elgg_echo("lightbox:none");
}

$body = elgg_view_layout('content', array(
	'filter_context' => 'friends',
	'content' => $content,
	'title' => $title,
	'sidebar' => $sidebar,
));

echo elgg_view_page($title, $body);