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
35
36
37
38
39
|
<?php
/**
* View an album or an image
*
* @package ElggLightbox
*/
$entity = get_entity(get_input('guid'));
$owner = $entity->getContainerEntity();
elgg_push_breadcrumb(elgg_echo('lightbox'), 'photos/all');
$crumbs_title = $owner->name;
if (elgg_instanceof($owner, 'group')) {
elgg_push_breadcrumb($crumbs_title, "photos/group/$owner->guid/all");
} else {
elgg_push_breadcrumb($crumbs_title, "photos/owner/$owner->username");
}
if($entity->countEntitiesFromRelationship('in_album', true) > 0) {
$album = $entity->getEntitiesFromRelationship('in_album', true, 1);
elgg_push_breadcrumb($album[0]->title, $album[0]->getURL());
}
$title = $entity->title;
elgg_push_breadcrumb($title);
$content = elgg_view_entity($entity, array('full_view' => true));
$content .= elgg_view_comments($entity);
$body = elgg_view_layout('content', array(
'content' => $content,
'title' => $title,
'filter' => '',
));
echo elgg_view_page($title, $body);
|