aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorGreg Froese <greg.froese@gmail.com>2009-05-10 23:36:42 +0000
committerGreg Froese <greg.froese@gmail.com>2009-05-10 23:36:42 +0000
commit0911bafdcddddd2104e696e6fb44cd77247ade7b (patch)
treecc668805470738d0b4edde0b39778e297598d51c /start.php
parentfe1cce6c8cbf2ee781619ff21b571518aa1a28e9 (diff)
downloadelgg-0911bafdcddddd2104e696e6fb44cd77247ade7b.tar.gz
elgg-0911bafdcddddd2104e696e6fb44cd77247ade7b.tar.bz2
adding in most viewed and recent images pages
Diffstat (limited to 'start.php')
-rw-r--r--start.php34
1 files changed, 28 insertions, 6 deletions
diff --git a/start.php b/start.php
index 0d1b167d4..bbe665229 100644
--- a/start.php
+++ b/start.php
@@ -91,12 +91,14 @@
add_submenu_item( elgg_echo("album:yours"),
$CONFIG->wwwroot . "pg/photos/owned/" . $_SESSION['user']->username,
'tidypics' );
- add_submenu_item( sprintf(elgg_echo("album:user"), $page_owner->name),
- $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username,
- 'tidypics' );
- add_submenu_item( sprintf(elgg_echo('album:friends'),$page_owner->name),
- $CONFIG->wwwroot . "pg/photos/friends/". $page_owner->username,
- 'tidypics');
+ if($page_owner->name) {
+ add_submenu_item( sprintf(elgg_echo("album:user"), $page_owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username,
+ 'tidypics' );
+ add_submenu_item( sprintf(elgg_echo('album:friends'),$page_owner->name),
+ $CONFIG->wwwroot . "pg/photos/friends/". $page_owner->username,
+ 'tidypics');
+ }
} else if ($page_owner->guid) {
// non logged in user gets "page owners albums", "page owner's friends albums"
add_submenu_item( sprintf(elgg_echo("album:user"), $page_owner->name),
@@ -110,6 +112,11 @@
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');
}
}
@@ -170,7 +177,21 @@
case "world":
include($CONFIG->pluginspath . "tidypics/world.php");
break;
+
+ case "rate": //rate image
+ if (isset($page[1])) set_input('guid',$page[1]);
+ include($CONFIG->pluginspath . "tidypics/actions/rate.php");
+ break;
+ case "mostviewed": //view an image individually
+ if (isset($page[1])) set_input('guid',$page[1]);
+ include($CONFIG->pluginspath . "tidypics/mostviewedimages.php");
+ break;
+
+ case "mostrecent": //view an image individually
+ if (isset($page[1])) set_input('guid',$page[1]);
+ include($CONFIG->pluginspath . "tidypics/mostrecentimages.php");
+ break;
}
}
else
@@ -255,5 +276,6 @@
register_action("tidypics/edit_multi", false, $CONFIG->pluginspath. "tidypics/actions/edit_multi.php");
register_action("tidypics/download", true, $CONFIG->pluginspath . "tidypics/actions/download.php");
register_action("tidypics/addtag", true, $CONFIG->pluginspath . "tidypics/actions/addtag.php");
+ register_action("tidypics/rate", true, $CONFIG->pluginspath . "tidypics/actions/rate.php");
?> \ No newline at end of file