-
Notifications
You must be signed in to change notification settings - Fork 0
/
pcgwvector.php
executable file
·69 lines (60 loc) · 1.87 KB
/
pcgwvector.php
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/*
* @file
* @ingroup Skins
*/
if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
}
$wgExtensionCredits['skin'][] = array (
'path' => __FILE__,
'name' => 'PCGW Vector',
'descriptionmsg' => 'pcgwvector-desc',
'author' => array( 'Stanisław Gackowski', 'Andrew Tsai'),
'url' => "https://github.com/PCGamingWiki/pcgwvector",
'license-name' => 'GPL-2.0+',
);
$wgValidSkinNames['pcgwvector'] = 'PCGWVector';
$wgHooks['GetPreferences'][] = 'wfPrefHook';
function wfPrefHook( $user, &$preferences ) {
$preferences['pcgwvector-googleads'] = array(
'type' => 'toggle',
'label-message' => 'tog-googleads',
'section' => 'rendering/skin',
);
$preferences['pcgwvector-sidebaripb'] = array(
'type' => 'toggle',
'label-message' => 'tog-sidebaripb',
'section' => 'rendering/skin',
);
$preferences['pcgwvector-headersupport'] = array(
'type' => 'toggle',
'label-message' => 'tog-headersupport',
'section' => 'rendering/skin',
);
$preferences['pcgwvector-headersocial'] = array(
'type' => 'toggle',
'label-message' => 'tog-headersocial',
'section' => 'rendering/skin',
);
$preferences['pcgwvector-headerquotes'] = array(
'type' => 'toggle',
'label-message' => 'tog-headerquotes',
'section' => 'rendering/skin',
);
return true;
}
$wgDefaultUserOptions['pcgwvector-googleads'] = 0;
$wgDefaultUserOptions['pcgwvector-sidebaripb'] = 1;
$wgDefaultUserOptions['pcgwvector-headersupport'] = 1;
$wgDefaultUserOptions['pcgwvector-headersocial'] = 1;
$wgDefaultUserOptions['pcgwvector-headerquotes'] = 1;
$wgAutoloadClasses['SkinPCGWVector'] = dirname(__FILE__).'/PCGWVector.skin.php';
$wgMessagesDirs['PCGWVector'] = __DIR__ . '/i18n';
$wgResourceModules['skins.pcgwvector'] = array(
'styles' => array(
'pcgwvector/css/screen.css' => array( 'media' => 'screen' ),
),
'remoteBasePath' => &$GLOBALS['wgStylePath'],
'localBasePath' => &$GLOBALS['wgStyleDirectory'],
);