diff options
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 34 |
1 files changed, 28 insertions, 6 deletions
@@ -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 |