-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.php
160 lines (126 loc) · 5.55 KB
/
main.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
<?php
if ( !defined( "MEDIAWIKI" ) ) die( 'This file is a MediaWiki extension, it is not a valid entry point' );
if (!isset($GLOBALS['siteTopLevelDomain'])) {
$GLOBALS['siteTopLevelDomain'] = 'webplatform.org';
}
$wpdBundle["path"] = __DIR__;
$wpdBundle["root_uri"] = str_replace('$1', '', $wgArticlePath);
$wpdBundle["context"] = basename(dirname(__FILE__));
$wpdBundle["uri"] = "{$wgScriptPath}/extensions/".$wpdBundle["context"];
## Very-small extensions
require_once(__DIR__."/extensions/TopicTitle.php");
require_once(__DIR__."/extensions/EditSectionIcon.php");
require_once(__DIR__."/extensions/NoTOC.php");
require_once(__DIR__."/extensions/BreadcrumbMenu.php");
## Piwik
require_once(__DIR__."/extensions/Piwik.php");
$wgPiwikURL = 'stats.'.$GLOBALS['siteTopLevelDomain'];
## Compatibility tables
require_once(__DIR__."/extensions/Compatables/Compatables.php");
$wgCompatablesCssFileUrl = $wpdBundle["uri"]."/extensions/Compatables/compat.css";
## The skin
require_once(__DIR__."/skin/main.php");
## Remove normal table of contents
## $wgDefaultUserOptions["showtoc"] = 0;
// Defaults is that we do not want to be indexed
if(!isset($wgDefaultRobotPolicy)){
$wgDefaultRobotPolicy = 'noindex,nofollow';
}
$wgCrossSiteAJAXdomains = "*";
$wgStylePath = "{$wgScriptPath}/skins";
$wgFavicon = "/favicon.ico";
## The relative URL path to the logo. Make sure you change
## this from the default, or else you’ll overwrite your
## logo when you upgrade!
$wgLogo = $wpdBundle["uri"]."/skin/logo.png";
## Custom Namespaces
define("NS_WPD", 3000);
define("NS_WPD_TALK", 3001);
define("NS_STEWARDS", 3010);
define("NS_STEWARDS_TALK", 3011);
define("NS_META", 3020);
define("NS_META_TALK", 3021);
$wgEmergencyContact = "notifier-docs@".$GLOBALS['siteTopLevelDomain'];
$wgPasswordSender = "notifier-docs@".$GLOBALS['siteTopLevelDomain'];
$wgExtraNamespaces[NS_WPD] = "WPD";
$wgExtraNamespaces[NS_WPD_TALK] = "WPD_talk";
$wgExtraNamespaces[NS_STEWARDS] = "Stewards";
$wgExtraNamespaces[NS_STEWARDS_TALK] = "Stewards_talk";
$wgExtraNamespaces[NS_META] = "Meta";
$wgExtraNamespaces[NS_META_TALK] = "Meta_talk";
## Subpages
$wgNamespacesWithSubpages[NS_MAIN] = true;
$wgNamespacesWithSubpages[NS_WPD] = true;
$wgNamespacesWithSubpages[NS_STEWARDS] = true;
$wgNamespacesWithSubpages[NS_META] = true;
$wgContentNamespaces[] = NS_MAIN;
$wgContentNamespaces[] = NS_WPD;
# https://www.mediawiki.org/wiki/Manual:$wgDefaultRobotPolicy
#$wgNamespaceRobotPolicies[NS_WPD_TALK] = 'noindex,nofollow';
#$wgNamespaceRobotPolicies[NS_META] = 'noindex,nofollow';
#$wgNamespaceRobotPolicies[NS_META_TALK] = 'noindex,nofollow';
## Allow lowercase page titles
$wgCapitalLinks = false;
## Allow users to read the request account page, so they can request accounts
$wgWhitelistRead = array("Special:RequestAccount","Main Page");
## General rights
$wgGroupPermissions["*"]["read"] = true;
$wgGroupPermissions["*"]["createaccount"] = true;
$wgGroupPermissions["*"]["createpage"] = false;
$wgGroupPermissions["*"]["createtalk"] = false; // New!
$wgGroupPermissions["user"]["createtalk"] = false; // ^
$wgGroupPermissions["*"]["edit"] = false;
$wgGroupPermissions["user"]["createpage"] = false;
$wgGroupPermissions["autoconfirmed"]["createpage"] = true;
$wgAutoConfirmAge = 1*3600*24; // 1 day
$wgAutoConfirmCount = 10;
$wgRCMaxAge = 365*24*3600; // 10 years
## UPO means: this is also a user preference option
$wgShowIPinHeader = false;
$wgDisableCounters = true;
$wgAllowUserCss = false;
$wgAllowUserJs = false;
$wgEnotifUserTalk = true; // UPO
$wgEnotifWatchlist = true; // UPO
$wgEmailAuthentication = true;
$wgEmailConfirmToEdit = true;
$wgAllowUserCssPrefs = false;
$wgUseSiteJs = false;
$wgUseSiteCss = false;
$wgUseAjax = true;
$wgAjaxWatch = true;
$wgMiserMode = true;
## Jobs are run by cron, disable jobs run via page requests
$wgJobRunRate = 0;
## Why that, don’t know, still better than .php3, or .php5
$wgScriptExtension = ".php";
## MySQL specific settings
$wgDBprefix = "";
## MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
## Experimental charset support for MySQL 5.0.
$wgDBmysql5 = false;
## InstantCommons allows wiki to use images from http://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 = "en_US.utf8";
## Site language code, should be one of the list in ./languages/Names.php
$wgLanguageCode = "en";
## 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.
## Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "http://creativecommons.org/licenses/by/3.0/";
$wgRightsText = "Creative Commons Attribution license";
$wgRightsIcon = $wpdBundle["uri"]."/skin/images/cc-by-black.svg";
$wgRightsPage = "MediaWiki:Site-terms-of-service";
$wgLicenseTerms = "MediaWiki:Site-terms-of-service";
## TODO:
## * Import comments; it only requires the Comments extension
## * Remove SectionComments from this extension, it should not be enabled anymore (doesn’t work since update 2014-09-01)
## * Remove .gitmodules requirement for Comments Extension
#require_once("$IP/extensions/Comments/Comments.php");
#$wgCommentsEnabledNS = array(NS_MAIN);
#require_once("$IP/extensions/WebPlatformDocs/extensions/SectionComments/SectionComments.php");