forked from ubc/mediawiki-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomSettings.php
297 lines (221 loc) · 8.95 KB
/
CustomSettings.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
<?php
################
# Namespaces #
################
## Please rememver to define a constants for each namespace. Since
## SemanticMediaWiki uses the namespaces 100-109, the ids should
## start from 110 for our own custom namespaces. Even ids denotes a
## content NS, whereas odd ids denotes a duscussion NS (talk pages).
## Course Namepsace
define("NS_COURSE", 110);
define("NS_COURSE_TALK", 111);
$wgExtraNamespaces[NS_COURSE] = "Course";
$wgExtraNamespaces[NS_COURSE_TALK] = "Course_talk";
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_COURSE] = true;
$wgNamespacesWithSubpages[NS_COURSE_TALK] = true;
$wgContentNamespaces[] = NS_COURSE;
## Documentation Namespace
define("NS_DOCUMENTATION", 112);
define("NS_DOCUMENTATION_TALK", 113);
$wgExtraNamespaces[NS_DOCUMENTATION] = "Documentation";
$wgExtraNamespaces[NS_DOCUMENTATION_TALK] = "Documentation_talk";
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_DOCUMENTATION] = true;
$wgNamespacesWithSubpages[NS_DOCUMENTATION_TALK] = true;
$wgContentNamespaces[] = NS_DOCUMENTATION;
## Notepad Namespace
define("NS_NOTEPAD", 114);
define("NS_NOTEPAD_TALK", 115);
$wgExtraNamespaces[NS_NOTEPAD] = "Notepad";
$wgExtraNamespaces[NS_NOTEPAD_TALK] = "Notepad_talk";
$wgNamespacesToBeSearchedDefaulT[NS_NOTEPAD_TALK] = false;
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_NOTEPAD] = true;
$wgNamespacesWithSubpages[NS_NOTEPAD_TALK] = true;
$wgContentNamespaces[] = NS_NOTEPAD;
## YouTube Namespace
define("NS_YOUTUBE", 116);
define("NS_YOUTUBE_TALK", 117);
$wgExtraNamespaces[NS_YOUTUBE] = "YouTube";
$wgExtraNamespaces[NS_YOUTUBE_TALK] = "YouTube_talk";
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_YOUTUBE] = false;
$wgNamespacesWithSubpages[NS_YOUTUBE_TALK] = false;
$wgContentNamespaces[] = NS_YOUTUBE;
## Elearning Namespace
define("NS_ELEARNING", 118);
define("NS_ELEARNING_TALK", 119);
$wgExtraNamespaces[NS_ELEARNING] = "Elearning";
$wgExtraNamespaces[NS_ELEARNING_TALK] = "Elearning_talk";
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_ELEARNING] = true;
$wgNamespacesWithSubpages[NS_ELEARNING_TALK] = false;
$wgContentNamespaces[] = NS_ELEARNING;
// Only Elearning Group can edit.
$wgNamespaceProtection[NS_ELEARNING] = array('elearning');
## Elearning User Group ##
// this group can can edit elearning
$wgGroupPermissions['elearning']['elearning'] = true;
$wgNamespacesWithSubpages[NS_HELP] = true;
$wgNamespacesWithSubpages[NS_HELP] = true;
## Library Namespace
define("NS_LIBRARY", 120);
define("NS_LIBRARY_TALK", 121);
$wgExtraNamespaces[NS_LIBRARY] = "Library";
$wgExtraNamespaces[NS_LIBRARY_TALK] = "Library_talk";
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_LIBRARY] = true;
$wgNamespacesWithSubpages[NS_LIBRARY_TALK] = false;
$wgContentNamespaces[] = NS_LIBRARY;
// Only Elearning Group can edit.
$wgNamespaceProtection[NS_LIBRARY] = array('library');
## Library User Group ##
// this group can can edit Library
$wgGroupPermissions['library']['library'] = true;
$wgGroupPermissions['library']['reupload'] = true;
## Library Manager Group ##
## This group can add users to the Library Group ##
// this group can can edit Library
$wgGroupPermissions['library_manager']['library'] = true;
// Library Manager can add users to library and linbrary_manager
$wgAddGroups['library_manager'] = array('library','library_manager');
// Library Manager can add users
$wgRemoveGroups['library_manager'] = array('library','library_manager');
## Notepad SANDBOX
define("NS_SANDBOX", 122);
define("NS_SANDBOX_TALK", 123);
$wgExtraNamespaces[NS_SANDBOX] = "Sandbox";
$wgExtraNamespaces[NS_SANDBOX_TALK] = "Sandbox_talk";
$wgNamespacesToBeSearchedDefaulT[NS_SANDBOX_TALK] = false;
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_SANDBOX] = true;
$wgNamespacesWithSubpages[NS_SANDBOX_TALK] = true;
$wgContentNamespaces[] = NS_SANDBOX;
## Arts Group / Namespace ##
define("NS_ARTS", 124);
define("NS_ARTS_TALK", 125);
$wgExtraNamespaces[NS_ARTS] = "Arts";
$wgExtraNamespaces[NS_ARTS_TALK] = "Arts_talk";
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_ARTS] = true;
$wgNamespacesWithSubpages[NS_ARTS_TALK] = false;
$wgContentNamespaces[] = NS_ARTS;
// Only Arts Group can edit.
$wgNamespaceProtection[NS_ARTS] = array('arts');
## Arts User Group ##
// this group can can edit Arts
$wgGroupPermissions['arts']['arts'] = true;
## Learning Commons Group / Namespace ##
define("NS_LEARNINGCOMMONS", 126);
define("NS_LEARNINGCOMMONS_TALK", 127);
$wgExtraNamespaces[NS_LEARNINGCOMMONS] = "Learning_Commons";
$wgExtraNamespaces[NS_LEARNINGCOMMONS_TALK] = "Learning_Commons_talk";
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_LEARNINGCOMMONS] = true;
$wgNamespacesWithSubpages[NS_LEARNINGCOMMONS_TALK] = false;
$wgContentNamespaces[] = NS_LEARNINGCOMMONS;
## LEARNING COMMONS User Group ##
// this group can can edit Learning Commons
$wgGroupPermissions['learning_commons']['learning_commons'] = true;
// Only LEARNING COMMONS Group can edit.
//$wgNamespaceProtection[NS_LEARNINGCOMMONS] = array('learning_commons');
## LFS Land and Food System Namespace
define("NS_LFS", 128);
define("NS_LFS_TALK", 129);
$wgExtraNamespaces[NS_LFS] = "LFS";
$wgExtraNamespaces[NS_LFS_TALK] = "LFS_talk";
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_LFS] = true;
$wgNamespacesWithSubpages[NS_LFS_TALK] = false;
$wgContentNamespaces[] = NS_LFS;
// Only LFS Group can edit.
$wgNamespaceProtection[NS_LFS] = array('lfs');
## LFS User Group ##
// this group can can edit LFS
$wgGroupPermissions['lfs']['lfs'] = true;
## LFS Manager Group ##
## This group can add users to the LFS Group ##
// this group can can edit LFS
$wgGroupPermissions['lfs_manager']['lfs'] = true;
// LFS Manager can add users to lfs and lfs_manager
$wgAddGroups['lfs_manager'] = array('lfs','lfs_manager');
// LFS Manager can add users
$wgRemoveGroups['lfs_manager'] = array('lfs','lfs_manager');
## END LFS Land and Food System Namespace
## Science Namespace
define("NS_SCIENCE", 130);
define("NS_SCIENCE_TALK", 131);
$wgExtraNamespaces[NS_SCIENCE] = "Science";
$wgExtraNamespaces[NS_SCIENCE_TALK] = "Science_talk";
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_SCIENCE] = true;
$wgNamespacesWithSubpages[NS_SCIENCE_TALK] = false;
$wgContentNamespaces[] = NS_SCIENCE;
// Only Elearning Group can edit.
$wgNamespaceProtection[NS_SCIENCE] = array('science');
## Science User Group ##
// this group can can edit Library
$wgGroupPermissions['science']['science'] = true;
## Science Manager Group ##
## This group can add users to the Science Group ##
// this group can can edit Science
$wgGroupPermissions['science_manager']['science'] = true;
// Science Manager can add users to science and science_manager
$wgAddGroups['science_manager'] = array('science','science_manager');
// Science Manager can add users
$wgRemoveGroups['science_manager'] = array('science','science_manager');
# Define the THREAD NAMESPACE
define("NS_THREAD", 90);
define("NS_THREAD_TALK", 91);
# Define the SUMMARY NAMESPACE
define("NS_SUMMARY", 92);
define("NS_SUMMARY_TALK", 93);
## Namespace COPYRIGHT
define("NS_COPYRIGHT", 140);
define("NS_COPYRIGHT_TALK", 141);
$wgExtraNamespaces[NS_COPYRIGHT] = "Copyright";
$wgExtraNamespaces[NS_COPYRIGHT_TALK] = "Copyright_talk";
## Subpages has to be enabled explictly.
$wgNamespacesWithSubpages[NS_COPYRIGHT] = true;
$wgNamespacesWithSubpages[NS_COPYRIGHT_TALK] = false;
$wgContentNamespaces[] = NS_COPYRIGHT;
// Only Copyright Group can edit.
$wgNamespaceProtection[NS_COPYRIGHT] = array('copyright');
## Copyright User Group ##
// this group can can edit Library
$wgGroupPermissions['copyright']['copyright'] = true;
## Cpyright Manager Group ##
## This group can add users to the Copyright Group ##
// this group can can edit Copyright
$wgGroupPermissions['copyright_manager']['copyright'] = true;
// Copyright Manager can add users to copyright and copyright_manager
$wgAddGroups['copyright_manager'] = array('copyright','copyright_manager');
// Copyright Manager can add users
$wgRemoveGroups['copyright_manager'] = array('copyright','copyright_manager');
## Search these Namespances by default
$wgNamespacesToBeSearchedDefault = array(
NS_MAIN => true,
NS_USER => true,
NS_HELP => true,
NS_COURSE => true,
NS_COURSE_TALK => true,
NS_THREAD => true,
NS_SUMMARY => true,
NS_DOCUMENTATION => true,
NS_FILE => true,
NS_CATEGORY => true,
NS_YOUTUBE => true,
NS_ELEARNING => true,
NS_LIBRARY => true,
NS_NOTEPAD => true,
NS_ARTS => true,
NS_LEARNINGCOMMONS => true,
NS_LFS => true,
NS_SCIENCE => true,
NS_COURSE => true,
);
#####################
## End Namepsace Area
#####################
$wgAllowExternalImages = true;