Austrian Economics Wiki:LocalSettings.php
Appearance
This is the LocalSettings.php file for Mises Wiki, which contains its configuration settings.
<?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.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# http://www.mediawiki.org/wiki/Manual:Configuration_settings
# If you customize your file layout, set $IP to the directory that contains
# the other MediaWiki files. It will be used as a base to locate files.
if( defined( 'MW_INSTALL_PATH' ) ) {
$IP = MW_INSTALL_PATH;
} else {
$IP = dirname( __FILE__ );
}
$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
require_once( "$IP/includes/DefaultSettings.php" );
if ( $wgCommandLineMode ) {
if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
die( "This script must be run from the command line\n" );
}
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "Mises Wiki";
## 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 please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/mediawiki";
$wgScriptExtension = ".php";
# shortURL rewrite settings
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;
## 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 = "$wgStylePath/misesskin/images/shield.png";
#$wgLogo = "$wgStylePath/misesskin/images/globe.png";
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "webmaster@mises.org";
$wgPasswordSender = "webmaster@mises.org";
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
// For security reasons, the database passwords are stored outside webroot.
// See https://www.mediawiki.org/wiki/Manual:Securing_database_passwords
require_once("/home/web/wiki_passwords/wiki_passwords.php");
# MySQL specific settings
$wgDBprefix = "mw_";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# Experimental charset support for MySQL 4.1/5.0.
$wgDBmysql5 = true;
## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = array();
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgMaxShellMemory = 524288;
## 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";
## 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 = 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";
$wgLocalInterwiki = strtolower( $wgSitename );
$wgLanguageCode = "en";
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = 'misesskin';
## 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 = "";
$wgRightsText = "";
$wgRightsIcon = "";
# $wgRightsCode = ""; # Not yet used
$wgDiff3 = "/usr/bin/diff3";
# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
# cite extension
require_once("$IP/extensions/Cite/Cite.php");
# remove user ability to change skins
$wgHiddenPrefs[] = 'skin';
# parserFunctions
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
# allow a user to directly upload files from a URL, instead of from a file
$wgAllowCopyUploads = true;
# To prevent normal users from uploading files
$wgGroupPermissions['user']['upload'] = false;
# allow "autoconfirmed" (non-newbie) users to upload files:
$wgGroupPermissions['autoconfirmed']['upload'] = true;
# category tree extension
$wgUseAjax = true;
require_once("{$IP}/extensions/CategoryTree/CategoryTree.php");
# charinsert extension
require_once("$IP/extensions/CharInsert/CharInsert.php");
# favicon
$wgFavicon = "$wgScriptPath/favicon.png";
$wgAppleTouchIcon = "$wgScriptPath/touch_icon.png";
// hook bottomscripts to add analytics javascript
$wgHooks['SkinAfterBottomScripts'][] = 'mises_analytic_scripts';
function mises_analytic_scripts($skin, &$text='') {
$text = <<<HTML
<!-- Start Quantcast tag -->
<script type="text/javascript">
_qoptions={qacct:"p-254YVY27hwGSg"};
</script>
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<noscript>
<img src="http://pixel.quantserve.com/pixel/p-254YVY27hwGSg.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
</noscript>
<!-- End Quantcast tag -->
<!-- Start Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-293348-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->
HTML;
return true;
}
# reCAPTCHA anti-spam
//require_once( "$IP/extensions/recaptcha/ReCaptcha.php" );
// Sign up for these at https://www.google.com/recaptcha/admin/create
// Keys removed to the wiki_passwords.php file
# Fix the default captcha behaviour
$wgGroupPermissions['*' ]['skipcaptcha'] = false;
$wgGroupPermissions['user' ]['skipcaptcha'] = false;
$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true;
$wgGroupPermissions['bot' ]['skipcaptcha'] = true; // registered bots
$wgGroupPermissions['sysop' ]['skipcaptcha'] = true;
$wgCaptchaTriggers['edit'] = false;
$wgCaptchaTriggers['create'] = true;
$wgCaptchaTriggers['createaccount'] = true;
$wgCaptchaTriggers['addurl'] = true;
$wgCaptchaTriggers['badlogin'] = true;
#collection extension (pdf, odf, and book printing)
require_once("$IP/extensions/Collection/Collection.php");
#more extensions
//require_once("$IP/extensions/ProofreadPage/ProofreadPage.php");
require_once ( 'extensions/LabeledSectionTransclusion/lst.php' );
require_once ( 'extensions/LabeledSectionTransclusion/lsth.php' );
# custom namespaces
$wgExtraNamespaces[400] = "Index";
$wgExtraNamespaces[401] = "Index_talk";
$wgExtraNamespaces[402] = "Page";
$wgExtraNamespaces[403] = "Page_talk";
$wgExtraNamespaces[404] = "Argumentation";
$wgExtraNamespaces[405] = "Argumentation_talk";
$wgExtraNamespaces[406] = "Essay";
$wgExtraNamespaces[407] = "Essay_talk";
$wgExtraNamespaces[408] = "Book";
$wgExtraNamespaces[409] = "Book_talk";
$wgExtraNamespaces[410] = "Debate";
$wgExtraNamespaces[411] = "Debate_talk";
#pdfhandler and pdf file uploading settings
require_once("$IP/extensions/PdfHandler/PdfHandler.php");
$wgFileExtensions[] = 'pdf';
$wgMimeDetectorCommand = "file -bi";
#checkuser
require_once("$IP/extensions/CheckUser/CheckUser.php");
// $wgReadOnly = 'MIGRATING TO NEW SERVER TODAY...';
// enabling subpages for Template and MediaWiki namespaces
#$wgNamespacesWithSubpages[NS_TEMPLATE] = true;
#$wgNamespacesWithSubpages[NS_PROJECT] = true;
# Enable subpages in all namespaces except mainspace
$wgNamespacesWithSubpages = array_fill(1, 500, true);
$wgContentNamespaces[] = 0;
$wgContentNamespaces[] = 404; // Argumentation
$wgContentNamespaces[] = 406; // Essay
$wgContentNamespaces[] = 408; // Book
$wgContentNamespaces[] = 410; // Debate
// spam blocking
require_once( "$IP/extensions/SpamBlacklist/SpamBlacklist.php" );
require_once( "$IP/extensions/bannedips.php" );
// enable wikipedia instant commons
#$wgUseInstantCommons = true;
// might as well use enwiki instead of commons; get more images that way
$wgForeignFileRepos[] = array(
'class' => 'ForeignAPIRepo',
'name' => 'shared',
'apibase' => 'http://en.wikipedia.org/w/api.php',
'fetchDescription' => true, // Optional
'descriptionCacheExpiry' => 86400, // 24 hours, optional (values are seconds)
'apiThumbCacheExpiry' => 86400, // 24 hours, optional, but required for local thumb caching
);
// rename user extension
require_once( "$IP/extensions/Renameuser/Renameuser.php" );
//$wgReadOnly = 'Maintenance is underway. Website is on read-only mode';
$wgShowExceptionDetails = true;
require_once( "$IP/extensions/RandomSelection/RandomSelection.php" );
// New ConfirmEdit extension
#require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" );
#require_once( "$IP/extensions/ConfirmEdit/ReCaptcha.php" );
require_once("$IP/extensions/Asirra/Asirra.php");
//$wgCaptchaClass = 'Asirra';
#$wgCaptchaClass = 'ReCaptcha';
$wgGroupPermissions['user']['skipcaptcha'] = false;
$wgCaptchaTriggers['edit'] = true;
// InterWiki extension
require_once("$IP/extensions/Interwiki/Interwiki.php");
// To grant sysops permissions to edit interwiki data
$wgGroupPermissions['sysop']['interwiki'] = true;
// To create a new user group that may edit interwiki data
// (bureaucrats can add users to this group)
$wgGroupPermissions['developer']['interwiki'] = true;
$wgEnableScaryTranscluding = true;
$wgInterwikiMagic = true;
$wgHideInterlanguageLinks = false;
// E.g. for book titles
$wgRestrictDisplayTitle = false;
// Red exclamation points are mostly just an annoyance
$wgUseNPPatrol = false;
$wgUseRCPatrol = false;
//rss extension
require_once("$IP/extensions/RSS/RSS.php");
//Disallow anonymous user editing
#$wgGroupPermissions['*']['edit'] = false;
// new settings per http://wiki.mises.org/wiki/MisesWiki:Configuration
$wgAutoConfirmAge = 3600 * 24; // one day
$wgAutoConfirmCount = 1; // 1 edit (pointless to set it higher)
// Cause autopromotion at 24 hours from first edit, rather than from
// account creation. This gives an opportunity to review that first
// edit and make sure it's not spammy, before he gets exempted from
// CAPTCHAs.
$wgAutopromote = array(
"autoconfirmed" => array( "&",
array( APCOND_EDITCOUNT, &$wgAutoConfirmCount ),
array( APCOND_AGE_FROM_EDIT, &$wgAutoConfirmAge ),
),
);
$wgGroupPermissions['*' ]['skipcaptcha'] = false;
$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true;
$wgCaptchaTriggers['edit'] = false;
$wgCaptchaTriggers['create'] = true;
$wgCaptchaTriggers['addurl'] = true;
$wgCaptchaTriggers['createaccount'] = true;
$wgCaptchaTriggers['badlogin'] = true;
// Limit IPs and newbies to editing 6 times per minute; regrettably,
// given the small number of pages on Mises Wiki, and the lack of
// 24-hour supervision, this would not prevent an overnight attack
// vandalizing essentially everything in a few hours
#$wgRateLimits['edit']['ip'] = array( 6, 60 );
#$wgRateLimits['edit']['newbie'] = array( 6, 60 );
// Syntax highlight extension
require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");
$wgSyntaxHighlightDefaultLang = "php";
// Purge extension
require_once("$IP/extensions/Purge/Purge.php");
// Vector extension
require_once( "$IP/extensions/Vector/Vector.php" );