diff options
author | Wushin <pasekei@gmail.com> | 2014-11-16 22:27:32 -0600 |
---|---|---|
committer | Wushin <pasekei@gmail.com> | 2014-11-16 22:27:32 -0600 |
commit | 6f37a79665408c3531842851fc6c3efabfe50a07 (patch) | |
tree | 6e8dc2a26e61bfe6ba61af731208fc07a8b2536e /extensions/tmwa/frontend/TMWAccountUI.setup.php | |
parent | e41baa4c3aeb5f2b05fb928c1bf13e6a9bb130a7 (diff) | |
parent | 294e5d28e70d1709520c3fbb78464edb557f638b (diff) | |
download | website-6f37a79665408c3531842851fc6c3efabfe50a07.tar.gz website-6f37a79665408c3531842851fc6c3efabfe50a07.tar.bz2 website-6f37a79665408c3531842851fc6c3efabfe50a07.tar.xz website-6f37a79665408c3531842851fc6c3efabfe50a07.zip |
Merge pull request #9 from wushin/www-to-wiki
Www to wiki
Diffstat (limited to 'extensions/tmwa/frontend/TMWAccountUI.setup.php')
-rw-r--r-- | extensions/tmwa/frontend/TMWAccountUI.setup.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/extensions/tmwa/frontend/TMWAccountUI.setup.php b/extensions/tmwa/frontend/TMWAccountUI.setup.php new file mode 100644 index 0000000..9ff8800 --- /dev/null +++ b/extensions/tmwa/frontend/TMWAccountUI.setup.php @@ -0,0 +1,35 @@ +<?php +/** + * Class containing hooked functions for a TMWAccount environment + */ +class TMWAccountUISetup { + /** + * Register TMWAccount hooks. + * @param $hooks Array $wgHooks (assoc array of hooks and handlers) + * @return void + */ + public static function defineHookHandlers( array &$hooks ) { + # Make sure "login / create account" notice still as "create account" + $hooks['PersonalUrls'][] = 'TMWAccountUIHooks::setRequestLoginLinks'; + # Add notice of where to request an account at UserLogin + $hooks['UserCreateForm'][] = 'TMWAccountUIHooks::addRequestLoginText'; + $hooks['UserLoginForm'][] = 'TMWAccountUIHooks::addRequestLoginText'; + # Status header like "new messages" bar + $hooks['BeforePageDisplay'][] = 'TMWAccountUIHooks::tmwAccountsNotice'; + # Register admin pages for AdminLinks extension. + $hooks['AdminLinks'][] = 'TMWAccountUIHooks::tmwAccountAdminLinks'; + } + + /** + * Register TMWAccount special pages as needed. + * @param $pages Array $wgSpecialPages (list of special pages) + * @param $groups Array $wgSpecialPageGroups (assoc array of special page groups) + * @return void + */ + public static function defineSpecialPages( array &$pages, array &$groups ) { + $pages['GameAccount'] = 'GameAccountPage'; + $groups['GameAccount'] = 'login'; + $pages['GameNews'] = 'GameNewsPage'; + $groups['GameNews'] = 'changes'; + } +} |