Mediawiki/Mediawiki example setup

From Bjoern Hassler

Jump to: navigation, search

Previous example setup here: Mediawiki example setup/Steeple

Recommendations for setting up http://oer.aptivate.org.

The recommendation was to install the latest stable version, currently 1.14.

Contents

[edit] 1 Pretty urls

It would be good to have pretty urls. However, certain ways of doing pretty urls can break the collection extension.

Best to use this guide: Mediawiki/Pretty urls

[edit] 2 Settings

The following should go into the LocalSettings.php

# User settings:
# http://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions
$wgDefaultUserOptions['numberheadings' ] = 1;
$wgDefaultUserOptions['enotifwatchlistpages'] = 1;
$wgDefaultUserOptions['enotifusertalkpages'] = 1;
$wgDefaultUserOptions['enotifminoredits'] = 1;
$wgDefaultUserOptions['watchcreations'] = 1;
$wgDefaultUserOptions['watchdefault'] = 1;
$wgDefaultUserOptions['watchmoves'] = 1;
$wgDefaultUserOptions['watchdeletion'] = 1;
$wgDefaultUserOptions['justify'] = 1;
$wgDefaultUserOptions['imagesize'] = 0;
$wgDefaultUserOptions['thumbsize'] = 0;

$wgEnableEmail      = true;
$wgEnableUserEmail  = true;
$wgEmailConfirmToEdit = true;

$wgEnableUploads       = true;
$wgFileExtensions[] = 'pdf';
$wgNamespacesWithSubpages[NS_MAIN] = true;

The following variables

$wgEmergencyContact = "...";
$wgPasswordSender = "...";

should contain a mailing list that includes the main administrators.

[edit] 3 Extensions

Extensions to be installed:

Configuration in Local Settings:

#EXTENSION - http://www.mediawiki.org/wiki/Extension:ParserFunctions
require_once("$IP/extensions/ParserFunctions/ParserFunctions.php");
# EXTENSION - Google Analytics - http://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration
require_once( "$IP/extensions/googleAnalytics/googleAnalytics.php" );
$wgGoogleAnalyticsAccount = "TRACKING CODE";
# Optional Variables (both default to true)
$wgGoogleAnalyticsIgnoreSysops = false;
$wgGoogleAnalyticsIgnoreBots = false;
# EXTENSION - http://www.mediawiki.org/wiki/Extension:New_User_Email_Notification
require_once( "{$IP}/extensions/NewUserNotif/NewUserNotif.php" );
# EXTENSION - Collection - http://www.mediawiki.org/wiki/Extension:Collection
require_once("$IP/extensions/Collection/Collection.php");
$wgCollectionFormats = array(
     'rl' => 'PDF',
     'odf' => 'ODT',
     'docbook' => 'DocBook XML',
     'xhtml' => 'XHTML 1.0 Transitional'
);

[edit] 4 Additional extensions

[edit] 4.1 syntax highlighting

http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi

cd extensions
svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SyntaxHighlight_GeSHi
cd SyntaxHighlight_GeSHi
svn co http://geshi.svn.sourceforge.net/svnroot/geshi/branches/RELEASE_1_0_X_STABLE/geshi-1.0.X/src/ geshi

And in the local settings:

require_once("extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");

[edit] 4.2 page trail

require_once( "extensions/StubManager/StubManager.php" );
require_once( "$IP/extensions/PageTrail/PageTrail.php" );

[edit] 5 Extra edit buttons

Add some buttons to the edit menu: Mediawiki/How to add buttons to the page edit shortcut menu

[edit] 6 Backing up

Generally, for a wiki that's used for collaborative work, it would be good to do a regular page dump (perhaps also a mysql dump), as well as an export of all uploads, so that it's available in that way. (E.g. for offline caching.)

[edit] 7 License

The license should be CC-A.