-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSkrifo.settings.php
362 lines (306 loc) · 12.7 KB
/
Skrifo.settings.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
<?php
##############
# NAMESPACES #
##############
$wgExtraNamespaces = array(
100 => "Skriptum",
101 => "Skriptum_Diskussion",
102 => "Prüfungsfragen",
103 => "Prüfungsfragen_Diskussion",
104 => "Fragenausarbeitung",
105 => "Fragenausarbeitung_Diskussion"
);
define("NS_SKRIPTUM", 100);
define("NS_SKRIPTUM_TALK", 101);
define("NS_PFRAGEN", 102);
define("NS_PFRAGEN_TALK", 103);
define("NS_FRAGENA", 104);
define("NS_FRAGENA_TALK", 105);
$wgNamespacesWithSubpages += array(
NS_SKRIPTUM => true,
NS_PFRAGEN => true,
NS_FRAGENA => true
);
$wgNamespacesToBeSearchedDefault += array(
NS_SKRIPTUM => true,
NS_PFRAGEN => true,
NS_FRAGENA => true,
NS_FILE => true
);
$wgNamespacesToBeSearchedDefault[NS_MAIN] = false;
$wgNamespaceAliases = array(
'Skrifo' => NS_PROJECT
);
$wgContentNamespaces = array (
NS_MAIN,
NS_SKRIPTUM,
NS_PFRAGEN,
NS_FRAGENA
);
## only users with 'editinterface' right (sysops) can edit critical namespaces
$wgNamespaceProtection[NS_TEMPLATE] = array('editinterface');
$wgNamespaceProtection[NS_CATEGORY] = array('editinterface');
$wgNamespaceProtection[NS_PROJECT] = array('editinterface');
$wgNamespaceProtection[152] = array('editinterface');
$wgNamespaceProtection[154] = array('editinterface');
$wgNamespaceProtection[156] = array('editinterface');
$wgNamespaceProtection[158] = array('editinterface');
$wgNamespaceProtection[170] = array('editinterface');
####################
# HIDE PREFERENCES #
####################
$wgHiddenPrefs[] = 'gender';
$wgHiddenPrefs[] = 'skin';
$wgHiddenPrefs[] = 'imagesize';
$wgHiddenPrefs[] = 'thumbsize';
$wgHiddenPrefs[] = 'date';
$wgHiddenPrefs[] = 'timecorrection';
$wgHiddenPrefs[] = 'rows';
$wgHiddenPrefs[] = 'cols';
$wgHiddenPrefs[] = 'editsectiononrightclick';
$wgHiddenPrefs[] = 'editondblclick';
$wgHiddenPrefs[] = 'showtoolbar';
$wgHiddenPrefs[] = 'externaleditor';
$wgHiddenPrefs[] = 'externaldiff';
$wgHiddenPrefs[] = 'editfont';
$wgHiddenPrefs[] = 'rcdays';
$wgHiddenPrefs[] = 'rclimit';
$wgHiddenPrefs[] = 'hideminor';
$wgHiddenPrefs[] = 'usenewrc';
$wgHiddenPrefs[] = 'hidepatrolled';
$wgHiddenPrefs[] = 'newpageshidepatrolled';
$wgHiddenPrefs[] = 'watchlisthidebots';
$wgHiddenPrefs[] = 'watchlisthideanons';
$wgHiddenPrefs[] = 'watchlisthideliu';
$wgHiddenPrefs[] = 'smw-prefs-ask-options-tooltip-display';
$wgHiddenPrefs[] = 'smw-prefs-ask-options-collapsed-default';
$wgHiddenPrefs[] = 'srf-prefs-datatables-options-update-default';
$wgHiddenPrefs[] = 'srf-prefs-datatables-options-cache-default';
$wgHiddenPrefs[] = 'srf-prefs-eventcalendar-options-update-default';
$wgHiddenPrefs[] = 'srf-prefs-eventcalendar-options-paneview-default';
$wgHiddenPrefs[] = 'language';
$wgHiddenPrefs[] = 'underline';
$wgHiddenPrefs[] = 'stubthreshold';
$wgHiddenPrefs[] = 'showhiddencats';
$wgHiddenPrefs[] = 'numberheadings';
$wgHiddenPrefs[] = 'diffonly';
$wgHiddenPrefs[] = 'norollbackdiff';
$wgDefaultUserOptions['watchlistdays'] = 90;
$wgDefaultUserOptions['watchlisthideown'] = 1;
$wgDefaultUserOptions['watchlisthidebots'] = 1;
###############
# PERMISSIONS #
###############
$wgGroupPermissions['*']['edit'] = false; # no editing for non-registered users
$wgGroupPermissions['user']['move'] = false; # no right to move pages for registered users
## stewards
$wgGroupPermissions['Steward']['delete'] = true;
$wgGroupPermissions['Steward']['deletedhistory'] = true; # can view deleted history entries, but not see or restore the text
$wgGroupPermissions['Steward']['undelete'] = true;
$wgGroupPermissions['Steward']['editusercssjs'] = true;
$wgGroupPermissions['Steward']['import'] = true;
$wgGroupPermissions['Steward']['importupload'] = true;
$wgGroupPermissions['Steward']['move'] = true;
$wgGroupPermissions['Steward']['move-subpages'] = true;
$wgGroupPermissions['Steward']['patrol'] = true;
$wgGroupPermissions['Steward']['autopatrol'] = true;
$wgGroupPermissions['Steward']['protect'] = true;
$wgGroupPermissions['Steward']['proxyunbannable'] = true;
$wgGroupPermissions['Steward']['rollback'] = true;
$wgGroupPermissions['Steward']['unwatchedpages'] = true;
$wgGroupPermissions['Steward']['autoconfirmed'] = true;
$wgGroupPermissions['Steward']['upload_by_url'] = true;
$wgGroupPermissions['Steward']['ipblock-exempt'] = true;
$wgGroupPermissions['Steward']['blockemail'] = true;
$wgGroupPermissions['Steward']['markbotedits'] = true;
$wgGroupPermissions['Steward']['apihighlimits'] = true;
$wgGroupPermissions['Steward']['browsearchive'] = true;
$wgGroupPermissions['Steward']['noratelimit'] = true;
$wgGroupPermissions['Steward']['movefile'] = true;
$wgGroupPermissions['Steward']['administrate'] = true; # "administration"-link will show up in toolbox
$wgGroupPermissions['sysop']['administrate'] = true;
## oversighting
$wgGroupPermissions['bureaucrat']['deleterevision'] = true;
$wgGroupPermissions['bureaucrat']['hideuser'] = true;
$wgGroupPermissions['bureaucrat']['suppressrevision'] = true;
$wgGroupPermissions['bureaucrat']['suppressionlog'] = true;
## all rights for parsoid (via localhost)
if ( isset( $_SERVER['REMOTE_ADDR'] ) && $_SERVER['REMOTE_ADDR'] == '127.0.0.1' ) {
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = true;
}
$wgAddGroups['sysop'][] = 'Steward';
$wgRemoveGroups['sysop'][] = 'Steward';
$wgImplicitGroups[] = 'bot';
$wgImplicitGroups[] = 'smwadministrator';
$wgAutoPromote = array();
########
# SKIN #
########
wfLoadSkin( 'Tweeki' );
$wgDefaultSkin = 'tweeki';
$wgTweekiSkinHideable = array( 'firstHeading', 'sidebar-left', 'sidebar-right' );
$wgTweekiSkinUseTooltips = true;
$wgTweekiSkinUseBootstrapTheme = false;
// Custom Bootstrap Styles
$wgTweekiSkinCustomizedBootstrap = array(
'localBasePath' => __DIR__,
'remoteExtPath' => 'Skrifo'
);
// Custom Page Renderer
$wgTweekiSkinPageRenderer = 'SkrifoHooks::PageRenderer';
// Custom CSS
$wgTweekiSkinCustomCSS[] = 'x.skrifo.styles';
// Navigational Elements for Skrifo
$wgTweekiSkinSpecialElements['STUDIENRICHTUNGEN'] = 'SkrifoNavigation::Studienrichtungen';
$wgTweekiSkinSpecialElements['FOOTER'] = 'SkrifoNavigation::Footer';
$wgTweekiSkinSpecialElements['SKRIFO-DOWNLOAD'] = 'SkrifoNavigation::Download';
$wgTweekiSkinSpecialElements['SKRIFO-WATCH'] = 'SkrifoNavigation::Watch';
$wgTweekiSkinSpecialElements['SKRIFO-TOTOP'] = 'SkrifoNavigation::ToTop';
$wgTweekiSkinNavigationalElements['SKRIFO-EDIT'] = 'SkrifoNavigation::Edit';
$wgTweekiSkinNavigationalElements['SKRIFO-LERNUNTERLAGEN'] = 'SkrifoNavigation::Lernunterlagen';
$wgTweekiSkinSpecialElements['SKRIFO-DATEIEN'] = 'SkrifoNavigation::Dateien';
$wgTweekiSkinSpecialElements['LOGIN-EXT'] = 'SkrifoNavigation::Login';
$wgTweekiSkinSpecialElements['SKRIFO-EDITHINT'] = 'SkrifoNavigation::EditHint';
##############
# EXTENSIONS #
##############
wfLoadExtension( 'TemplateData' );
// Set this to true to enable the TemplateData GUI editor
$wgTemplateDataUseGUI = true;
require_once "$IP/extensions/VisualEditor/VisualEditor.php";
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgHiddenPrefs[] = 'visualeditor-enable';
$wgHiddenPrefs[] = 'visualeditor-betatempdisable';
$wgVirtualRestConfig['modules']['parsoid'] = array(
'url' => 'http://localhost:8142',
'prefix' => 'skrifo'
);
$wgVisualEditorSupportedSkins[] = 'tweeki';
$wgVisualEditorDisableForAnons = true;
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
wfLoadExtension( 'ParserFunctions' );
$wgPFEnableStringFunctions = true;
## semantic mediawiki
$smwgNamespaceIndex = 150;
enableSemantics('skriptenforum.net');
$smwgNamespacesWithSemanticLinks += array(
NS_SKRIPTUM => true,
NS_PFRAGEN => true,
NS_FRAGENA => true
);
$smwgRSSWithPages = false; # im RSS-Feed von Queries nur Seitentitel anzeigen
$smwgLinksInValues = true;
## semantic forms
include_once "$IP/extensions/SemanticForms/SemanticForms.php";
$sfgNamespaceIndex = 200;
$sfgAutocompleteOnAllChars = true;
$sfgAutoCreateUser = 'SkrifoBot';
require_once( "$IP/extensions/SemanticFormsInputs/SemanticFormsInputs.php" );
# $sfgRenameEditTabs renames the edit-with-form tab to just "Edit", and
# the traditional-editing tab, if it is visible, to "Edit source", in
# whatever language is being used.
# The wgGroupPermissions 'viewedittab' setting dictates which types of
# visitors will see the "Edit" tab, for pages that are editable by form -
# by default all will see it.
$sfgRenameEditTabs = true;
$wgGroupPermissions['*']['viewedittab'] = false;
$wgGroupPermissions['sysop']['viewedittab'] = true;
$sdgNamespaceIndex = 170;
include_once( "$IP/extensions/SemanticDrilldown/SemanticDrilldown.php" );
$sdgNumResultsPerPage=250; //Anzahl der ausgegebenen Seiten im Drilldown-Output
$sdgMinValuesForComboBox=0;
## semantic internal objects
include_once("$IP/extensions/SemanticInternalObjects/SemanticInternalObjects.php");
## semantic result formats - enabling additional formats
$srfgFormats[] = 'valuerank';
## lookupuser
require_once( "$IP/extensions/LookupUser/LookupUser.php" );
$wgGroupPermissions['*']['lookupuser'] = false;
$wgGroupPermissions['sysop']['lookupuser'] = false;
$wgGroupPermissions['bureaucrat']['lookupuser'] = true;
## collection
require_once("$IP/extensions/Collection/Collection.php");
/* settings for using using own render server
$wgCollectionFormats = array(
'rdf2latex' => 'PDF',
'rdf2text' => 'Plain text'
);
$wgCollectionFormatToServeURL['rdf2latex'] =
$wgCollectionFormatToServeURL['rdf2text'] = 'http://localhost:17080';
$wgCommunityCollectionNamespace = NS_PROJECT;
$wgEnableSidebarCache = false;
$wgLicenseURL = "http://creativecommons.org/licenses/by-sa/3.0/";
$wgCollectionPortletFormats = array( 'rdf2latex', 'rdf2text' );
$wgCollectionMWServeURL = "http://localhost:8080";
$wgCollectionMWServeCert = "";
*/
$wgCollectionFormats = array(
'rl' => 'PDF',
'odf' => 'ODT',
);
$wgCollectionLicenseURL = 'https://skriptenforum.net/w/index.php?title=Skriptenforum.net:CC-by-sa&action=raw';
## search log
//require_once( "$IP/extensions/SearchLog/SearchLog.php" );
//there was a problem with update.php and search log's sql
## scribunto (lua)
require_once "$IP/extensions/Scribunto/Scribunto.php";
$wgScribuntoDefaultEngine = 'luastandalone';
## Editor für Lua-Module
//require_once "$IP/extensions/WikiEditor/WikiEditor.php";
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
//require_once "$IP/extensions/CodeEditor/CodeEditor.php";
$wgScribuntoUseGeSHi = true;
$wgScribuntoUseCodeEditor = true;
## shibboleth
//temporary disabled
//require_once("$IP/extensions/ShibAuthPlugin/ShibAuthPluginConf.php");
## flagged revision
#require_once("$IP/extensions/FlaggedRevs/FlaggedRevs.php");
# Disable on-demand statistic generation.
#$wgFlaggedRevsStatsAge = false;
# Groups (eduPersonScopedAffiliation: "faculty@...")
$wgGroupPermissions['Lehrende']['review'] = true;
$wgGroupPermissions['Lehrende']['validate'] = true;
## ReplaceText
require_once( "$IP/extensions/ReplaceText/ReplaceText.php" );
## Captcha
require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" );
wfLoadExtension( 'ConfirmEdit/QuestyCaptcha' );
$wgCaptchaClass = 'QuestyCaptcha';
$wgCaptchaQuestions[] = array( 'question' => "Wie heißt die Hauptstadt der Bundesrepublik Deutschland?", 'answer' => "Berlin" );
require_once( "$IP/extensions/ContactPage/ContactPage.php" );
$wgContactConfig['default'] = array(
'RecipientUser' => 'Thai', // Must be the name of a valid account which also has a verified e-mail-address added to it.
'SenderName' => 'Feedbackformular ' . $wgSitename, // "Contact Form on" needs to be translated
'SenderEmail' => null, // Defaults to $wgPasswordSender, may be changed as required
'RequireDetails' => false, // Either "true" or "false" as required
'IncludeIP' => false, // Either "true" or "false" as required
'AdditionalFields' => array(
'Text' => array(
'label-message' => 'emailmessage',
'type' => 'textarea',
'rows' => 10,
'cols' => 50,
'required' => true, // Either "true" or "false" as required
),
),
// Added in MW 1.26
'DisplayFormat' => 'table', // See HTMLForm documentation for available values.
'RLModules' => array(), // Resource loader modules to add to the form display page.
'RLStyleModules' => array(), // Resource loader CSS modules to add to the form display page.
);
$wgCaptchaTriggers['contactpage'] = true;
require_once "$IP/extensions/Piwik/Piwik.php";
$wgPiwikURL = 'www.skriptenforum.net/piwik/';
$wgPiwikIDSite = '1';
require_once( "$IP/extensions/Elastica/Elastica.php" );
require_once( "$IP/extensions/CirrusSearch/CirrusSearch.php" );
$wgSearchType = "CirrusSearch";
$wgCirrusSearchNamespaceWeights[ NS_FILE ] = 0.005;
####################
# SPECIAL SETTINGS #
####################
// SemanticExtraSpecialProperties
$GLOBALS['sespSpecialProperties'] = array( '_EUSER' );