diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
commit | 4766f36a4d74924f21ff329c4318ce4e069ffa04 (patch) | |
tree | 969b84632f2a8b0db79788a8a6db8e41d63e5cb4 /mod/notifications/start.php | |
parent | 57a217fd6b708844407486046a1faa23b46cac08 (diff) | |
download | elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.gz elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.bz2 |
Pulled in the interface changes.
git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/notifications/start.php')
-rw-r--r-- | mod/notifications/start.php | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/mod/notifications/start.php b/mod/notifications/start.php new file mode 100644 index 000000000..a08fe68f5 --- /dev/null +++ b/mod/notifications/start.php @@ -0,0 +1,47 @@ +<?php + + /** + * Elgg notifications plugin + * + * @package ElggNotifications + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider Ltd + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + */ + + + /** + * Notification settings page setup function + * + */ + function notifications_plugin_pagesetup() { + global $CONFIG; + if (get_context() == 'settings') { + add_submenu_item(elgg_echo('notifications:subscriptions:changesettings'), $CONFIG->wwwroot . "mod/notifications/"); + if (is_plugin_enabled('groups')) + add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), $CONFIG->wwwroot . "mod/notifications/groups.php"); + } + } + + function notifications_plugin_init() { + elgg_extend_view('css','notifications/css'); + global $CONFIG; + + // Unset the default user settings hook + if (isset($CONFIG->hooks['usersettings:save']['user'])) + foreach($CONFIG->hooks['usersettings:save']['user'] as $key => $function) { + if ($function == 'notification_user_settings_save') + unset($CONFIG->hooks['usersettings:save']['user'][$key]); + } + } + + register_elgg_event_handler('pagesetup','system','notifications_plugin_pagesetup',1000); + register_elgg_event_handler('init','system','notifications_plugin_init',1000); + + // Register action + global $CONFIG; + register_action("notificationsettings/save",false,$CONFIG->pluginspath . "notifications/actions/save.php"); + register_action("notificationsettings/groupsave",false,$CONFIG->pluginspath . "notifications/actions/groupsave.php"); + +?>
\ No newline at end of file |