forked from toniher/docker-SemanticMediaWiki
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMetaLocalSettings.php
294 lines (247 loc) · 10.3 KB
/
MetaLocalSettings.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
<?php
# 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;
}
#########################################
#
# Site administration and upgrade
#
#########################################
$wgSecretKey = "f443f65d863168cfe6d744a44becceb5ef79fd05203e878eb2b44535be910ab1";
# 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 = "50231b7eadebda3e";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
$wgCacheDirectory = "$IP/cache";
## Disable create accounts
$wgGroupPermissions['*']['createaccount'] = false;
## Allow CSS on login and preferences
$wgAllowSiteCSSOnRestrictedPages = true;
#############################
#
# Special pages
#
#############################
## 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 = "";
#####################################
#
# WikiEditor (for form input fields)
#
####################################
wfLoadExtension( 'WikiEditor' );
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
$wgEditToolbarGlobalEnable = true; ## CHECK LATER WHETHER NEEDED
$wgWikiEditorFeatures['toolbar'] = array( 'global'=>true, 'user'=>true );
$wgWikiEditorFeatures['dialogs'] = array( 'global'=>true, 'user'=>true );
$wgWikiEditorFeatures['toc'] = array( 'global'=>false, 'user'=>true );
$wgDefaultUserOptions['wikieditor-preview'] = 0;
$wgDefaultUserOptions['useeditwarning'] = 1;
$wgResourceLoaderDebug = true;
#############################
#
# Semantic MW
#
#############################
# SMW is installed by composer
# Page forms is installed by smw
wfLoadExtension('PageForms');
#############################
#
# Other Extensions
#
#############################
# Customize the Homepage if at MfN
require_once "$IP/extensions/UserFunctions/UserFunctions.php";
$wgUFEnablePersonalDataFunctions = true;
$wgUFAllowedNamespaces[NS_MAIN] = true;
# Tabs in forms (oldskool installation)
require_once "$IP/extensions/HeaderTabs/HeaderTabs.php";
$htDisableDefaultToc = true;
$htEditTabLink = false;
#$htStyle = 'style-name';
# Tag cloud
wfLoadExtension('WikiCategoryTagCloud');
# barebones Recent Changes list
require_once "$IP/extensions/SimpleChanges/SimpleChanges.php";
$wgSimpleChangesOnlyContentNamespaces = true;
$wgSimpleChangesOnlyLatest = true;
$wgSimpleChangesShowUser = true;
# PDF einbinden (für Präsentationen, in Landscape format)
wfLoadExtension( 'PDFEmbed' );
//Default width for the PDF object container.
$pdfEmbed['width'] = 870;
//Default height for the PDF object container.
$pdfEmbed['height'] = 625;
# Extra Zugriffsrecht
$wgGroupPermissions['mfnEditor']['embed_pdf'] = true;
#parser functions
wfLoadExtension( 'ParserFunctions' );
$wgPFEnableStringFunctions = true;
# arrays in semantic queries
require_once "$IP/extensions/Arrays/Arrays.php";
# CategoryTree
require_once "$IP/extensions/CategoryTree/CategoryTree.php";
$wgCategoryTreeSidebarRoot = 'Category:Inhaltsverzeichnis'; # Name of the category shown in the sidebar
$wgCategoryTreeForceHeaders = true;
$wgCategoryTreeSidebarOptions['mode'] = 'pages';
#$wgCategoryTreeSidebarOptions['mode'] = 'all'; # Show files in table of contents
$wgCategoryTreeSidebarOptions['hideprefix'] = CT_MODE_PAGES;
$wgCategoryTreeSidebarOptions['showcount'] = false;
$wgCategoryTreeSidebarOptions['hideroot'] = true;
$wgCategoryTreeSidebarOptions['namespaces'] = false;
$wgCategoryTreeSidebarOptions['depth'] = 1;
########################
#
# Namespaces
#
########################
const NS_PUBLIC = 600;
$wgExtraNamespaces[NS_PUBLIC] = 'Öffentlich';
$wgExtraNamespaces[601] = 'Öffentlich_Diskussion';
$wgContentNamespaces[] = NS_PUBLIC;
$smwgNamespacesWithSemanticLinks[NS_PUBLIC] = true;
const NS_CONFIDENTIAL = 700;
$wgExtraNamespaces[NS_CONFIDENTIAL] = 'Vertraulich';
$wgExtraNamespaces[701] = 'Vertraulich_Diskussion';
$wgContentNamespaces[] = NS_CONFIDENTIAL;
$smwgNamespacesWithSemanticLinks[NS_CONFIDENTIAL] = true;
const NS_TRASH = 800;
$wgExtraNamespaces[NS_TRASH] = 'Papierkorb';
$wgExtraNamespaces[801] = 'Papierkorb_Diskussion';
$wgContentNamespaces[] = NS_TRASH;
$smwgNamespacesWithSemanticLinks[NS_TRASH] = true;
const NS_GLOSSARY = 900;
$wgExtraNamespaces[NS_GLOSSARY] = 'Glossar';
$wgExtraNamespaces[901] = 'Glossar_Diskussion';
$wgContentNamespaces[] = NS_GLOSSARY;
$smwgNamespacesWithSemanticLinks[NS_GLOSSARY] = true;
const NS_GOAL = 910;
$wgExtraNamespaces[NS_GOAL] = 'Ziel';
$wgExtraNamespaces[911] = 'Ziel_Diskussion';
$wgContentNamespaces[] = NS_GOAL;
$smwgNamespacesWithSemanticLinks[NS_GOAL] = true;
const NS_STK = 920;
$wgExtraNamespaces[NS_STK] = 'Stakeholder';
$wgExtraNamespaces[921] = 'Stakeholder_Diskussion';
$wgContentNamespaces[] = NS_STK;
$smwgNamespacesWithSemanticLinks[NS_STK] = true;
###################
#
# Search settings
#
###################
$wgNamespacesToBeSearchedDefault[NS_PUBLIC] = true;
#############################
#
# Media
#
#############################
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
// Allow copy uploads from another wiki
$wgAllowCopyUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgMaxShellMemory = 307200;
## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:
#$wgHashedUploadDirectory = false;
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
$wgCacheDirectory = "$IP/cache";
## Each Wiki has its own media upload folder
#$wgUploadNavigationUrl = $wgScriptPath . '/index.php?title=Spezial:Hochladen';
#$wgUploadMissingFileUrl = $wgUploadNavigationUrl; # red link in page with missing files/imageshttps://biowikifarm.net/v-mfn/forschungsprojekte/media/1/1b/Symbol_microscope.png
#== Uploadable extensions ==
# By default only png, gif, jpg, strongly expanded here!
# There is also a blacklist, preventing html, php, exe, js and many many more
# Note: files without extension are a problem, see http://www.mediawiki.org/wiki/Manual:$wgFileExtensions
$wgFileExtensions = array(
// images
'png', 'jpg', 'jpeg', 'gif', 'svg', 'tif', 'tiff' , 'xcf', 'vsd',
// multimedia
'mp3', 'ogg', 'wav', 'wma', 'swf', 'mpg', 'mpp', 'xml', 'txt', 'dat', 'pdf',
// archives
'zip', '7z', 'gz', 'tgz',
// data
'xml', 'txt', 'dat', 'pdf', 'ink',
// office
'odt', 'ods', 'odc', 'odp', 'odg', 'doc', 'docx', 'rtf', 'xls', 'xlsx', 'ppt', 'pptx', 'accdb'
);// end wgFileExtensions
# If following is turned off, users may override the warning for files not covered by $wgFileExtensions (and not in the blacklist)
$wgStrictFileExtensions = false;
## File type Blacklist exists both as extension AND Mimetype ($wgVerifyMimeType is true by default)!!!
$wgFileBlacklist = array(
# HTML may contain cookie-stealing JavaScript and web bugs
'html', 'htm', 'js', 'jsb', 'mhtml', 'mht',
# PHP scripts may execute arbitrary code on the server
'php', 'phtml', 'php3', 'php4', 'php5', 'phps',
# Other types that may be interpreted by some servers
'shtml', 'jhtml', 'pl', 'py', 'cgi',
# May contain harmful executables for Windows victimshttps://biowikifarm.net/v-mfn/forschungsprojekte/media/1/1b/Symbol_microscope.png
'exe',
'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' );
$wgMimeTypeBlacklist= array(
# HTML may contain cookie-stealing JavaScript and web bugs
'text/html', 'text/javascript', 'text/x-javascript', 'application/x-shellscript',
# PHP scripts may execute arbitrary code on the server
'application/x-php', 'text/x-php',
# Other types that may be interpreted by some servers
'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh',
# Windows metafile, client-side vulnerability on some systems
'application/x-msmetafile',
'application/zip'
);
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;
## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale
$wgShellLocale = "C.UTF-8";
## Autocomplete
$sfgAutocompletionURLs['wikispecies'] = 'http://10.0.2.15:10080/fp/autocomplete.php?source=wikispecies&search=<substr>';
$sfgAutocompletionURLs['instituten'] = 'http://10.0.2.15:10080/fp/autocomplete.php?source=wikipediacategory&category=Universität_in_Deutschland|Forschungsorganisation|Mitglied_der_Leibniz-Gemeinschaft&lang=de&search=<substr>';
$sfgAutocompletionURLs['laender'] = 'http://10.0.2.15:10080/fp/autocomplete.php?source=wikipediacategory&category=Mitgliedstaat_der_Vereinten_Nationen&lang=de&search=<substr>';
$sfgAutocompletionURLs['rvk'] = 'http://10.0.2.15:10080/fp/autocomplete.php?source=rvk&search=<substr>';
$sfgAutocompletionURLs['methoden'] = 'http://10.0.2.15:10080/fp/autocomplete.php?source=rvkfiltered&filter=methode|forschungsmethode&search=<substr>';
enableSemantics( 'museumfuernaturkunde.berlin/ikon' );
#############################
#
# Data protection banner
#
#############################
wfLoadExtension( 'CookieWarning' );
$wgCookieWarningEnabled=true;
#############################
#
# Embed PDFs
#
#############################
#require_once "$IP/extensions/PDFEmbed/PDFEmbed.php";
wfLoadExtension( 'PDFEmbed' );
//Default width for the PDF object container.
$pdfEmbed['width'] = 870;
//Default height for the PDF object container.
$pdfEmbed['height'] = 625;
# Extra Zugriffsrecht
$wgGroupPermissions['mfnEditor']['embed_pdf'] = true;