MediaWiki

From LQWiki
Jump to navigation Jump to search

Mediawiki is a wiki that is used e.g. by LQ Wiki and Wikipedia.

Config

The default config is to allow anonymous editing of any page and self registration.

Disabling anonymous editing

Edit LocalSettings.php and make sure it contains the lines

$wgGroupPermissions['*'    ]['edit']            = false;
$wgGroupPermissions['*'    ]['createpage']      = false;
$wgGroupPermissions['*'    ]['createtalk']      = false;

Disabling self-registration

If you want to stop people self-registering the add another line to the LocalSettings.php

$wgGroupPermissions['*'    ]['createaccount']   = false;

below the line

require_once( "includes/DefaultSettings.php" );

Allowing pictures

If you are the only editor of a wiki (otherwise security flaws!) and want to allow pictures from all over the web, add the following line to the LocalSettings.php

$wgAllowExternalImages = true;

below the line

require_once( "includes/DefaultSettings.php" );

Allow all html tags

If you are the only editor of a wiki (otherwise security flaws!) and want to allow any html code in your wiki, read and follow http://www.mediawiki.org/wiki/Manual:%24wgRawHtml

Changing the sidebar

This is done on the application level; just edit Mediawiki:Sidebar.

beautify URL

By default, mediawiki's main page is in http://whatever/index.php/Main_Page. To get rid of "index.php", read and follow http://www.mediawiki.org/wiki/Manual:Short_URL

Setup