blob: 73e4da5816bad0320b2443ab61c6947c89a3cbdd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<?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 ) {
$pages['GameAccount'] = 'GameAccountPage';
$pages['GameNews'] = 'GameNewsPage';
}
}
|