Jump to: navigation, search

LocalSettings.php is the primary configuration file for MediaWiki. For clc-wiki it references files in /home/comp.lang.c/clc-wiki.net/user/private/clcwikiconf/ to allow mirror sites to override settings, and to hide private details such as database username and password.

The following sections are the LocalSettings.php files for this wiki's live and test sites as they currently exist on the filesystem. This page's parsed content is not cached by the wiki, but the full page's html might be client-cached by your browser or server-cached by the wiki's file cache. To ensure that you're viewing the current version, either:

  • select 'Purge cache' from the 'This article' branch in the treeview, or, equivalently,
  • access the page using its index.php? url form and add a query parameter action=purge.
<?php

# This file was automatically generated by the MediaWiki installer.
# If you make manual changes, please keep track in case you need to
# recreate them later.

$IP = "/var/www/clc-wiki/mediawiki";

# Include private stuff such as passwords ; override $IP for a local mirror as
# necessary

include '/var/clc-wiki/clcwikiconf/PrivateSetting.php';

ini_set( "include_path", ".:$IP:$IP/includes:$IP/languages" );
require_once "$IP/includes/DefaultSettings.php";
include '/var/clc-wiki/clcwikiconf/PrivateSetting.php';

# If PHP's memory limit is very low, some operations may fail.
# ini_set( 'memory_limit', '20M' );

if ( $wgCommandLineMode ) {
	if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
		die( "This script must be run from the command line\n" );
	}
} elseif ( empty( $wgNoOutputBuffer ) ) {
	## Compress output if the browser supports it
	if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );
}

# Include extensions we want
require_once "$IP/extensions/Hierarchy/SpecialHierarchy.php";
require_once "$IP/extensions/Renameuser/SpecialRenameuser.php";
require_once "$IP/extensions/AntiSpam/AntiSpam.php";
require_once "$IP/extensions/ConfirmEdit/ConfirmEdit.php";
#require_once "$IP/extensions/ConfirmEdit/ReCaptcha.php";
#$wgCaptchaClass = 'ReCaptcha';
wfLoadExtension( 'ConfirmEdit/QuestyCaptcha' );
#require_once "$IP/extensions/ConfirmEdit/QuestyCaptcha.php";
$wgCaptchaClass = 'QuestyCaptcha';

require_once "$IP/extensions/ExcludeHiddenGroups.php";

require_once "$IP/extensions/BlockBatch/BlockBatch.php";
require_once "$IP/extensions/OneColumnAllUsers/OneColumnAllUsers.php";
require_once "$IP/extensions/Nuke/Nuke.php";
require_once "$IP/extensions/SmiteSpam/SmiteSpam.php";
require_once "$IP/extensions/DeleteBatch/DeleteBatch.php";


$wgUntrustedLinkAttemptsLogFile = '/var/clc-wiki/untrustedlinkattemptslogfile.log';
$wgUntrustedLinkAttemptEmailSubject = '[clc-wiki] Link attempt';

require_once "$IP/extensions/GeSHiWrapper/GeSHiWrapper.php";
$wgGeSHiFallbackDir = 'geshi-1.0.8.11';
$wgGeSHiFallbackClassName = 'GeSHi__1_0_8_11';
# locate these here so that they can be overridden by LocalOverrides if required
$wgGeSHiFileBlacklistREs = array();   # block none
$wgGeSHiFileAllowedDirs  = array(
	'/var/www/clc-wiki'
);

$wgSitename         = "clc-wiki";

$wgScriptPath	    = "/mediawiki";
$wgScript           = "$wgScriptPath/index.php";

## If using PHP as a CGI module, use the ugly URLs
#$wgArticlePath      = "$wgScript/$1";
$wgArticlePath      = "/wiki/$1";
# $wgArticlePath      = "$wgScript?title=$1";

# Nice URL's for actions
#$actions = array('watch', 'unwatch', 'delete', 'revert',
#                 'protect', 'unprotect', 'info', 'markpatrolled', 'validate',
#		 'render','deletetrackback', 'print', 'dublincore',
#		 'creativecommons','credits','submit','viewsource','history',
#		 'purge');
#
#foreach ($actions as $a) {
#    $wgActionPaths[$a] = "/wiki-cmd/$a/$1";
#}

# Override $wgScriptPath, $wgScript and/or $wgArticlePath for a local  mirror as
# necessary; can't be combined with '/home/clc/PrivateSetting.php' because
# DefaultSettings.php both reads the $IP variable and resets these  variables
include_once '/var/clc-wiki/clcwikiconf/LocalOverrides.php';

