Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
422 lines (320 sloc) 14.5 KB
<?php
$wgReadOnly = ( PHP_SAPI === 'cli' ) ? false : 'This wiki is currently being upgraded to a newer software version. Please check back in a couple of hours.';
## Debugging.
## off for security reasons
#error_reporting( E_ALL );
#ini_set( 'display_errors', 1 );
## off for security reasons
#$wgShowExceptionDetails = true;
## off for security reasons
#$wgShowSQLErrors = 1;
## only in case of issues, breaks special pages
#$wgMiserMode = true;
## off because too verbose
#$wgDebugLogFile = "/srv/w/debug.log";
## Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
## database stuff in /etc/apache2/wikiSecrets.php
require_once ("/etc/apache2/wikiSecrets.php");
$wgUploadDirectory = "/srv/w/images/";
##########################################################################################
## settings
##########################################################################################
## 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:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/w";
$wgScriptExtension = ".php";
$wgArticlePath = "/wiki/$1";
$wgLoadScript = "/w/load.php";
## The protocol and server name to use in fully-qualified URLs
#$wgServer = " ";
## The relative URL path to the skins directory
$wgStylePath = "$wgScriptPath/skins";
## 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 = "";
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = false; # UPO
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgSVGConverter = 'ImageMagick';
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgGenerateThumbnailOnParse = true;
## 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.
$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";
# Query string length limit for ResourceLoader. You should only set this if
# your web server has a query string length limit (then set it to that limit),
# or if you have suhosin.get.max_value_length set in php.ini (then set it to
# that value)
$wgResourceLoaderMaxQueryLength = -1;
## Open links in new windows/tab to cope up with German law.
$wgExternalLinkTarget = '_blank';
## disable anon edits on talk pages
$wgDisableAnonTalk = true;
for($i = 1;$i < 14; $i += 2) {
$wgNamespaceProtection[$i] = 'noedit';
}
$wgNamespaceProtection[2] = 'noedit';
## disable GeoIP
$wgULSGeoService = false;
## Add new types to the existing list from DefaultSettings.php
#$wgFileExtensions[] = 'eps';
## Add several file types to the default array
$wgFileExtensions = array_merge(
$wgFileExtensions, array(
'eps', 'ai', 'svg'
)
);
$wgUsePathInfo = true;
$wgNoFollowLinks = false;
## Enable subpages in the main namespace
$wgNamespacesWithSubpages[NS_MAIN] = true;
## This is required to make the __NOINDEX__ magic word work.
$wgExemptFromUserRobotsControl = array();
$wgAllowExternalImages = false;
$wgAllowExternalImagesFrom = array( 'http://127.0.0.1/', 'https://www.whonix.org/', 'https://phabricator.whonix.org/' );
$wgAllowDisplayTitle = true;
$wgRestrictDisplayTitle = false;
$wgPutIPinRC = false;
##########################################################################################
## caching
##########################################################################################
## Shared memory settings
$wgMainCacheType = CACHE_MEMCACHED;
$wgMessageCacheType = CACHE_MEMCACHED;
$wgUseLocalMessageCache = true;
$wgParserCacheType = CACHE_MEMCACHED;
$wgUseGzip = true;
$wgEnableSidebarCache = true;
$wgMemCachedServers = array("127.0.0.1:11211");
$wgexLingoCacheType = CACHE_MEMCACHED;
$wgLocalisationUpdateDirectory = "$IP/cache";
## 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";
$wgParserCacheExpireTime = 2592000;
$wgResourceLoaderMaxage = 2592000;
$wgEnableSidebarCache = true;
#enable file cache - https://www.mediawiki.org/wiki/Manual:File_cache
$wgUseFileCache = true; /* default: false */
$wgFileCacheDirectory = "$IP/cache";
$wgShowIPinHeader = false;
$wgDisableCounters = true;
## If on, the sidebar navigation links are cached for users with the current language set. This can save a touch of load on a busy site by shaving off extra message lookups.
## However it is also fragile: changing the site configuration, or having a variable $wgArticlePath, can produce broken links that don't update as expected.
$wgEnableSidebarCache = true;
## testing this cache setting
$wgFileCacheDepth = 0;
#$wgUseSquid = true;
#$wgSquidServers = array( '127.0.0.1:6081' );
#$wgUsePrivateIPs = true;
#$wgSquidMaxage = 1800;
## commenting out to test if varnish works then
#$wgCacheEpoch = wfTimestamp( TS_MW, time() - 86400 ); # 60*60*24 = 1 day
## test this later
$wgInvalidateCacheOnLocalSettingsChange = true;
## test this
$wgUseESI = true;
## see if varnish works then
$wgUseETag = true;
##########################################################################################
## Skin
##########################################################################################
wfLoadSkin( 'foreground' );
#wfLoadSkin( 'chameleon' );
$wgDefaultSkin = "foreground";
##########################################################################################
## MobileFrontend
##########################################################################################
#require_once( "$IP/extensions/MobileFrontend/MobileFrontend.php" );
#wfLoadExtension( 'MobileFrontend' );
#$wgMFAutodetectMobileView = false;
#$wgMFEnableSiteNotice = true;
#$wgMFAnonymousEditing = true;
## required for MobileView
#require_once "$IP/extensions/Mantle/Mantle.php";
#wfLoadExtension( 'Mantle' );
## ?
#$wgMFDefaultSkinClass = "SkinVector";
##########################################################################################
## $wgGroupPermissions
##########################################################################################
## Prevent new user registrations except by sysops
#$wgGroupPermissions['*']['createaccount'] = false;
## To enable Sysops to hide revisions and log items from users:
$wgGroupPermissions['sysop']['deletelogentry'] = true;
$wgGroupPermissions['sysop']['deleterevision'] = true;
## To enable Oversighters to hide usernames from users and Sysops:
$wgGroupPermissions['oversight']['hideuser'] = true;
## To enable Oversighters to hide revisions and log items from users and Sysops:
$wgGroupPermissions['oversight']['suppressrevision'] = true;
$wgGroupPermissions['oversight']['suppressionlog'] = true;
## To enable Observers to view revisions and log items hidden from users and Sysops:
$wgGroupPermissions['observer']['viewsuppressed'] = true;
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['user']['createpage'] = false;
$wgGroupPermissions['sysop']['createpage'] = true;
$wgGroupPermissions['uploadaccess']['createpage'] = true;
# To create a special group called "uploadaccess", and allow members of that group to upload files:
$wgGroupPermissions['uploadaccess']['upload'] = true;
##########################################################################################
## $wgUrlProtocols
##########################################################################################
## magnet
## https://www.mediawiki.org/wiki/Manual:$wgUrlProtocols
$wgUrlProtocols = array(
'http://',
'https://',
'ftp://',
'irc://',
'ircs://', // @bug 28503
'gopher://',
'telnet://', // Well if we're going to support the above.. -ævar
'nntp://', // @bug 3808 RFC 1738
'worldwind://',
'mailto:',
'news:',
'svn://',
'git://',
'mms://',
'//', // for protocol-relative URLs
'magnet:',
'bitcoin:',
'litecoin:',
);
##########################################################################################
## require_once
##########################################################################################
require_once( "$IP/extensions/random.php" );
require_once( "$IP/extensions/Widgets/Widgets.php" );
##########################################################################################
## wfLoadExtension
##########################################################################################
wfLoadExtension( 'ReplaceText' );
wfLoadExtension( 'WikiSEO' );
wfLoadExtension( 'OpenGraphMeta' );
wfLoadExtension( 'Renameuser' );
wfLoadExtension( 'Nuke' );
wfLoadExtension( 'ContactPage' );
##########################################################################################
## Comments
##########################################################################################
wfLoadExtension( 'Comments' );
$wgCommentsInRecentChanges = true;
##########################################################################################
## DisableAccount
##########################################################################################
wfLoadExtension( 'DisableAccount' );
$wgGroupPermissions['bureaucrat']['disableaccount'] = true;
##########################################################################################
## Purge
##########################################################################################
require_once "$IP/extensions/Purge/Purge.php";
$wgGroupPermissions['user']['purge'] = false;
$wgGroupPermissions['sysop']['purge'] = true;
##########################################################################################
## UserMerge
##########################################################################################
wfLoadExtension( 'UserMerge' );
// By default nobody can use this function, enable for bureaucrat?
$wgGroupPermissions['sysop']['usermerge'] = true;
##########################################################################################
## Cite
##########################################################################################
wfLoadExtension( 'Cite' );
$wgCiteEnablePopups = false;
##########################################################################################
## MsUpload
##########################################################################################
$wgMSU_ShowAutoKat = false; #autocategorisation
$wgMSU_CheckedAutoKat = false; #checkbox: checked = true/false
$wgMSU_debug = false;
$wgMSU_ImgParams = '400px'; #default max-size for image insert
$wgMSU_UseDragDrop = true; #show Drag&Drop Area?
wfLoadExtension( 'MsUpload' );
##########################################################################################
## WikiEditor
##########################################################################################
wfLoadExtension( 'WikiEditor' );
# Enables use of WikiEditor by default but still allow users to disable it in preferences
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
# Displays the Preview and Changes tabs
$wgDefaultUserOptions['wikieditor-preview'] = 1;
# Displays the Publish and Cancel buttons on the top right side
$wgDefaultUserOptions['wikieditor-publish'] = 1;
##########################################################################################
## ParserFunctions
##########################################################################################
## required for infoboxes such as mbox
## https://www.mediawiki.org/wiki/Manual:Importing_Wikipedia_infoboxes_tutorial
wfLoadExtension( 'ParserFunctions' );
$wgPFEnableStringFunctions = true;
##########################################################################################
## Scribunto
##########################################################################################
## required for "released x days ago"
## required for infoboxes such as mbox
## https://www.mediawiki.org/wiki/Manual:Importing_Wikipedia_infoboxes_tutorial
wfLoadExtension( 'Scribunto' );
$wgScribuntoDefaultEngine = 'luastandalone';
$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua';
##########################################################################################
## FlaggedRevs
##########################################################################################
require_once("$IP/extensions/FlaggedRevs/FlaggedRevs.php");
$wgFlaggedRevsStatsAge = false;
$wgGroupPermissions['sysop']['review'] = true; //allow administrators to review revisions
$wgGroupPermissions['sysop']['autoreview'] = true; //allow administrators to review revisions
## disable this so reviewers will not run javascript
## that they have not checked beforehand
$wgFlaggedRevsExceptions = array( 'bot' ); //show admins unreviewed version by default
##########################################################################################
## PdfBook
##########################################################################################
wfLoadExtension( 'PdfBook' );
$wgPdfBookTab = true;
##########################################################################################
## newer
##########################################################################################
## php maintenance/update.php
## Mediawiki:Useragreement
wfLoadExtension( 'UserAgreement' );
wfLoadExtension( 'CookieWarning' );
$wgCookieWarningEnabled = true;
## php maintenance/sql.php extensions/NewSignupPage/user_register_track.sql
## MediaWiki:Shoutwiki-loginform-tos
wfLoadExtension( 'NewSignupPage' );
$wgRegisterTrack = true;
#wfLoadExtension( 'TemplateStyles' );
#wfLoadExtension( 'Theme' );
wfLoadExtension( 'RottenLinks' );
wfLoadExtension( 'LinkSuggest' );
wfLoadExtension( 'LinkToArchive' );
You can’t perform that action at this time.