From 5bce7bbbf5ede5b6e4a2db367ba995c33ea4e458 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Mon, 11 May 2009 12:16:11 +0000 Subject: beginning to fix recent/most viewed - this commit uses elgg_echo for display strings on menu --- languages/en.php | 2 ++ start.php | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/languages/en.php b/languages/en.php index 538a46c60..c36ecd25e 100644 --- a/languages/en.php +++ b/languages/en.php @@ -22,6 +22,8 @@ 'tidypics:settings:maxfilesize' => "Maximum file size in kilo bytes (KB):", 'tidypics:enablephotos' => 'Enable Group Photo Albums', 'tidypics:editprops' => 'Edit Image Properties', + 'tidypics:mostviewed' => 'Most viewed images', + 'tidypics:mostrecent' => 'Most recent images', //actions diff --git a/start.php b/start.php index bbe665229..1f05f03da 100644 --- a/start.php +++ b/start.php @@ -87,11 +87,11 @@ $CONFIG->wwwroot . "pg/photos/friends/". $page_owner->username, 'tidypics'); } else if (isloggedin()) { - // logged nut not owner gets "your albums", "page owners albums", "page owner's friends albums" + // logged in not owner gets "your albums", "page owners albums", "page owner's friends albums" add_submenu_item( elgg_echo("album:yours"), $CONFIG->wwwroot . "pg/photos/owned/" . $_SESSION['user']->username, 'tidypics' ); - if($page_owner->name) { + if($page_owner->name) { // check to make sure the owner set their display name add_submenu_item( sprintf(elgg_echo("album:user"), $page_owner->name), $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username, 'tidypics' ); @@ -112,11 +112,12 @@ add_submenu_item( sprintf(elgg_echo('album:all'),$page_owner->name), $CONFIG->wwwroot . "pg/photos/world/", 'tidypics'); - add_submenu_item( "Most Viewed Images", - $CONFIG->wwwroot . 'pg/photos/mostviewed'); - - add_submenu_item( "Most Recent Images", - $CONFIG->wwwroot . 'pg/photos/mostrecent'); + add_submenu_item( elgg_echo('tidypics:mostviewed'), + $CONFIG->wwwroot . 'pg/photos/mostviewed', + 'tidypics'); + add_submenu_item( elgg_echo('tidypics:mostrecent'), + $CONFIG->wwwroot . 'pg/photos/mostrecent', + 'tidypics'); } } @@ -183,12 +184,12 @@ include($CONFIG->pluginspath . "tidypics/actions/rate.php"); break; - case "mostviewed": //view an image individually + case "mostviewed": if (isset($page[1])) set_input('guid',$page[1]); include($CONFIG->pluginspath . "tidypics/mostviewedimages.php"); break; - case "mostrecent": //view an image individually + case "mostrecent": if (isset($page[1])) set_input('guid',$page[1]); include($CONFIG->pluginspath . "tidypics/mostrecentimages.php"); break; -- cgit v1.2.3