Difference between revisions of "Help:AddExtensions"

From Biowikifarm Metawiki
Jump to: navigation, search
Line 5: Line 5:
 
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 [http://www.mediawiki.org/wiki/Extension:CategoryTree MediaWiki]
 
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 [http://www.mediawiki.org/wiki/Extension:CategoryTree MediaWiki]
  
The page [http://wiki.pestinfo.org/wiki/Homoptera Homoptera] 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:
+
The page [http://wiki.pestinfo.org/wiki/Hemiptera_(taxtrees) 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:  
 
* 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:  
 
<pre>
 
<pre>

Revision as of 16:03, 23 February 2011

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==
<references>
<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>
<references/>

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 http://wiki.pestinfo.org/wiki/Oryctes_rhinoceros_nudivirus). 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>