Mediawiki installation, customization and operation
Installation
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.
Customization
Favicon and logo
In LocalSettings.php, set <php> $wgFavicon = '/wikilocal/style/favicon.png'; $wgLogo = '/wikilocal/style/Madagascar2.png'; </php>
To insert the images/links to the Ohloh, Sourceforge and Cafepress, edit includes/Skin.php to replace the default function getPoweredBy() with:
<php>
function getPoweredBy() { global $wgStylePath; $ohloh = '<script type="text/javascript" src="http://www.ohloh.net/p/348236/widgets/project_thin_badge.js"></script>'; $sf1='<a href="http://sourceforge.net/projects/rsf">'; $sf2='<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=162909&type=13" width="120" height="30" border="0" '; $sf3='alt="Get Madagascar at SourceForge.net. Fast, secure and Free Open Source software downloads"/></a> '; $sourceforge = $sf1.$sf2.$sf3; $url = htmlspecialchars( "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" ); $banner = htmlspecialchars( "/wikilocal/style/store.png" ); $store = '<a href="http://www.cafepress.com/m8r"> <img src="'.$banner.'" width="88" height="31" border="0" alt="Madagascar Store" /></a> '; $img = $ohloh.$sourceforge.$store.'<a href="http://www.mediawiki.org/"><img src="'.$url.'" alt="MediaWiki" /></a>'; return $img; }
</php>
Extensions
These are installed in the extensions directory. Currently installed extensions are:
- googleAnalytics
- Cite
- ConfirmEdit
- GeSHi (syntax highlighting)
- SpamBlacklist
- VisualMathCaptcha, installed in conjunction with ConfirmEdit
- Widgets:
- Feed (for the RSFlog RSS feed)
- YouTube (for some on-screen demos and lectures)
Operation
Backups
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: <php> $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['createpage'] = false; $wgGroupPermissions['*']['createtalk'] = false; </php>
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 <php> $wgGroupPermissions['user']['createpage'] = false; </php> in LocalSettings.php .
Disabling media uploads
To disable uploads via the web interface, set <php> $wgEnableUploads = false; </php> in LocalSettings.php .