diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-08-22 15:10:42 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-08-22 15:10:42 +0000 |
commit | 3c7ff4340f018d6b70cf8f2dd60de0250d3fcb66 (patch) | |
tree | 00aa120b631e00a3305d8e5b12db54332d95cada /pages/viewalbum.php | |
parent | 4546f4f1e55042cebc9c77c84a37974ff01c08ff (diff) | |
download | elgg-3c7ff4340f018d6b70cf8f2dd60de0250d3fcb66.tar.gz elgg-3c7ff4340f018d6b70cf8f2dd60de0250d3fcb66.tar.bz2 |
moved core pages to new pages structure
Diffstat (limited to 'pages/viewalbum.php')
-rw-r--r-- | pages/viewalbum.php | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pages/viewalbum.php b/pages/viewalbum.php new file mode 100644 index 000000000..b451b6993 --- /dev/null +++ b/pages/viewalbum.php @@ -0,0 +1,58 @@ +<?php
+
+ /**
+ * Tidypics Album View Page
+ *
+ * This displays a listing of all the photos that belong to an album
+ */
+
+ include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php";
+
+ // if this page belongs to a closed group, prevent anyone outside group from seeing
+ if (is_callable('group_gatekeeper')) group_gatekeeper();
+
+ // get the album entity
+ $album_guid = (int) get_input('guid');
+ $album = get_entity($album_guid);
+
+ // panic if we can't get it
+ if (!$album) forward();
+
+ // container should always be set, but just in case
+ if ($album->container_guid)
+ set_page_owner($album->container_guid);
+ else
+ set_page_owner($album->owner_guid);
+
+ $owner = page_owner_entity();
+
+ // setup group menu
+ if ($owner instanceof ElggGroup) {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $owner->username);
+ }
+
+ if (can_write_to_container(0, $album->container_guid)) {
+ if ($owner instanceof ElggGroup) {
+ add_submenu_item( elgg_echo('album:create'),
+ $CONFIG->wwwroot . 'pg/photos/new/' . $owner->username,
+ 'photos');
+ }
+ add_submenu_item( elgg_echo('album:addpix'),
+ $CONFIG->wwwroot . 'pg/photos/upload/' . $album_guid,
+ 'photos');
+ add_submenu_item( elgg_echo('album:edit'),
+ $CONFIG->wwwroot . 'pg/photos/edit/' . $album_guid,
+ 'photos');
+ add_submenu_item( elgg_echo('album:delete'),
+ $CONFIG->wwwroot . 'pg/photos/delete/' . $album_guid,
+ 'photos',
+ true);
+ }
+
+ // create body
+ $area2 = elgg_view_entity($album, true);
+ $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
+
+ page_draw($album->title, $body);
+?>
\ No newline at end of file |