Mediawiki installation

The educational technology and digital learning wiki
Jump to navigation Jump to search

This article or section is currently under construction

In principle, someone is working on it and there should be a better version in a not so distant future.
If you want to modify this page, please discuss it with the person working on it (see the "history")

I will describe here installation procedure of EduTechWiki and its major extensions. Got a brand new server :) - Daniel K. Schneider 11:59, 12 August 2009 (UTC)

Installation tips are for Ubuntu. The old version runs under Solaris (IMHO a superior but much more difficult environment, this is why we decided to switch).

First time installation

I will make this short, since it's not difficult...


Configuration

The main configuration file

Unless you use some configuration extension, all the configuration (except for styles and user messages) is done in file LocalSettings.php (in the top-level directory of the distribution)

Reading: http://www.mediawiki.org/wiki/Manual:Configuration_settings

LocalSettings.php will read first the file includes/DefaultSettings.php and then override with your own settings. Below are a few settings (also read "nice URLs" below).

// also used as namespace for certain pages, so select with care
$wgSitename   = "EduTech Wiki";
 
// Use the file cache
$wgUseFileCache = true;
$wgFileCacheDirectory = "$IP/cache";
$wgShowIPinHeader = false; 

// Rights
$wgEnableCreativeCommonsRdf = true;
$wgRightsPage = "EduTech_Wiki:Copyrights"; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "http://creativecommons.org/licenses/by-nc-sa/3.0/";
$wgRightsText = "CC BY-NC-SA Licence";
$wgRightsIcon = "$wgStylePath/monobook/tecfa/somerights.png";

// Permissions - editing users need to have a login
$wgGroupPermissions['*']['edit']            = false;
$wgGroupPermissions['*']['createaccount']   = true;
# $wgGroupPermissions['*']['createaccount']   = false;
$wgGroupPermissions['*']['read']            = true;

// Strongly suggest to keep this (enabled by default). Puts all the messages in the database // (easier to edit and edits will survive upgrades $wgUseDatabaseMessages = true;

// What file uploads to you accept, e.g. $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ogg', 'pdf', 'mp3', 'svg', 'doc', 'xls', 'ppt', 'pub', 'txt', 'ps', 'zip' );

Messages

Interface messages
  1. List all messages with Special:Allmessages
  2. You then can customize each message, by clicking on a message and edit

Notice:

  • Works by default, i.e. $wgUseDatabaseMessages = true;
  • If you are not using database messages, you can edit the languages/Language.php file (for English) or languages/LanguageXX.php for non-English languages, where XX is the two-letter language code for your language
A slogan message
  • The page MediaWiki:Sitesubtitle will allow you to add some sort of slogan (you also can kill this default page). Has the same effect as setting the $wgExtraSubtitle variable.
Sitenotices (e.g. to annonce an important event)

Read: http://www.mediawiki.org/wiki/Manual:Interface/Sitenotice

The simplest way of using it:

$wgSiteNotice = " ........ ";


Nice URLs

You don't want ugly default URLs (e.g. http://edutechwiki.unige.ch/en/Mediawiki_installation instead of http://edutechwiki.unige.ch/mediawiki/index.php?title=Mediawiki_installation).

Reading: http://www.mediawiki.org/wiki/Manual:Short_URL

Here is an easy way to do achieve this for the content pages. The method described below is probably not exactly the one that is now being suggested by the manual, but we have to stick to our old solution since we believe in stable URLS !

In httpd.conf:

  Redirect /portails/mediawiki  "http://edutechwiki.unige.ch/en"
  Redirect /mediawiki  "http://edutechwiki.unige.ch/en"
  Redirect /portails/fmediawiki "http://edutechwiki.unige.ch/fr"

<VirtualHost *:80>
       ServerName edutechwiki.unige.ch
       DocumentRoot "/data/portails/edutechwiki"
   # ALIASES for edutechwiki: THREE alias for each WIKI
   Alias /mediawiki "/data/portails/mediawiki"
   Alias /en "/data/portails/mediawiki/index.php"
   Alias /en/index.php "/data/portails/mediawiki/index.php"
   Alias /fmediawiki "/data/portails/fmediawiki"
   Alias /fr "/data/portails/fmediawiki/index.php"
   Alias /fr/index.php "/data/portails/fmediawiki/index.php"
< /VirtualHost >	

Then in LocalSettings.php:

$wgSitename         = "EduTech Wiki";
$wgScriptPath	    = "/mediawiki";
$wgScript           = "$wgScriptPath/index.php";
$wgRedirectScript   = "$wgScriptPath/redirect.php";
## If using PHP as a CGI module, use the ugly URLs
#   $wgArticlePath      = "$wgScript/$1";
# DKS 3/2006
$wgArticlePath      = "/en/$1";

Therefore only "normal" pages look nice. Special pages remain ugly, but this doesn't matter IMHO.

Also consider excluding all or most special pages in robots.txt. No reason that these should be indexed and they really eat away CPU cycles if you need another argument.

User-agent: *
Disallow: /mediawiki/
Disallow: /en/Special:Search
Disallow: /en/Special:Random

etc ....

Skins and CSS

Unless you have time to spend, I suggest to use the standard Monobook skin. Other skins are not as well supported. E.g. some extensions just won't work with other skins.

You should define CSS (in particular class or id selectors for extensions) in MediaWiki:Common.css. Do not edit CSS files in the server if you can avoid. This strategy makes maintenance much easier.

Changes to the navigation bar to the left

Reading: Navigation bar help

Configuration: Edit MediaWiki:Sidebar in your wiki

Since version 1.14 (or earlier) you may use keywords to change the order of portlets (boxes with menu items). E.g.

* SEARCH

* navigation and help
** mainpage|Mainpage
** EduTech_Wiki:About|about
<!-- ** portal-url|portal -->
<!-- ** currentevents-url|currentevents --> 
** randompage-url|randompage
** helppage|Help
** Help:Editing rules|Editing rules
** Blog:DKS|Blog (D.K.S.)

* categorytree-portlet

* TOOLBOX

* LANGUAGES

* big brother
** Special:Newpages|New Pages
** recentchanges-url|recentchanges
** Special:Guestbook|Guestbook
** Special:Popularpages|Popular Pages
** Special:WhosOnline|Who is online ?

* TECFA links
** http://tecfa.unige.ch/ |TECFA
** http://tecfaseed.unige.ch/door/ |TECFA Portal

In addition one also could add more sophisticated custom items (instead of hand editing the skin files, to do ....)

Extensions