diff options
author | Nick Whitt <nick.whitt@gmail.com> | 2010-05-24 21:30:17 +0000 |
---|---|---|
committer | Nick Whitt <nick.whitt@gmail.com> | 2010-05-24 21:30:17 +0000 |
commit | 2ed508ec1f416f31ccc058f160f78b7adf144f6c (patch) | |
tree | a7d6d89b84c5d37551d0b0b2575331ce8c27865a /start.php | |
parent | 04f814d1de0d42ae0c6d7043a6f86a687ec981bc (diff) | |
download | elgg-2ed508ec1f416f31ccc058f160f78b7adf144f6c.tar.gz elgg-2ed508ec1f416f31ccc058f160f78b7adf144f6c.tar.bz2 |
Updating plugin to use new administration links and canvas.
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 32 |
1 files changed, 13 insertions, 19 deletions
@@ -27,17 +27,17 @@ } // Extend CSS - extend_view('css', 'tidypics/css'); + elgg_extend_view('css', 'tidypics/css'); // Extend hover-over and profile menu - extend_view('profile/menu/links','tidypics/hover_menu'); + elgg_extend_view('profile/menu/links','tidypics/hover_menu'); //group view ** psuedo widget view for group pages** - extend_view('groups/right_column','tidypics/groupprofile_albums'); + elgg_extend_view('groups/right_column','tidypics/groupprofile_albums'); // rss extensions - extend_view('extensions/xmlns', 'extensions/tidypics/xmlns'); - extend_view('extensions/channel', 'extensions/tidypics/channel'); + elgg_extend_view('extensions/xmlns', 'extensions/tidypics/xmlns'); + elgg_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,7 +72,13 @@ } // slideshow plugin hook - register_plugin_hook('tp_slideshow', 'album', 'tidypics_slideshow'); + 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'); } /** @@ -197,17 +203,6 @@ } } - - /** - * 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 @@ -416,7 +411,7 @@ $slideshow_link = "javascript:PicLensLite.start({maxScale:0,feedUrl:location.href+'?view=rss'})"; // add the slideshow javascript to the header - extend_view('metatags', 'tidypics/js/slideshow'); + elgg_extend_view('metatags', 'tidypics/js/slideshow'); return $slideshow_link; } @@ -429,7 +424,6 @@ // 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"); |