From 3c7ff4340f018d6b70cf8f2dd60de0250d3fcb66 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 22 Aug 2009 15:10:42 +0000 Subject: moved core pages to new pages structure --- pages/ownedalbums.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pages/ownedalbums.php (limited to 'pages/ownedalbums.php') diff --git a/pages/ownedalbums.php b/pages/ownedalbums.php new file mode 100644 index 000000000..a28020216 --- /dev/null +++ b/pages/ownedalbums.php @@ -0,0 +1,51 @@ +username) || empty($owner->username)) { + forward('pg/photos/world'); + } + + + // setup group menu for album index + 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, $owner->guid)) { + add_submenu_item( elgg_echo('album:create'), + $CONFIG->wwwroot . 'pg/photos/new/' . $owner->username, + 'tidypics'); + } + } + + //set the title + $title = sprintf(elgg_echo('album:user'), $owner->name); + $area2 = elgg_view_title($title); + + // Get objects + set_context('search'); + set_input('search_viewtype', 'gallery'); + if ($owner instanceof ElggGroup) + $area2 .= list_entities("object", "album", $owner->guid, 12); + else + $area2 .= list_entities("object", "album", $owner->guid, 12); + + set_context('photos'); + $body = elgg_view_layout('two_column_left_sidebar', '', $area2); + + // Finally draw the page + page_draw($title, $body); +?> \ No newline at end of file -- cgit v1.2.3