aboutsummaryrefslogtreecommitdiff
path: root/pages/lightbox/view.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 15:04:14 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 15:04:14 -0300
commit66dd3f3f5f14bb0ba6d2c7ef83b5b612d5ee2e30 (patch)
tree6002cbd9db40b15b4e67a67d5669644f86e4dbde /pages/lightbox/view.php
downloadelgg-66dd3f3f5f14bb0ba6d2c7ef83b5b612d5ee2e30.tar.gz
elgg-66dd3f3f5f14bb0ba6d2c7ef83b5b612d5ee2e30.tar.bz2
Squashed 'mod/lightbox/' content from commit a83b8d8
git-subtree-dir: mod/lightbox git-subtree-split: a83b8d89691c31b4568f47790fb40d0bc962aca5
Diffstat (limited to 'pages/lightbox/view.php')
-rw-r--r--pages/lightbox/view.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/pages/lightbox/view.php b/pages/lightbox/view.php
new file mode 100644
index 000000000..6fa703895
--- /dev/null
+++ b/pages/lightbox/view.php
@@ -0,0 +1,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);