-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LocalSettings.php
365 lines (303 loc) · 11.4 KB
/
LocalSettings.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<?php
require_once "/external_includes/PrivateSettings.php";
# This file was automatically generated by the MediaWiki 1.39.3
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See docs/Configuration.md for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "SPCodex";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "";
$wgArticlePath = "/$1";
$actions = array( 'view', 'edit', 'watch', 'unwatch', 'delete','revert', 'rollback', 'protect', 'unprotect', 'markpatrolled', 'render', 'submit', 'history', 'purge', 'info' );
foreach ( $actions as $action ) {
$wgActionPaths[$action] = "/$action/$1";
}
## The protocol and server name to use in fully-qualified URLs
$wgServer = "https://spcodex.wiki";
## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;
## The URL paths to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogos = [
'1x' => "$wgResourceBasePath/images/SPCodex.svg",
'wordmark' => [
"src" => "$wgResourceBasePath/images/SPCodex-inline.png",
"width" => 120,
"height" => 19,
],
#'icon' => "$wgResourceBasePath/images/Spcodex-apple-touch-icon.png",
];
$wgFavicon = "$wgResourceBasePath/images/SPCodex-Favicon.png";
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgSMTP = [
#'host' => 'ssl://smtp.gmail.com',
'host' => 'ssl://mail.hover.com',
'IDHost' => 'spcodex.wiki',
'port' => 465,
'username' => $wmgSmtpUsername,
'password' => $wmgSmtpPassword,
'auth' => true,
];
$wgEmergencyContact = "[email protected]";
$wgPasswordSender = "[email protected]";
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;
# MySQL specific settings
$wgDBprefix = "";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# Shared database table
# This has no effect unless $wgSharedDB is also set.
$wgSharedTables[] = "actor";
## Shared memory and cache settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];
$wgParserCacheType = CACHE_DB;
$wgParserCacheExpireTime = 60 * 60 * 24 * 30;
$wgResourceLoaderMaxage = [
'versioned' => 30 * 24 * 60 * 60, // 30 days
'unversioned' => 30 * 24 * 60 * 60
];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = true;
$wgFileExtensions[] = 'svg';
$wgFileExtensions[] = 'webp';
$wgAllowCopyUploads = true;
$wgCopyUploadsFromSpecialUpload = true;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = true;
# Site language code, should be one of the list in ./includes/languages/data/Names.php
$wgLanguageCode = "en";
# Time zone
$wgLocaltimezone = "UTC";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publicly accessible from the web.
$wgCacheDirectory = "$IP/cache";
# File caching for logged-out users
$wgUseFileCache = true;
$wgUseGzip = true;
# Rate limiting reads from disruptive bots
#$wgRateLimits['read']['anon'] = [ 3, 1 ];
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "2";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "https://creativecommons.org/licenses/by-sa/4.0/";
$wgRightsText = "Creative Commons Attribution-ShareAlike 4.0 (CC BY-SA 4.0)";
$wgRightsIcon = "$wgResourceBasePath/resources/assets/licenses/cc-by-sa.png";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
## Default skin: you can change the default skin. Use the internal symbolic
## names, e.g. 'vector' or 'monobook':
$wgDefaultSkin = "vector-2022";
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'MinervaNeue' );
wfLoadSkin( 'Vector' );
# Enabled extensions. Most of the extensions are enabled by adding
# wfLoadExtension( 'ExtensionName' );
# to LocalSettings.php. Check specific extension documentation for more details.
# The following extensions were automatically enabled:
wfLoadExtension( 'AbuseFilter' );
wfLoadExtension( 'Cargo' );
wfLoadExtension( 'CategoryTree' );
wfLoadExtension( 'Cite' );
wfLoadExtension( 'CiteThisPage' );
wfLoadExtension( 'CodeEditor' );
wfLoadExtension( 'CodeMirror' );
wfLoadExtension( 'ConfirmEdit' );
#wfLoadExtension( 'ConfirmEdit/hCaptcha' );
wfLoadExtension( 'ConfirmEdit/QuestyCaptcha' );
wfLoadExtension( 'ContactPage' );
wfLoadExtension( 'DarkMode' );
wfLoadExtension( 'Disambiguator' );
wfLoadExtension( 'DiscussionTools' );
wfLoadExtension( 'Echo' );
#wfLoadExtension( 'Flow' );
wfLoadExtension( 'Gadgets' );
wfLoadExtension( 'GeoData' );
wfLoadExtension( 'InputBox' );
wfLoadExtension( 'Interwiki' );
wfLoadExtension( 'JsonConfig' );
wfLoadExtension( 'Kartographer' );
wfLoadExtension( 'LabeledSectionTransclusion' );
wfLoadExtension( 'Linter' );
wfLoadExtension( 'MobileFrontend' );
wfLoadExtension( 'MultimediaViewer' );
wfLoadExtension( 'Nuke' );
wfLoadExtension( 'OATHAuth' );
wfLoadExtension( 'PageForms' );
wfLoadExtension( 'PageImages' );
wfLoadExtension( 'ParserFunctions' );
#wfLoadExtension( 'PlaceNewSection' );
wfLoadExtension( 'Poem' );
wfLoadExtension( 'Popups' );
wfLoadExtension( 'ReplaceText' );
wfLoadExtension( 'Scribunto' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
wfLoadExtension( 'TemplateData' );
wfLoadExtension( 'TemplateSandbox' );
wfLoadExtension( 'TemplateStyles' );
wfLoadExtension( 'TemplateWizard' );
wfLoadExtension( 'TextExtracts' );
wfLoadExtension( 'Thanks' );
wfLoadExtension( 'Timeline' );
wfLoadExtension( 'UploadWizard' );
wfLoadExtension( 'UrlShortener' );
wfLoadExtension( 'Variables' );
wfLoadExtension( 'VEForAll' );
wfLoadExtension( 'VisualEditor' );
wfLoadExtension( 'WikiEditor' );
wfLoadExtension( 'WikiSEO' );
wfLoadExtension( 'YouTube' );
# End of automatically generated settings.
# Add more configuration options below.
# $wgShowExceptionDetails = true;
# Custom namespaces
define("NS_TAB", 3000);
define("NS_TAB_TALK", 3001);
$wgExtraNamespaces[NS_TAB] = 'Tab';
$wgExtraNamespaces[NS_TAB_TALK] = 'Tab_talk';
# We consider the tabs to be content
$wgContentNamespaces[] = NS_TAB;
# Kartographer
$wgKartographerMapServer = "https://tile.openstreetmap.org";
# ParserFunctions
$wgPFEnableStringFunctions = true;
# Job queue
$wgJobRunRate = 0;
# Logging
$wgDBerrorLog = '/var/log/mediawiki/dberror.log';
$wgDebugLogGroups = [
'exception' => '/var/log/mediawiki/exception.log',
'resourceloader' => '/var/log/mediawiki/resourceloader.log',
'ratelimit' => '/var/log/mediawiki/ratelimit.log',
];
# Memory
$wgMemoryLimit = '200M';
# Display titles
$wgRestrictDisplayTitle = false;
# MobileFrontend / Minerva
$wgMinervaTalkAtTop['base'] = true;
$wgMinervaPersonalMenu['base'] = true;
$wgMinervaHistoryInPageActions['base'] = true;
$wgMinervaShowCategories['base'] = true;
$wgMinervaAlwaysShowLanguageButton = false;
# VisualEditor
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
# ContactPage
$wgContactConfig['default'] = [
'RecipientUser' => 'MusikAnimal', // Must be the name of a valid account which also has a verified e-mail-address added to it.
'SenderName' => 'Contact Form on ' . $wgSitename, // "Contact Form on" needs to be translated
'SenderEmail' => null, // Defaults to $wgPasswordSender, may be changed as required
'RequireDetails' => true, // Either "true" or "false" as required
'IncludeIP' => true, // Either "true" or "false" as required
'MustBeLoggedIn' => false, // Check if the user is logged in before rendering the form. Either "true" or "false" as required
'AdditionalFields' => [
'Text' => [
'label-message' => 'emailmessage',
'type' => 'textarea',
'rows' => 20,
'required' => true, // Either "true" or "false" as required
],
],
'DisplayFormat' => 'table', // See HTMLForm documentation for available values.
'RLModules' => [], // Resource loader modules to add to the form display page.
'RLStyleModules' => [] // Resource loader CSS modules to add to the form display page.
];
$wgCaptchaTriggers['contactpage'] = true;
$wgHooks['SkinAddFooterLinks'][] = function( Skin $skin, string $key, array &$footerlinks ) {
global $wgServer;
if ( $key === 'places' ) {
$footerlinks['contact'] = Html::element( 'a',
[
'href' => "$wgServer/Special:Contact", // URL to "Special:Contact"
'rel' => 'noreferrer noopener' // not required, but recommended for security reasons
],
$skin->msg( 'contactpage-label' )->text()
);
};
};
# ConfirmEdit / QuestyCaptcha
$wgCaptchaTriggers['createaccount'] = true;
# DiscussionTools
$wgDiscussionToolsEnable = true;
$wgExtraSignatureNamespaces = [NS_PROJECT];
# VisualEditor
$wgVisualEditorAvailableNamespaces = [
'SPCodex' => true,
];
# Popups
$wgPopupsReferencePreviewsBetaFeature = false;
# External links
# $wgExternalLinkTarget = '_blank';
# UrlShortener
$wgUrlShortenerTemplate = '/r/$1';
# CodeMirror
$wgDefaultUserOptions['usecodemirror'] = 1;
# UploadWizard
$wgUploadWizardConfig['tutorial']['skip'] = true;
$wgUploadWizardConfig['uwLanguages'] = ['en' => 'English'];
$wgUploadWizardConfig['licenses'] = [
'non-free-album-cover' => [
'msg' => 'non-free-album-cover',
'icons' => [ 'copyright' ],
],
'non-free-image' => [
'msg' => 'non-free-image',
'icons' => [ 'copyright' ],
],
'cc-by-nc-sa-4.0' => [
'msg' => 'mwe-upwiz-license-cc-by-nc-sa-4.0',
'icons' => [ 'cc-by', 'cc-nc', 'cc-sa' ],
'url' => '//creativecommons.org/licenses/by-nc-sa/4.0/',
],
];
# Scribunto
$wgScribuntoEngineConf['luastandalone']['cpuLimit'] = 20;
# Permissions
#$wgGroupPermissions['*']['runcargoqueries'] = false; // Security reasons
$wgGroupPermissions['*']['urlshortener-create-url'] = false;
$wgGroupPermissions['user']['urlshortener-create-url'] = true;
$wgGroupPermissions['sysop']['interwiki'] = true;
$wgGroupPermissions['sysop']['runcargoqueries'] = true;
$wgGroupPermissions['sysop']['deletechangetags'] = true;
$wgGroupPermissions['sysop']['deletelogentry'] = true;
$wgGroupPermissions['sysop']['deleterevision'] = true;
$wgGroupPermissions['user']['upload_by_url'] = true;
# Add Autopatrolled
$wgGroupPermissions['autopatrolled']['autopatrol'] = true;
$wgAllowSiteCSSOnRestrictedPages = true;
$wgLocaltimezone = "UTC";
date_default_timezone_set( $wgLocaltimezone );
$wgFragmentMode = [ 'html5' ];
#$wgShowExceptionDetails = true;