diff options
author | Cash Costello <cash.costello@gmail.com> | 2010-07-25 02:01:36 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2010-07-25 02:01:36 +0000 |
commit | 73403645808a81425381f43c25e0ea2c92705312 (patch) | |
tree | 83fb73e9a122054f6f4c2e1c44e399572ee13e28 /pages/tagged.php | |
parent | 791ec4925346cb38ecca9a2f2574b012ab64a88a (diff) | |
download | elgg-73403645808a81425381f43c25e0ea2c92705312.tar.gz elgg-73403645808a81425381f43c25e0ea2c92705312.tar.bz2 |
first go at brining tidypics up to code standards
Diffstat (limited to 'pages/tagged.php')
-rw-r--r-- | pages/tagged.php | 96 |
1 files changed, 47 insertions, 49 deletions
diff --git a/pages/tagged.php b/pages/tagged.php index b5a879809..34ea8a709 100644 --- a/pages/tagged.php +++ b/pages/tagged.php @@ -1,50 +1,48 @@ <?php - /** - * Tidypics Tagged Listing - * - * List all photos tagged with a user - */ - - include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"; - - - // Get user guid - $guid = get_input('guid'); - - $user = get_entity($guid); - - if ($user) - $title = sprintf(elgg_echo('tidypics:usertag'), $user->name); - else - $title = "User does not exist"; - - - - // create main column - $body = elgg_view_title($title); - - set_context('search'); - set_input('search_viewtype', 'gallery'); // need to force gallery view - $body .= list_entities_from_relationship('phototag', $guid, false, 'object', 'image', 0, 10, false); - - // Set up submenus - if (isloggedin()) { - add_submenu_item( elgg_echo("album:yours"), - $CONFIG->wwwroot . "pg/photos/owned/" . $_SESSION['user']->username, - 'tidypics-b' ); - } - add_submenu_item( elgg_echo('album:all'), - $CONFIG->wwwroot . "pg/photos/world/", - 'tidypics-z'); - add_submenu_item( elgg_echo('tidypics:mostrecent'), - $CONFIG->wwwroot . 'pg/photos/mostrecent', - 'tidypics-z'); - - - - $body = elgg_view_layout('two_column_left_sidebar','',$body); - - - page_draw($title,$body); - -?>
\ No newline at end of file +/** + * Tidypics Tagged Listing + * + * List all photos tagged with a user + */ + +include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"; + + +// Get user guid +$guid = get_input('guid'); + +$user = get_entity($guid); + +if ($user) { + $title = sprintf(elgg_echo('tidypics:usertag'), $user->name); +} else { + $title = "User does not exist"; +} + + +// create main column +$body = elgg_view_title($title); + +set_context('search'); +set_input('search_viewtype', 'gallery'); // need to force gallery view +$body .= list_entities_from_relationship('phototag', $guid, false, 'object', 'image', 0, 10, false); + +// Set up submenus +if (isloggedin()) { + add_submenu_item( elgg_echo("album:yours"), + $CONFIG->wwwroot . "pg/photos/owned/" . $_SESSION['user']->username, + 'tidypics-b' ); +} +add_submenu_item( elgg_echo('album:all'), + $CONFIG->wwwroot . "pg/photos/world/", + 'tidypics-z'); +add_submenu_item( elgg_echo('tidypics:mostrecent'), + $CONFIG->wwwroot . 'pg/photos/mostrecent', + 'tidypics-z'); + + + +$body = elgg_view_layout('two_column_left_sidebar', '', $body); + + +page_draw($title, $body); |