aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorNick Whitt <nick.whitt@gmail.com>2010-05-24 21:30:17 +0000
committerNick Whitt <nick.whitt@gmail.com>2010-05-24 21:30:17 +0000
commit2ed508ec1f416f31ccc058f160f78b7adf144f6c (patch)
treea7d6d89b84c5d37551d0b0b2575331ce8c27865a /start.php
parent04f814d1de0d42ae0c6d7043a6f86a687ec981bc (diff)
downloadelgg-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.php32
1 files changed, 13 insertions, 19 deletions
diff --git a/start.php b/start.php
index 02f0c6414..c447c2a34 100644
--- a/start.php
+++ b/start.php
@@ -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");