From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg

Release status:Extension status beta

ImplementationTemplate:Extension#type Tag
DescriptionTemplate:Extension#description Add additional processing capabilities to Cite.
Author(s)Template:Extension#username JimHu
Latest versionTemplate:Extension#version 0.2 (2013-11-02)
MediaWikiTemplate:Extension#mediawiki 1.8.3
LicenseTemplate:Extension#license No license specified
Download ProcessCite on GitHub (also requires patching Cite)
ExampleTemplate:Extension#example EcoliWiki

Translate the ProcessCite extension if it is available at translatewiki.net

Check usage and version matrix.

Rationale and Features[edit]

Wiki pages on scientific topics benefit from citations to the scientific literature. Managing these by placing full citations inside <ref></ref> tags using Cite can be cumbersome, and generates wikitext that suffers from the insertion of long blocks of ref text that degrades readability. It is also hard to maintain consistency of reference styles among different users.

ProcessCite extends the capabilities of Cite by adding the following:

  1. fetches, caches, and formats reference info for citations to papers in the NLM PubMed database, using PubMed's E-Utilities web service.
  2. fetches reference information from a list of commonly used shortcuts stored in a specific wiki page
  3. allows more concise markup of these kinds of citations
  4. disambiguates several ways in which citations might be entered into Cite.
  5. generates links in the reference text to a variety of external sources defined as dbxrefs by the Gene Ontology Consortium.

Many of these functionalities are inspired by the features in Biblio, an extension written by Martin Jambon.


In the wiki page, create references using the syntax <ref name=DB:reference />. Add an empty <references /> tag where you would like the full references to appear (usually at the bottom of the page). ProcessCite parses the name attributes of the <ref> tags and generates a citation list from them.

ProcessCite works with a number of different databases; see the full list in GO.xrf_abbs.php from the source code.


You type

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua<ref name=PMID:12368253 />. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.


You get

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua[1]. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

1. Stein LD et al. (2002) The generic genome browser: a building block for a model organism system database. Genome Res 12: 1599-610 PubMed


So far, ProcessCite.php has only been tested with MediaWiki 1.8.3. Help testing this extension on other versions will be appreciated!

MediaWiki 1.13.1[edit]

For ProcessCite to function correctly with MediaWiki 1.13.1, make the following edit to the code:

#Replace the reference text
 $str = $my_text;

Add line:

return true;


ProcessCite.php installation requires addition of a hook to Cite.php and other configuration.

  • Download ProcessCite.tgz and uncompress it.
  • Place the files from the ProcessCite directory in $IP/extensions/Cite directory. Files included:
    • ProcessCite.php - the main extension
    • GO.xrf_abbs.php - a supporting file with dbxrefs for various genomics resources
  • Patch Cite.php (if necessary): at the beginning of function stack in Cite.php, add
    ::wfRunHooks( 'CiteBeforeStackEntry', array( &$key, &$str ) );
  • Edit ProcessCite.php to
    • set a tmp directory for caching returns from web services. This must be readable and writeable by the webserver, or ProcessCite will throw permissions errors (but it will still work). A tmp directory should be used to reduce bandwidth use for the web service providers, such as PubMed.
    • (optional) set a wiki page in the main namespace to hold a list of reference shortcut|reference text pairs, one per line. Use <noinclude> to add comments to this page. The default is "$wgSitename Reference Library"
  • add
    to LocalSettings.php.


The Biblio extension also automates fetching references based on ISBN numbers. ProcessCite has the advantage of not requiring user maintenance of the reference section itself.

See also this updated version of ProcessCite, which adds support for DOI lookups.