-
Notifications
You must be signed in to change notification settings - Fork 0
/
LocalSettings.php
250 lines (190 loc) · 8.08 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
<?php
# This file was automatically generated by the MediaWiki 1.38.1
# 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 = "wizzypedia";
$wgMetaNamespace = "Wizzypedia";
$wgShowExceptionDetails = true;
## 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 = "";
## The protocol and server name to use in fully-qualified URLs
$wgServer = "https://wizzypedia.forgottenrunes.com";
## 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/resources/assets/square-logo.png",
'icon' => "$wgResourceBasePath/resources/assets/change-your-logo-icon.svg",
];
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "[email protected]";
$wgPasswordSender = "[email protected]";
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = false;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = getenv("DB_SERVER");
$wgDBname = getenv("DB_NAME");
$wgDBuser = getenv("DB_USER");
$wgDBpassword = getenv("DB_PASS");
# 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 settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg');
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;
# 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 = false;
# Site language code, should be one of the list in ./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";
$wgSecretKey = getenv("SECRET_KEY");
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = getenv("UPGRADE_KEY");
## 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 = "";
$wgRightsText = "";
$wgRightsIcon = "";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
wfLoadSkin( 'Vector' );
$wgDefaultSkin = 'vector';
$wgFavicon = $wgScriptPath . "/resources/assets/favicon.png";
$wgAllowExternalImages = true;
## https://www.mediawiki.org/wiki/Manual:$wgMaxAnimatedGifArea
$wgMaxAnimatedGifArea = 1000000000;
wfLoadExtension( 'AWS' );
// Configure AWS credentials.
// THIS IS NOT NEEDED if your EC2 instance has an IAM instance profile.
$wgAWSCredentials = [
'key' => getenv("S3_KEY"),
'secret' => getenv("S3_SECRET"),
'token' => false
];
$wgAWSRegion = 'us-east-1'; # Northern Virginia
// Replace <something> with the name of your S3 bucket, e.g. wonderfulbali234.
$wgAWSBucketName = getenv("S3_NAME");
// If you anticipate using several hundred buckets, one per wiki, then it's probably better to use one bucket
// with the top level subdirectory as the wiki's name, and permissions properly configured of course.
// While there are no more performance losses by using such a scheme, it might make things messy. Hence, it's
// still a good idea to use one bucket per wiki unless you are approaching your 1,000 bucket per account limit.
// $wgAWSBucketTopSubdirectory = "/$wgDBname"; # leading slash is required
$wgAWSBucketTopSubdirectory = "/ttqfd9eooxmdfdav"; # leading slash is required
//Extensions (we should move this into one big array at some point)
wfLoadExtension( 'VisualEditor' );
wfLoadExtension( 'TemplateStyles' );
wfLoadExtension( 'UploadWizard' );
wfLoadExtension( 'Scribunto' );
wfLoadExtension( 'Cargo' );
wfLoadExtension( 'DataTransfer' );
wfLoadExtension( 'PageForms' );
wfLoadExtension( 'ParserFunctions' );
$wgPFEnableStringFunctions = true;
wfLoadExtension( 'Poem' );
wfLoadExtension( 'Nuke' );
wfLoadExtension( 'WikiEditor' );
wfLoadExtension( 'CodeEditor' );
$wgDefaultUserOptions['usebetatoolbar'] = 1;
wfLoadExtension( 'ImageMap' );
// wfLoadExtension( 'ConfirmAccount' );
// $wgGroupPermissions['*']['createaccount'] = false;
// $wgGroupPermissions['bureaucrat']['createaccount'] = true;
// $wgGroupPermissions['sysop']['createaccount'] = true;
// $wgConfirmAccountRequestFormItems = [
// 'UserName' => [ 'enabled' => true ],
// 'RealName' => [ 'enabled' => false ],
// 'Biography' => [ 'enabled' => false, 'minWords' => 50 ],
// 'AreasOfInterest' => [ 'enabled' => false ],
// 'CV' => [ 'enabled' => false ],
// 'Notes' => [ 'enabled' => true ],
// 'Links' => [ 'enabled' => false ],
// 'TermsOfService' => [ 'enabled' => false ],
// ];
wfLoadExtension( 'TwitterTag' );
wfLoadExtension( 'AutoSitemap' );
$wgAutoSitemap["notify"] = [
'https://www.google.com/webmasters/sitemaps/ping?sitemap=https://wizzypedia.forgottenrunes.com/sitemap.xml',
];
$wgAutoSitemap["priority"] = 0.5;
// Enable Popups extension
wfLoadExtensions( [
'TextExtracts',
'PageImages',
'Popups'
] );
$wgPopupsHideOptInOnPreferencesPage = true;
$wgScribuntoDefaultEngine = 'luastandalone';
//$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/app/extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua';
# End of automatically generated settings.
# Add more configuration options below.
$wgUploadWizardConfig = [
'tutorial' => [
'skip' => true
], // Skip the tutorial
'defaults' => [
// Initial value for the description field.
'description' => 'Uploaded by UploadWizard'
]
];
// Group permissions
// Anonymous users can't create pages or edit pages
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgArticlePath = "/$1";
// https://phabricator.wikimedia.org/T310013
$wgShowEXIF = function_exists( 'exif_read_data' );
// Custom page protection
$wgGroupPermissions['barren-group'] = $wgGroupPermissions['autoconfirmed'];
# add an additional protection level restricting edit/move/etc. to users with the "barren" permission
$wgRestrictionLevels[] = 'barren';
# give the "barren" permission to users in the "barren-group" group
$wgGroupPermissions['barren-group']['barren'] = true;
# give the "barren" permission to sysops (needed so sysops can apply this protection level to pages)
$wgGroupPermissions['sysop']['barren'] = true;
$wgGroupPermissions['*']['createaccount'] = false;