$wgRedirectScript   = "$wgScriptPath/redirect.php";
$wgStylePath        = "$wgScriptPath/skins";
$wgStyleDirectory   = "$IP/skins";
$wgLogo             = "$wgStylePath/Treeview/clc-wiki.png";

$wgUploadPath       = "$wgScriptPath/images";
$wgUploadDirectory  = "$IP/images";

$wgEnableEmail = true;
$wgEnableUserEmail = true;

$wgEmergencyContact = "admin@clc-wiki.net";
$wgPasswordSender	= "clc.webadmin@flash-gordon.me.uk";

## For a detailed description of the following switches see
## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent
## There are many more options for fine tuning available see
## /includes/DefaultSettings.php
## UPO means: this is also a user preference option
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;

$wgDBserver         = "localhost";
$wgDBprefix         = "clc_";

# If you're on MySQL 3.x, this next line must be FALSE:
$wgDBmysql4 = true;

## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgEnableParserCache = true;

## To enable image uploads, make sure the 'images' directory
## is writable, then uncomment this:
$wgEnableUploads		= true;
$wgUseImageResize		= true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";

## 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;

## If you have the appropriate support software installed
## you can enable inline LaTeX equations:
$wgUseTeX			= true;
$wgMathPath         = "{$wgUploadPath}/math";
$wgMathDirectory    = "{$wgUploadDirectory}/math";
$wgTmpDirectory     = "{$wgUploadDirectory}/tmp";

$wgLocalInterwiki   = $wgSitename;

$wgLanguageCode = "en";

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
require_once "$IP/skins/Treeview/Treeview.php";
require_once "$IP/skins/Vector/Vector.php";
require_once "$IP/skins/MonoBook/MonoBook.php";
require_once "$IP/skins/Modern/Modern.php";
require_once "$IP/skins/CologneBlue/CologneBlue.php";
$wgDefaultSkin   = 'treeview';
#$wgDefaultSkin   = 'standard';

$wgShowPoweredByIcon = false;
$wgShowCopyrightIcon = false;
#$wgTreeviewDisableViewcount = true;

## 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.
$wgEnableCreativeCommonsRdf = true;
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "http://www.gnu.org/copyleft/fdl.html";
$wgRightsText = "GNU Free Documentation License 1.2";
$wgRightsIcon = "${wgStylePath}/common/images/gnu-fdl.png";
# $wgRightsCode = "gfdl"; # Not yet used

$wgDiff3 = "/usr/bin/diff3";


# Accept PDF file uploads.
$wgFileExtensions[] = 'pdf';

# This needs to be augmented by editing MediaWiki:Protect-level-* to
# 'Allow all including anons/not-logged-in'
array_splice($wgRestrictionLevels, 1, 0, '*');

# Must be after $wgGroupPermissions are set.
require_once "$IP/extensions/EditSubpages/EditSubpages.php";

$wgHiddenGroups = array('spambot', 'suspectedspambot', 'testing');

# Adding in name spaces as suggested by Netocrat

$wgExtraNamespaces = array(	100 => "Planning",
				101 => "Planning_Talk"
			  );

define('NS_DECISION'          ,  300);
$wgExtraNamespaces[NS_DECISION    ] = 'Decision';
$wgExtraNamespaces[NS_DECISION + 1] = 'Decision_talk';

# Allow per user css and Javascript
$wgAllowUserJs = true;
$wgAllowUserCss = true;

# Don't auto-capitalise the first letter of pages
$wgCapitalLinks = false;

#include('extensions/bad-behavior/bad-behavior-mediawiki.php');

# Cache start time set to after last code modification that would affect the displayed page
$wgCacheEpoch = '20160626150800';
$wgCacheEpochTouchFile = '/tmp/mediawiki_cache_epoch';

# Don't set this true until the stale cache issues have been resolved
$wgCachePages = false; # avoid client-caching
# Use a disk cache as well as the parser cache that relies on memcached.
# This disk cache stores the full page's html, including skin output, whereas
# the parser cache only stores the page's parsed wiki content as html.
$wgUseFileCache = true;
$wgFileCacheDirectory = "/var/clc-wiki/clcfilecache";
$wgShowIPinHeader = false;

$wgDebugLogFile = '/var/clc-wiki/debug/mwdebug.log';
$wgTreeviewLogfile = '/var/clc-wiki/debug/treeview.log';
$wgMemCachedDebug = true;

require_once "$IP/extensions/SpamBlacklist/SpamBlacklist.php";

