Difference between revisions of "Mediawiki installation, customization and operation"

From Madagascar
Jump to navigation Jump to search
Line 45: Line 45:
* [http://www.mediawiki.org/wiki/Extension:ConfirmEdit ConfirmEdit]
* [http://www.mediawiki.org/wiki/Extension:ConfirmEdit ConfirmEdit]
* GeSHi (syntax highlighting)
* GeSHi (syntax highlighting)
* SpamBlacklist
* Math
* [http://www.mediawiki.org/wiki/Extension:VisualMathCaptcha VisualMathCaptcha], installed in conjunction with ConfirmEdit
* [http://www.mediawiki.org/wiki/Extension:VisualMathCaptcha VisualMathCaptcha], installed in conjunction with ConfirmEdit
* Widgets:
* Widgets:

Revision as of 13:49, 17 April 2014


The Madagascar Mediawiki installation consists of:

  • A SQL database back-end, that holds text, images, history and user data
  • A set of PHP scripts, that dynamically generate the HTML pages
  • Auxiliary files uploaded directly to the server

Advanced web hosting providers offer "one-click" installs of Mediawiki, but database migration and PHP customization must still be performed.


In LocalSettings.php, set

$wgFavicon = '/wikilocal/style/favicon.png';
$wgLogo    = '/wikilocal/style/Madagascar2.png';


In LocalSettings.php set


'<script type="text/javascript" src="http://www.ohloh.net/p/348236/widgets/project_partner_badge.js"></script>',
#$wgFooterIcons['poweredby']['sourceforge'] = array(
#        "src" => "http://sflogo.sourceforge.net/sflogo.php?group_id=162909&amp;type=13",
#        "url" => "http://sourceforge.net/projects/rsf",
#        "alt" => "Get Madagascar at SourceForge.net. Fast, secure and Free Open Source software downloads",
$wgFooterIcons['poweredby']['cafepress'] = array(
        "src" => "/wikilocal/style/store.png",
        "url" => "http://www.cafepress.com/m8r",
        "alt" => "Madagascar Store",


These are installed in the extensions directory. Currently installed extensions are:

  • googleAnalytics
  • Cite
  • ConfirmEdit
  • GeSHi (syntax highlighting)
  • Math
  • VisualMathCaptcha, installed in conjunction with ConfirmEdit
  • Widgets:
    • Feed (for the RSFlog RSS feed)
    • YouTube (for some on-screen demos and lectures)



Backups should cover the wiki installation (SQL backups must be made by proper script, not by simply copying a file!), as well as a static copy of a wiki to be used in case the database is corrupted during file transfer.

Defending against spammers and vandals

Allowing only registered users to edit the wiki

This is a measure that was deemed necessary after two years of daily undo-and-block warfare against spammers. To set it, use in LocalSettings.php:

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

Disabling registration of new users

This is a temporary measure, to be used as a stopgap against large attacks, until a permanent effective measure has been found.

Disallowing users to create new pages

Again, a temporary measure. For attacks which are not so heavy as to warrant disabling registration of new users, and in which spammers are weeded out manually. Several hours may pass between verifications of edits, in which a spammer can create many new pages. Works for attacks centered on new page creation. To set this, use

$wgGroupPermissions['user']['createpage'] = false;

in LocalSettings.php .

Disabling media uploads

To disable uploads via the web interface, set

$wgEnableUploads = false;

in LocalSettings.php . To upload images from the command line, without using the web interface, use

php wiki/maintenance/importImages.php /path/to/dir/with/images extensions

If file permission problems are encountered, then

chmod -R g+w wiki/images