Repository navigation
Expand file tree
/
Copy pathOverclocked.php
More file actions
executable file
·125 lines (112 loc) · 3.91 KB
/
Copy pathOverclocked.php
File metadata and controls
executable file
·125 lines (112 loc) · 3.91 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Skins
*/
if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
}
$GLOBALS['wgExtensionCredits']['skin'][] = array(
'path' => __FILE__,
'name' => 'Overclocked',
'namemsg' => 'skinname-overclocked',
'descriptionmsg' => 'overclocked-desc',
'author' => 'PCGamingWiki Team',
'url' => "https://github.com/PCGamingWiki/Overclocked",
'license-name' => 'GPL-2.0+',
);
$GLOBALS['wgAutoloadClasses']['SkinOverclocked'] = __DIR__ . '/Overclocked.skin.php';
$GLOBALS['wgMessagesDirs']['Overclocked'] = __DIR__ . '/i18n';
$GLOBALS['wgValidSkinNames']['overclocked'] = 'Overclocked';
$GLOBALS['wgHooks']['GetPreferences'][] = 'wfPrefHook';
function wfPrefHook( $user, &$preferences ) {
$preferences['overclocked-ads'] = array(
'type' => 'toggle',
'label-message' => 'tog-ads',
'section' => 'rendering/skin',
);
$preferences['overclocked-floating-toc'] = array(
'type' => 'toggle',
'label-message' => 'tog-floating-toc',
'section' => 'rendering/skin',
);
return true;
}
$GLOBALS['wgDefaultUserOptions']['overclocked-ads'] = 0;
$GLOBALS['wgDefaultUserOptions']['overclocked-floating-toc'] = 0;
$GLOBALS['wgResourceModules']['skins.overclocked.styles'] = array(
// 1.43: SkinModule provides base content styles via features (plain file module gave none)
'class' => 'MediaWiki\\ResourceLoader\\SkinModule',
'features' => array(
'normalize', 'elements', 'content-media', 'content-links',
'content-tables', 'interface', 'interface-category',
'i18n-ordered-lists', 'i18n-headings',
),
'styles' => array(
'resources/general-header.less',
'resources/general-footer.less',
'resources/general-personalbar.less',
'resources/general-toc.less',
'resources/general-inputfields.less',
'resources/general-specialpages.less',
'resources/pcgw.less',
'resources/pcgw-templates.less',
'resources/pcgw-icons.less',
'resources/mediawiki.custom.less',
'resources/mediawiki.mediaviewer.overrides.less',
'resources/page-home.less',
'resources/page-extension.less',
'resources/page-donate.less',
'resources/page-editing-guide.less',
'resources/other.less',
),
'remoteSkinPath' => 'overclocked',
'localBasePath' => __DIR__,
);
$GLOBALS['wgResourceModules']['skins.overclocked.js'] = array(
'scripts' => array(
'resources/jquery/jquery.waypoints.min.js',
'resources/jquery/jquery.ba-outside-events.min.js',
'resources/pcgw.js',
),
'remoteSkinPath' => 'overclocked',
'localBasePath' => __DIR__,
);
$GLOBALS['wgResourceModuleSkinStyles']['overclocked'] = array(
'mediawiki.special.preferences' => 'resources/mediawiki.special.preferences.less',
'remoteSkinPath' => 'overclocked',
'localBasePath' => __DIR__,
);
/**
* Ad set up - set these in your LocalSettings.php
* header - banner above article body
* sidebar - in sidebar (not visible on mobile)
* footer - above footer, below content
* infobox - intended for a square ad above infobox
*/
$GLOBALS['wgSkinOverclockedAds'] = array(
'tag' => '',
'header' => '',
'sidebar' => '',
'footer' => '',
'infobox' => '',
);
/**
* NitroPay site ID - set per wiki in LocalSettings.php. 0 omits the ad script.
*/
$GLOBALS['wgSkinOverclockedNitroPaySiteId'] ??= 0;