$wgSpamBlacklistFiles = array(
   "http://meta.wikimedia.org/w/index.php?title=Spam_blacklist&action=raw&sb_ver=1",
   "http://en.wikipedia.org/w/index.php?title=MediaWiki:Spam-blacklist&action=raw&sb_ver=1"
);
# $wgSpamUserRegexes is set in LocalOverrides.php

require_once "$IP/extensions/TitleBlacklist/TitleBlacklist.php";

$wgTitleBlacklistSources = array(
    array(
         'type' => TBLSRC_URL,
         'src'  => 'http://meta.wikimedia.org/w/index.php?title=Title_blacklist&action=raw',
    ),
);

# Require users to respond to a confirmation email before they can edit
# as a spam prevention measure
#$wgEmailConfirmToEdit = true;

$wgShowExceptionDetails = false;

# For the SpamBlacklist extension
if (!defined('PROTO_HTTP')) define( 'PROTO_HTTP', 'http://' );

require_once "$IP/extensions/CheckUser/CheckUser.php";

$wgUseGzip = true;

// Only record profiling info for pages that took longer than this
$wgProfileLimit = 0.0;
// Don't put non-profiling info into log file
$wgProfileOnly = false;
// Log sums from profiling into "profiling" table in db
$wgProfileToDatabase = true;
// If true, print a raw call tree instead of per-function report
$wgProfileCallTree = false;
// Should application server host be put into profiling table
$wgProfilePerHost = false;
 
// Settings for UDP profiler
$wgUDPProfilerHost = '127.0.0.1';
$wgUDPProfilerPort = '3811';
 
// Detects non-matching wfProfileIn/wfProfileOut calls
$wgDebugProfiling = false;
// Output debug message on every wfProfileIn/wfProfileOut
$wgDebugFunctionEntry = 0;
// Lots of debugging output from SquidUpdate.php
$wgDebugSquid = false;

$wgEnableProfileInfo = true;
#$wgDebugToolbar = true;





$wgShowExceptionDetails = true;


# Additional configuration added by MJG

# Permission keys given to users in each group.
# All users are implicitly in the '*' group including anonymous visitors;
# logged-in users are all implicitly in the 'user' group. These will be
# combined with the permissions of all groups that a given user is listed
# in in the user_groups table.
#
# This replaces wgWhitelistAccount and wgWhitelistEdit
#
#$wgGroupPermissions = array();
$wgGroupPermissions['bureaucrat']['renameuser'] = true;
$wgGroupPermissions['bureaucrat']['siteadmin'] = true;
$wgGroupPermissions['bureaucrat']['editinterface'] = true;
$wgGroupPermissions['bureaucrat']['postlink']	= true;
$wgGroupPermissions['sysop']['createpage']      = true;
$wgGroupPermissions['sysop']['createtalk']      = true;
$wgGroupPermissions['sysop']['edit']            = true;
$wgGroupPermissions['sysop']['read']            = true;
$wgGroupPermissions['sysop']['rebuildtreeview'    ] = true;
$wgGroupPermissions['sysop']['parsetreeview'      ] = true;
$wgGroupPermissions['sysop']['treeviewcachestatus'] = true;
$wgGroupPermissions['sysop']['passwordreset']   = true;
$wgGroupPermissions['sysop']['delete']		= true;
$wgGroupPermissions['sysop']['undelete']	= true;
$wgGroupPermissions['sysop']['hideuser']	= true;
$wgGroupPermissions['sysop']['postlink']	= true;
$wgGroupPermissions['trusted']['postlink']      = true;
$wgGroupPermissions['trusted' ]['createpage']   = true;
$wgGroupPermissions['trusted' ]['createtalk']   = true;
$wgGroupPermissions['autoconfirmed']['edit']    = true;
$wgGroupPermissions['user' ]['upload']          = true;
$wgGroupPermissions['user' ]['createpage']      = false;
$wgGroupPermissions['user' ]['createtalk']      = false;
$wgGroupPermissions['user' ]['edit']            = false;
$wgGroupPermissions['user' ]['move']            = false;
$wgGroupPermissions['user' ]['vote']		= true;
$wgGroupPermissions['user' ]['propose']		= true;
$wgGroupPermissions['user' ]['skipcaptcha']	= true;
$wgGroupPermissions['testing']                  = array();
$wgGroupPermissions['spambot']                  = array();
$wgGroupPermissions['suspectedspambot']         = array();
$wgGroupPermissions['*'    ]['createpage']      = false;
$wgGroupPermissions['*'    ]['createtalk']      = false;
$wgGroupPermissions['*'    ]['createaccount']   = true;
$wgGroupPermissions['*'    ]['read']            = true;
$wgGroupPermissions['*'    ]['edit']            = false;

Personal tools