From Biowikifarm Metawiki
Jump to: navigation, search
Help sections
Contents · Semantic MediaWiki · Semantic Forms
Add Ontology · Semantic links and import/export features · Import external vocabulary
Other SemanticMW extensions · Other extensions

These are some descriptions and explanations on some of the standard extensions which are available for all wikis in the biowikifarm

CategoryTree extension

This extension is useful for displaying the structure of a category if this category contains various subcategories and subsubcategories. It is used by default in all category pages if these have subcategories. A detailed description is provided by MediaWiki

The page Hemiptera (taxtrees) of the Pest Information Wiki demonstrates how the extension can be used outside of category pages. There are some limitation in the use of this category which are not clear from reading the MediaWiki instructions and not all combinations of the attributes of the CategoryTree parser function work:

  • It is not possible to combine the 'mode' attribute with some of the other attributes, e.g. the following script results in the display of categories AND pages (as described for the attribute 'mode'), but shows only one depth level:
{{#categorytree::<category name>|mode=pages|depth=2}}
  • The attribute 'depth=2' displays 2 instead of only one depth level, however 'depth=3' does not show 3 depth levels.
  • Other combinations can work. In the following example the tree displays 2 depth levels, hides the root level and shows the number of subcategories in brackets behind each category:
{{#categorytree:<category name>)|depth=2|hideroot=on|showcount=on}}

Cite extension

This extension is useful for formatting literature citations as footnotes. A detailed description is provided by MediaWiki. Citing literature (references) consists of 2 parts:

  • Insert the <ref> tag at a the place in the text which refers to the citation. At this position a raised number in brackets (e.g. [1]) will appear with a link to the reference list.
  • Insert the <references/> tag at the end of the text where the list of references or footnotes should appear. Each reference in the list is again numbered and has a link at the beginning (in form of a cross or number) to the respective text position, for example:

Reference list:

  1. Distant, W.L. (1906) The Fauna of British India Including Ceylon and Burma, Rhynchota, Vol. III. Taylor & Francis, U.K.

There are different formats for these tags, the following are used most commonly:

  • The text " ... this species has been described by Distant (1906)<ref>Distant, W.L. (1906) The Fauna of British India Including Ceylon and Burma, Rhynchota, Vol. III. Taylor & Francis, U.K.</ref> ..." creates the numbered link, but the text of the literature citation (between the <ref> and </ref> tags) will only be shown later in the reference list at the location where the <references/> tag appears.
  • The text " ... this species has been described by Distant (1906)<ref name="Distant1906">Distant, W.L. (1906)...</ref>" has the same effect but allows a multiple use of the same reference at different locations of the text. During the next use of the same reference use simply "<ref name="Distant1906"/>" (note the slash at the end).
  • In order to make it easier to edit the text it is possible to describe all references at the end as part of the <references/> tag. For this use the following format:
... this species has been described by Distant (1906)<ref name="Distant1906"/>
...the name created later by Matsumura (1914)<ref name="Matsumura1914"/>
is considered to be a synonym....
(here each tag can be used multiple times and the </ref> tag is not used in the text)

==Reference list==
<ref name="Distant1906">Distant, W.L. (1906) ''The Fauna of British India ...''</ref>
<ref name="Matsumura1914">Matsumura, S. (1914) Beitrag zur Kenntnis der Fulgoriden Japans ...</ref>

Please note that the correct use of the slashes in these tags is important for getting this extension to work.

It is possible to combine the use of a literature database as described as an example in Help:Semantic Forms with the above reference system. This combination is used, for example, in the Pest Information Wiki (see This page has 3 literature citations in the text and figure legends which appear at the bottom of the page with links to the respective literature pages. The titles and authors of these references are derived through the semantic system with the help of 2 templates. In the text each reference contains only the name of the respective literature page which is passed on to the template. For example for the first reference:

<ref name=Huger1966a>{{Citation|Zeitschrift für angewandte Entomologie (1966) 58, 89-95}}</ref> 

GraphViz extension

The extension is useful to represent diagrams into wiki pages. On thes extension rely other graphical extensions, such Semantic Result Formats and the new created extension: ProcessEditor. In order to install the extension, first it requires the GraphViz application for randering diagrams. For details, see: GraphViz. Currently, the extension is installed on testwiki2 along with SemanticResultFormats extension.

Several Installation features

  1. First, you need at least one of the external tools "Graphviz" or "MscGen" that renders graphs.
    1. Windows: Get your copy here: or here
    2. Unix: Same links as for windows but normally it should be preinstalled (at least graphviz - search for dot) or can be found in the package manager.
  2. Then obtain the Graphviz extension code [downloading a snapshot] or getting it from SVN, and then put it in your MediaWiki "/extensions/GraphViz" directory.
    1. For Debian, get the application from: Debian third party distribution
  3. Add these lines to LocalSettings.php:

include("$IP/extensions/GraphViz/GraphViz.php"); // includes the extension
$wgGraphVizSettings->outputType = "svg";
$wgGraphVizSettings->info = true; // need for traceing, very useful if the results are not so it is expected
$wgAllowTitlesInSVG = true;  
$wgSVGConverter = 'ImageMagick'; // rely on Imagemagick for svg randering in Mediawiki
$wgFileExtensions[] = 'svg';
$wgAllowExternalImages = true;
$wgGraphVizSettings->execPath = "/usr/bin/"; //Path to the Graphviz Installation
#$wgGraphVizSettings->MscgenPath = "/usr/bin/"; // Path to the Mscgen Installation, if Mscgen is used

Other extension enhancement on: Problems_with_SVG, not tested yet.