From b09bca9dbeec1e10e28fb80b7c9f0c4ebd7a7707 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 23 Aug 2009 01:20:37 +0000 Subject: condensed most recent list pages into one instead of 3 --- start.php | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'start.php') diff --git a/start.php b/start.php index 53b2c17c4..ba8d90aac 100644 --- a/start.php +++ b/start.php @@ -115,7 +115,7 @@ } add_submenu_item( elgg_echo('tidypics:yourmostrecent'), - $CONFIG->wwwroot . 'pg/photos/yourmostrecent', + $CONFIG->wwwroot . 'pg/photos/mostrecent/' . $_SESSION['user']->username, 'tidypics-a'); } else if (isloggedin()) { // logged in not owner gets "your albums", "page owners albums", "page owner's friends albums", "page owner's most viewed", "page owner's most recent" @@ -130,7 +130,7 @@ } add_submenu_item( elgg_echo('tidypics:yourmostrecent'), - $CONFIG->wwwroot . 'pg/photos/yourmostrecent', + $CONFIG->wwwroot . 'pg/photos/mostrecent/' . $_SESSION['user']->username, 'tidypics-b'); if($page_owner->name) { // check to make sure the owner set their display name @@ -148,7 +148,7 @@ } add_submenu_item( sprintf(elgg_echo('tidypics:friendmostrecent'),$page_owner->name), - $CONFIG->wwwroot . "pg/photos/friendmostrecent/". $page_owner->username, + $CONFIG->wwwroot . "pg/photos/mostrecent/". $page_owner->username, 'tidypics-a'); } } else if ($page_owner->guid) { @@ -286,7 +286,7 @@ break; case "mostrecent": - if (isset($page[1])) set_input('guid',$page[1]); + if (isset($page[1])) set_input('username',$page[1]); include($CONFIG->pluginspath . "tidypics/pages/lists/mostrecentimages.php"); break; @@ -295,21 +295,11 @@ include($CONFIG->pluginspath . "tidypics/pages/lists/yourmostviewed.php"); break; - case "yourmostrecent": - if (isset($page[1])) set_input('guid',$page[1]); - include($CONFIG->pluginspath . "tidypics/pages/lists/yourmostrecent.php"); - break; - case "friendmostviewed": if (isset($page[1])) set_input('guid',$page[1]); include($CONFIG->pluginspath . "tidypics/pages/lists/friendmostviewed.php"); break; - case "friendmostrecent": - if (isset($page[1])) set_input('guid',$page[1]); - include($CONFIG->pluginspath . "tidypics/pages/lists/friendmostrecent.php"); - break; - case "recentlyviewed": if (isset($page[1])) set_input('guid',$page[1]); include($CONFIG->pluginspath . "tidypics/pages/lists/recentlyviewed.php"); @@ -398,10 +388,6 @@ return $CONFIG->url . "pg/photos/album/" . $entity->getGUID() . "/" . $title; } - function tp_mostrecentimages($max = 8, $pagination = true) { - return list_entities("object", "image", 0, $max, false, false, $pagination); - } - // Make sure tidypics_init is called on initialisation register_elgg_event_handler('init','system','tidypics_init'); register_elgg_event_handler('pagesetup','system','tidypics_submenus'); -- cgit v1.2.3