Extension:Contributorlist

From Biowikifarm Metawiki
Revision as of 19:36, 13 March 2011 by Gregor Hagedorn (Talk | contribs) (The code of the contributorlist is by Andreas Plank, most of this documentation as well (with additions by Gregor Hagedorn). Page moved from test wiki to here)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To obtain a list of contributors for a wiki page the parser function {{#contributorlist: }} may be used. The results are alphabetical by last name[1] Here are some examples:

{{#contributorlist: }}  (default: current page, all contributors separated by comma)

produces for this page: Gregor Hagedorn

{{#contributorlist: Main Page }} with an explicit page name

produces: Gregor Hagedorn

{{#contributorlist: Main Page | 3 }} starting with the 3rd contributor

produces:

{{#contributorlist: Main Page | 2 | 4 }} (2nd to 4th contributor)

produces:

It is also possible to use a different delimiter (for example “;” or “/”):

{{#contributorlist: Main Page | 1 | 30 |  / }} contributors 1-30 separated by a slash “/”

produces: Gregor Hagedorn
Note that white space is always trimmed, so one may have to use   for non-breaking space or   for normal space.

Finally we can also use line breaks in the delimiter:

{{#contributorlist: Main Page | 1 | 30 | <br/> }} 

produces: Gregor Hagedorn


Footnotes

  1. “last name” for sorting purposes is difficult to unambiguously define across all cultures. Here it is defined as: the last whitespace-separated word in the first part of the string prior to any brackets or commas. Example (word recognized as last name in bold): “John M. Smith-Wesson (Ph.D.)”, “Smith-Wesson, John M.”, Roberta Morido Castellan. Note that the last example may be a case of erroneous sorting, which is difficult to automate.