aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-05-22 01:26:47 +0000
committerCash Costello <cash.costello@gmail.com>2009-05-22 01:26:47 +0000
commitc607a2424cec501051b27ce5c1606df5b602231f (patch)
tree913146846ec14b4857ec0f4b058644ce2823f557 /start.php
parent239610b7ca432c90f9082e6359b29cefa8eed9f2 (diff)
downloadelgg-c607a2424cec501051b27ce5c1606df5b602231f.tar.gz
elgg-c607a2424cec501051b27ce5c1606df5b602231f.tar.bz2
Began coding admin settings page
Diffstat (limited to 'start.php')
-rw-r--r--start.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/start.php b/start.php
index 1881b1d31..ea5c67e2d 100644
--- a/start.php
+++ b/start.php
@@ -162,6 +162,17 @@
}
/**
+ * Sets up tidypics admin menu. Triggered on pagesetup.
+ */
+ function tidypics_adminmenu()
+ {
+ global $CONFIG;
+ if (get_context() == 'admin' && isadminloggedin()) {
+ add_submenu_item(elgg_echo('tidypics:adminsettings'), $CONFIG->url . "mod/tidypics/admin.php");
+ }
+ }
+
+ /**
* tidypics page handler
*
* @param array $page Array of page elements, forwarded by the page handling mechanism
@@ -338,6 +349,7 @@
// Make sure tidypics_init is called on initialisation
register_elgg_event_handler('init','system','tidypics_init');
register_elgg_event_handler('pagesetup','system','tidypics_submenus');
+ register_elgg_event_handler('pagesetup','system','tidypics_adminmenu');
// Register actions
register_action("tidypics/upload", false, $CONFIG->pluginspath . "tidypics/actions/upload.php");