diff options
author | Cash Costello <cash.costello@gmail.com> | 2010-07-24 20:30:52 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2010-07-24 20:30:52 +0000 |
commit | 39eaa3450e32756944dcefc940f39fd1d4cb719d (patch) | |
tree | dd5ef503a0af55f571da56af9dbb8000af332dd4 /start.php | |
parent | 2ed508ec1f416f31ccc058f160f78b7adf144f6c (diff) | |
download | elgg-39eaa3450e32756944dcefc940f39fd1d4cb719d.tar.gz elgg-39eaa3450e32756944dcefc940f39fd1d4cb719d.tar.bz2 |
undid the 1.8 changes that leaked into trunk
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 31 |
1 files changed, 19 insertions, 12 deletions
@@ -30,14 +30,14 @@ elgg_extend_view('css', 'tidypics/css'); // Extend hover-over and profile menu - elgg_extend_view('profile/menu/links','tidypics/hover_menu'); + extend_view('profile/menu/links','tidypics/hover_menu'); //group view ** psuedo widget view for group pages** - elgg_extend_view('groups/right_column','tidypics/groupprofile_albums'); + extend_view('groups/right_column','tidypics/groupprofile_albums'); // rss extensions - elgg_extend_view('extensions/xmlns', 'extensions/tidypics/xmlns'); - elgg_extend_view('extensions/channel', 'extensions/tidypics/channel'); + extend_view('extensions/xmlns', 'extensions/tidypics/xmlns'); + extend_view('extensions/channel', 'extensions/tidypics/channel'); // Register a page handler, so we can have nice URLs register_page_handler('photos','tidypics_page_handler'); @@ -72,13 +72,7 @@ } // slideshow plugin hook - register_plugin_hook('tp_slideshow', 'album', 'tidypics_slideshow'); - - elgg_add_submenu_item(array( - 'text' => elgg_echo('tidypics:administration'), - 'href' => "{$CONFIG->wwwroot}mod/tidypics/pages/admin.php", - 'parent_id' => 'site', - ), 'admin', 'default'); + register_plugin_hook('tp_slideshow', 'album', 'tidypics_slideshow'); } /** @@ -205,6 +199,18 @@ } /** + * Sets up tidypics admin menu. Triggered on pagesetup. + */ + function tidypics_adminmenu() + { + global $CONFIG; + + if (get_context() == 'admin' && isadminloggedin()) { + add_submenu_item(elgg_echo('tidypics:administration'), $CONFIG->url . "mod/tidypics/pages/admin.php"); + } + } + + /** * Sets up submenus for tidypics most viewed pages */ function tidypics_mostviewed_submenus() { @@ -411,7 +417,7 @@ $slideshow_link = "javascript:PicLensLite.start({maxScale:0,feedUrl:location.href+'?view=rss'})"; // add the slideshow javascript to the header - elgg_extend_view('metatags', 'tidypics/js/slideshow'); + extend_view('metatags', 'tidypics/js/slideshow'); return $slideshow_link; } @@ -424,6 +430,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/settings", false, $CONFIG->pluginspath . "tidypics/actions/settings.php"); |