Austrian Economics Wiki:LocalSettings.php: Difference between revisions
Appearance
No edit summary |
|||
| Line 1: | Line 1: | ||
This is the [[mw:Manual:LocalSettings.php|LocalSettings.php]] file for [[Mises Wiki]], which contains its [[mw:Manual:Configuration settings|configuration settings]]. | This is the [[mw:Manual:LocalSettings.php|LocalSettings.php]] file for [[Mises Wiki]], which contains its [[mw:Manual:Configuration settings|configuration settings]]. | ||
< | <source lang="php"> | ||
<?php | <?php | ||
# This file was automatically generated by the MediaWiki installer. | # This file was automatically generated by the MediaWiki installer. | ||
# If you make manual changes, please keep track in case you need to | # If you make manual changes, please keep track in case you need to | ||
| Line 17: | Line 18: | ||
# the other MediaWiki files. It will be used as a base to locate files. | # the other MediaWiki files. It will be used as a base to locate files. | ||
if( defined( 'MW_INSTALL_PATH' ) ) { | if( defined( 'MW_INSTALL_PATH' ) ) { | ||
$IP = MW_INSTALL_PATH; | $IP = MW_INSTALL_PATH; | ||
} else { | } else { | ||
$IP = dirname( __FILE__ ); | $IP = dirname( __FILE__ ); | ||
} | } | ||
| Line 28: | Line 29: | ||
if ( $wgCommandLineMode ) { | if ( $wgCommandLineMode ) { | ||
if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) { | if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) { | ||
die( "This script must be run from the command line\n" ); | die( "This script must be run from the command line\n" ); | ||
} | } | ||
} | } | ||
## Uncomment this to disable output compression | ## Uncomment this to disable output compression | ||
| Line 69: | Line 70: | ||
## Database settings | ## Database settings | ||
$wgDBtype = "mysql"; | $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 | # MySQL specific settings | ||
| Line 117: | Line 118: | ||
$wgLanguageCode = "en"; | $wgLanguageCode = "en"; | ||
## Default skin: you can change the default skin. Use the internal symbolic | ## Default skin: you can change the default skin. Use the internal symbolic | ||
| Line 168: | Line 167: | ||
$wgHooks['SkinAfterBottomScripts'][] = 'mises_analytic_scripts'; | $wgHooks['SkinAfterBottomScripts'][] = 'mises_analytic_scripts'; | ||
function mises_analytic_scripts($skin, &$text='') { | function mises_analytic_scripts($skin, &$text='') { | ||
$text = <<<HTML | $text = <<<HTML | ||
<!-- Start Quantcast tag --> | <!-- Start Quantcast tag --> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
_qoptions={qacct:"p-254YVY27hwGSg"}; | _qoptions={qacct:"p-254YVY27hwGSg"}; | ||
</script> | </script> | ||
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script> | <script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script> | ||
<noscript> | <noscript> | ||
<img src="http://pixel.quantserve.com/pixel/p-254YVY27hwGSg.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/> | <img src="http://pixel.quantserve.com/pixel/p-254YVY27hwGSg.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/> | ||
</noscript> | </noscript> | ||
<!-- End Quantcast tag --> | <!-- End Quantcast tag --> | ||
<!-- Start Google Analytics --> | <!-- Start Google Analytics --> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
var _gaq = _gaq || []; | var _gaq = _gaq || []; | ||
_gaq.push(['_setAccount', 'UA-293348-1']); | _gaq.push(['_setAccount', 'UA-293348-1']); | ||
_gaq.push(['_trackPageview']); | _gaq.push(['_trackPageview']); | ||
(function() { | (function() { | ||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | 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'; | 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); | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||
})(); | })(); | ||
</script> | </script> | ||
<!-- End Google Analytics --> | <!-- End Google Analytics --> | ||
HTML; | HTML; | ||
return true; | return true; | ||
} | } | ||
| Line 197: | Line 196: | ||
//require_once( "$IP/extensions/recaptcha/ReCaptcha.php" ); | //require_once( "$IP/extensions/recaptcha/ReCaptcha.php" ); | ||
// Sign up for these at https://www.google.com/recaptcha/admin/create | // 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 | # Fix the default captcha behaviour | ||
| Line 248: | Line 246: | ||
// enable wikipedia instant commons | // enable wikipedia instant commons | ||
$wgUseInstantCommons = true; | #$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 | // rename user extension | ||
| Line 260: | Line 268: | ||
// New ConfirmEdit extension | // New ConfirmEdit extension | ||
require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" ); | #require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" ); | ||
#require_once( "$IP/extensions/ConfirmEdit/ReCaptcha.php" ); | |||
require_once("$IP/extensions/ | require_once("$IP/extensions/Asirra/Asirra.php"); | ||
$wgCaptchaClass = 'Asirra'; | //$wgCaptchaClass = 'Asirra'; | ||
#$wgCaptchaClass = 'ReCaptcha'; | |||
$wgGroupPermissions['user']['skipcaptcha'] = false; | $wgGroupPermissions['user']['skipcaptcha'] = false; | ||
| Line 304: | Line 309: | ||
$wgCaptchaTriggers['createaccount'] = true; | $wgCaptchaTriggers['createaccount'] = true; | ||
$wgCaptchaTriggers['badlogin'] = true; | $wgCaptchaTriggers['badlogin'] = true; | ||
</ | |||
// Syntax highlight extension | |||
require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php"); | |||
$wgSyntaxHighlightDefaultLang = "php"; | |||
</source> | |||
==See also== | ==See also== | ||
Revision as of 12:57, 5 October 2012
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 = "MisesWiki";
## 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";
## 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";
#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...';
// force new users (those with fewer than two edits) to complete a Captcha in order to create a page
$wgAutoConfirmCount = 2;
// enabling subpages for Template and MediaWiki namespaces
$wgNamespacesWithSubpages[NS_TEMPLATE] = true;
$wgNamespacesWithSubpages[NS_PROJECT] = true;
// 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;
//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 = 6; // 6 edits
$wgGroupPermissions['*' ]['skipcaptcha'] = false;
$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true;
$wgCaptchaTriggers['edit'] = false;
$wgCaptchaTriggers['create'] = false;
$wgCaptchaTriggers['addurl'] = true;
$wgCaptchaTriggers['createaccount'] = true;
$wgCaptchaTriggers['badlogin'] = true;
// Syntax highlight extension
require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");
$wgSyntaxHighlightDefaultLang = "php";