AmiWiki:Coordination/MediaWiki skin and other changes

Please update the status when installing on the server or modifying a component.

This page contains some patches and a skin for MediaWiki. These help integrating MediaWiki in the AMI@Work server environment. See also: ../MediaWiki auth/.

Skin
Skin location: http://gmuf.com/mosaic/AmiTheme.tar.gz

Installation
$wgLogo = "$wgStylePath/amitheme/amilogo.gif"; # (change line) $wgDefaultSkin = 'amitheme'; # (add line)
 * Extract into mediawiki-dir/skins
 * in LocalSettings.php:

Special:Preferences extra links and other stuff
This patch
 * hides the fields used to change the password and displays just a link to
 * technically disables changing of user name and password
 * disables the Real Name and Email fields (makes them gray) and displays links to  and   to the right of these fields.
 * adds an additional fieldset containing a list of links as defined via ; see Installation for an example

Installation
cd mediawiki-dir; patch -p1 </path/to/SpecialPreferences.diff
 * Patch with
 * Add to LocalSettings.php:

$wgChangePasswordUrl = 'something'; $wgChangeEmailUrl = 'something'; $wgChangeRealNameUrl = 'something'; $wgPrefLinks['joincommunities'] = "http://$wgBscwHost$wgBscwPath?op=regami&mode=get_user_details&target=communities"; $wgPrefLinks['enrollevents'] = "http://$wgBscwHost$wgBscwPath?op=regami&mode=get_user_details&target=events"; $wgPrefLinks['changeprofile'] = "http://$wgBscwHost$wgBscwPath?op=regami&mode=get_user_details&target=profile"; $wgPrefLinks['setresearchtopics'] = "http://$wgBscwHost$wgBscwPath?op=regami&mode=get_user_details&target=topics";


 * For every key in, add a system message MediaWiki:Keyname containing the name to display

Parameter returntotxt
Adds an optional  parameter. Example usage: http://......&returnto=Main+Page&returntotxt=ABC

Installation
cd mediawiki-dir; patch -p1 </path/to/returntotxt.diff
 * Patch with

Userlogin template
Permanently disables the "create user account" part and the "mail me a new password" button in the login form.

Installation
cd mediawiki-dir; patch -p1 </path/to/template-Userlogin.diff
 * Patch with

Interwiki prefix patch
This patch is a hack to make MediaWiki treat the  and   interwiki prefixes differently.

Upon encountering a link of the form

bscw:something/something else/and so on&op=something&etc=blabla

MediaWiki will make it a link to

InterWikiBaseUrl. '/' . rawurlencode('something') . '/' . rawurlencode('something else') . '/' . rawurlencode('and so on') . '&amp;op=something&amp;etc=blabla'

where  is concatenation and   is URL encoding acc/to RFC 1738 (BSCW doesn't understand '+' as space).

An initial colon will not be URL encoded because it begins mnemonic paths in BSCW. You can use this feature like this:

bscw::something mnemonic/something else/and so on&op=something&etc=blabla

The  prefix works in the same way.

Note on base URLs
The base URL (iw_url in the interwiki table) of the interwiki entry must be in the following form

http://host/bscw/bscw.cgi$1

Installation
cd mediawiki-dir; patch -p1 </path/to/Title.diff
 * Patch with

Action purge, special page tab, other changes
This patch


 * adds content action wfMsg('purge') which clears the cache of the current page
 * renames the "special page" tab to "bscw page" if there is a "titletxt" argument in the URL (this is for AmiSpecial)
 * adds  in personal toolbar
 * makes the myspace link bold if there is a  in the GET request.
 * moves preferences after mycontris in personal toolbar

Installation
cd mediawiki-dir; patch -p1 </path/to/purge.diff
 * Patch with

AmiSpecial
Extension location: http://gmuf.com/mosaic/AmiSpecial.php

This extension adds two special pages:


 * Special:Bscwform and
 * Special:Updateuser

Both are intended only for requests from the BSCW server which should send in all available user cookies. Additionally, Special:Updateuser can be requested only via the localhost interface.

Special:Bscwform is used by BSCW as a template. BSCW should pull it like this:

/w/index.php?title=Special:Bscwform&titletxt=TitleOfThePage /w/index.php?title=Special:Bscwform&titletxt=TitleOfThePage&mword=poll

The first example will return a page containing the default magic word. The magic word can be changed with the  parameter. The page will be in a "bscw page" tab when called in this way ( must be supplied or the pages will display an explanatory message).

Special:Updateuser should be called upon profile changes (esp. longname and/or primary email changes). It syncs the MediaWiki user with BSCW via XML-RPC and returns a page containing:  if everything went fine. GET it like this:

/wiki/Special:Updateuser

and look for  in the response. Display an error message (perhaps the response body itself--it will be an HTML fragment) if there's no.

Installation

 * copy AmiSpecial.php to mediawiki-dir/extensions/ami
 * add the following to LocalSettings.php:

require_once( "extensions/ami/AmiSpecial.php" );

BSCW Image extension
Extension location: http://gmuf.com/mosaic/bscwimg.php

This extension adds the  tag which can be used like this: name|desc This produces the following HTML: 

Installation

 * copy bscwimg.php to mediawiki-dir/extensions/ami
 * add the following to LocalSettings.php:

require_once( "extensions/ami/bscwimg.php" ); $wgBscwImagePath = "/some/path" // or "http://some/path"