Category mediawiki

Mediawiki post-spam clean up

I found that every page and discussion page in my Society and Environment Development  wiki had been written to anonymously with spam links. Also most of my content had been deleted. Fortunately there are only about 6 pages but it still took me an hour to work out what to do and get rid of the mess. Basically, for each page (article and discussion) I had to revert to the last version before the spam was added, delete the page and then restore the page selecting only the revisions I wanted to keep.

Sadly I have also had to change the permissions so that only logged in users can edit.

Customize MediaWiki into Your Ultimate Collaborative Web Site

Useful post on Customize MediaWiki into Your Ultimate Collaborative Web Site by Lifehacker. Just stuck this post here until I get time to read it and apply any tips to the Mediawiki installed here. The post mentions a rather nice Mediawiki installation used as a collaboratively written guide book The Complete Guide to Google Wave.

Mediawiki page group access control setup

Mediawiki make it quite clear that it is not the best product if you want to create and manage private pages for specified users. However, it is possible to set up group based access to pages using the Mediawiki group access extension. This link takes you to the instructions on how to install the extension and how to use it to make pages private to groups of users. You can also download the extension files.The following text is added to the localSettings.php file:

require_once(“extensions/accesscontrolSettings.php”);
include(“extensions/accesscontrol.php”);

It may be necessary to edit the contents of the accesscontrolSettings.php as instructed. One thing that needs doing here is to uncomment the english version lines and comment or delete the german version lines. Another edit I made was to make a No_Access page display within the wiki. To do this I had to create the No_Access page and edit the following line:

$wgAccessControlNoAccessPage = “/index.php/No_Access”;
This took the reader to the WP installation 404 page and therefore outside of the wiki.

$wgAccessControlNoAccessPage = “../index.php/No_Access”;
This takes the reader to a no access page I created within the wiki.

In another installation I did a year or so ago sometimes an access controlled page would appear to be public still. I found the following fix, to disable caching, on the talk page to the above extension page:
Mediawiki group access extension: Talk page

$wgMainCacheType = CACHE_NONE;
$wgMessageCacheType = CACHE_NONE;
$wgParserCacheType = CACHE_NONE;
$wgCachePages = false;

A warning indicates that this is necessary for the access controls to work properly.

Mediawiki logo change

I have now managed to change the default Mediawiki logo. I added the $wglogo line to the localConfig.php file as before but put in the full path to the file:

$wgLogo = “http://terrywassall.org/wiki/logo.png“;

This now works fine. The image size has to be 135 x 135 and I created it with a transparent background using Fireworks

Mediawiki installed

Since I have not been able to get any advice on what might be a better OS wiki to host here I have  installed Mediawiki using the 34SP Mediawiki installation utility. The necessary database and db user have to be set up first but after that all the required information,domain,  ftp, e.g.,  is entered into the installation form including a password for the Mediawiki admin account that will be created and the process takes place automatically. The resulting installation is fully public and open to user account creation on demand and anonymous editing but this is soon secured by adding the appropriate lines to the localSettings .php file. This following disables anonymous editing and account creation.

$wgGroupPermissions['*' ]['read'] = true;
$wgGroupPermissions['*' ]['edit'] = false;
$wgGroupPermissions['*' ]['createaccount'] = false;

The first line allows public reading of pages but changing this to false would mean that only logged on users can read. I have left pages publicly readable and will protect pages as required using the control access feature.

I also tried to change the default logo by uploading a new logo image and adding  the

$wgLogo = ‘/path/to/your/logo.png’;

to the localSettings .php file but I couldn’t get this to work. The new log failed to display. This may be something to do with paths and permissions and I will have another go later. Another approach will be to overwrite the skins/common images/wiki.png with my own logo file but this will need redoing every time I upgrade and is not recommended.

Copyright © terrywassall.org
work in progress

Built on Notes Blog Core
Powered by WordPress