Modifications done to mediawiki

From Flower Development, E Coen , Cell & Developmental Biology Department - JIC UK

Jump to: navigation, search

Contents

About

This wiki is based on mediawiki v1.15.

Skin

The skin used is based on Paul Gu's (Horizontal Navigation Menu Series) GuMax 3.4.5 skin. The modified skin can be downloaded from here.

The main modification have been done to the Gumax.php, main.css and gumax_template.css files.

Extensions

Since this wiki was made so that it could be easily maintained by the lab members the wiki syntax was extended with the following extensions.

LabMember

This extension was made to allow easy adding/removing of lab members. The extension can be downloaded from here.

This allows the use of the following syntax:

 <labmember>Name|Job Tittle|Project name|Email address|Image name|Image width|Wiki Page#Header</labmember>
 

To produce this:

The Wiki Page#Header is used to link to the members project page/section.

Publication

This extension was made to allow easy adding/removing of publications. The extension can be downloaded from here.

This allows the use of the following syntax:

 <publication>Paper title|Image name|Image width|PDF paper filename|Journal reference|URL to journal website</publication>
 

To produce this:

ImageIcon

This extension was made such that images could link to a page#header section on the wiki. The extension can be downloaded from here.

This allows the use of the following syntax:

 <imgicon>Image name|Image width|Wiki Page#Header</imgicon>
 

To produce this:

Other

The other extensions used for this wiki are:

  • SmoothGallery [1]
  • AnySite [2]
  • SimpleTable [3]

Misc

Skin.php

The mediawiki include/skin.php has been modified to hide edits from anonymous users but not from the user group. This was achieved by changing the following line:

		if( !$wgUser->getOption( 'editsection' )) {
			$s .= ".editsection { display: none; }\n";
		}

to:

		if( !$wgUser->getOption( 'editsection' ) && !$wgUser->isLoggedIn()) {
			$s .= ".editsection { display: none; }\n";
		}

External links in a new window

External links were made to open in a new window. Enter this in the search bar: MediaWiki:Gumax.js

Then edit the page to include the following:

externalLinks = function() {
	if (!document.getElementsByTagName) {
		return;
	}
	var anchors = document.getElementsByTagName("a");
	for (var i = 0; i < anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && 
				anchor.getAttribute("rel") != null && 
				(anchor.getAttribute("rel").indexOf("external") >= 0 ||
					anchor.getAttribute("rel").indexOf("nofollow") >= 0)
			) {
			anchor.target = "_blank";
		}
	}
}
if (window.addEventListener) {
	window.addEventListener("load", externalLinks, false);
}
else if (window.attachEvent) {
	window.attachEvent("onload", externalLinks);
}
modified on 30 November 2009 at 15:51 ••• 112,052 views