MediaWiki

From Things and Stuff Wiki
Revision as of 07:22, 11 February 2013 by Milk (talk | contribs) (→‎= Categories)
Jump to navigation Jump to search


Setup

Nginx

Upgrade

Download latest, extract on-top of current. Be careful with overwriting if you have hacked a core theme.

tar xvzf mediawiki-1.19.1.tar.gz -C . --strip-components=1
php maintenance/update.php

Upgrade requires DB user grants for: select, insert, update, delete, alter, index

http://www.mediawiki.org/w/api.php?action=expandtemplates&text=http://download.wikimedia.org/mediawiki/{{MW%20stable%20branch%20number}}/mediawiki-{{MW%20stable%20release%20number}}.tar.gz

Backup

change vars;

nice -n 19 mysqldump -u $USER --password=$PASSWORD $DATABASE -c
nice -n 19 gzip -9 > wiki-$DATABASE-$(date '+%Y%m%d').sql.gz

Configuration

Usage

Markup

Hotkeys

Interwiki

Categories

Theming and frontend

Footer links

MediaWiki:Privacy
MediaWiki:Aboutsite
MediaWiki:Disclaimers

Layout

Social

Content

WYSIWYG

Users and permissions

  • Special:UserRights - User rights management

Namespace protection

# Only allow autoconfirmed users to edit Project namespace
$wgNamespaceProtection[NS_PROJECT] = array( 'autoconfirmed' );
 
# Don't allow anyone to edit non-talk pages until they've confirmed their
# e-mail address (assuming we have no custom namespaces and allow edits
# from non-emailconfirmed users to start with)
# Note for 1.13: emailconfirmed group and right were removed from default
# setup, if you want to use it, you'll have to re-enable it manually
$wgNamespaceProtection[NS_MAIN]     = $wgNamespaceProtection[NS_USER]  =
$wgNamespaceProtection[NS_PROJECT]  = $wgNamespaceProtection[NS_IMAGE] =
$wgNamespaceProtection[NS_TEMPLATE] = $wgNamespaceProtection[NS_HELP]  =
 $wgNamespaceProtection[NS_CATEGORY] = array( 'emailconfirmed' );
 
# Only allow sysops to edit "Policy" namespace
$wgGroupPermissions['sysop']['editpolicy'] = true;
$wgNamespaceProtection[NS_POLICY] = array( 'editpolicy' );


Resources

Anti-spam

# Protect shit
require_once("$IP/extensions/ConfirmEdit/ConfirmEdit.php");
require_once("$IP/extensions/ConfirmEdit/QuestyCaptcha.php"); 
$wgCaptchaClass = 'QuestyCaptcha';
$wgCaptchaQuestions[] = array( 'question' => '123 + 1 =', 'answer' => '124' );
$wgCaptchaQuestions[] = array( 'question' => '321 + 2 =', 'answer' => '323' );
etc.
 
$wgGroupPermissions['*'            ]['skipcaptcha'] = false;
$wgGroupPermissions['user'         ]['skipcaptcha'] = false;
$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = false;
$wgGroupPermissions['bot'          ]['skipcaptcha'] = true; // registered bots
$wgGroupPermissions['sysop'        ]['skipcaptcha'] = true;

$wgGroupPermissions['emailconfirmed']['skipcaptcha'] = true;
$ceAllowConfirmedEmail = true;

$wgCaptchaTriggers['edit']          = false; 
$wgCaptchaTriggers['create']        = false; 
$wgCaptchaTriggers['addurl']        = true; 
$wgCaptchaTriggers['createaccount'] = true;
$wgCaptchaTriggers['badlogin']      = true;

Tools

Templates