Extension:HarvardReferences

Referencing systems
There is common scientific standard (Harvard referencing system).  The two most common types of referencing systems used are:
 * author-date systems—such as the Harvard system, APA and MLA
 * numerical systems—such as Chicago or Turabian, Vancouver and Footnote 

This extension for MediaWiki realises an author-date (Harvard system).

Working example
You can test this extension here: http://wikiext.org/index.php/Harvard_references_sample Use backspace key to return from references to the main text.

Sandbox to test extension
Please use sandbox to test extension: http://wikiext.org/index.php/Sandbox:Test_page

Description
Extension supports Author-date ("Harvard system") referencing style, e.g. Smith 2008:1 as commonly used standard in scientific literature.


 * Link - in square brackets: [Smith 2008]
 * Anchor to link - [*Smith 2008]

Switching on
Use tag ...  to mark bibliography area. It is needed for compatibility reasons.

Compatibility with Cite.php
This extension is compatible with Extension:Cite/Cite.php - links in both system can be used in same article. Moreover, links in "Harvard" system can be inserted into description of ref-link, and vice versa. For example,

Example of Harvard References
According to scientists, the Sun is pretty big.[Miller 2005] The Moon, however, is not so big.[Smith 1978:121]

Page numbers in references
Optional page numbers can be used after ":" char in link. Some links with one name and different page numbers can refer to one anchor. For example, [Smith 2008:121] [Smith 2008:51] refers to one anchor with same name: [*Smith 2008]

As separator can be used char "|" instead of char ":".

Highlighting
There is can be installed JS-script to highlight references and backlinks. This script is not belongs to extension, and can be installed separately.

Changing format of references
There is portlet "harvrefs" in the top of page. It can make "long" references shorter ("*") or hide it completely (see example). This portlet is not belongs to extension, and can be installed separately together with highlight script.

Setup
Extension was tested on 1.15.3 version of MediaWiki.

To install this extension, make HarvardReferences.php (source code is below) in folder extensions/HarvardReferences.

Then write  in bottom of file LocalSettings.php.

Source code
Make file HarvardReferences.php in ANSI encoding (do not add any spaces before starting "  "). Installing of this code into MediaWiki site see above.

Script for highlighting and changing format
This script is optional, but it can highlight references and change it's displaying in the article. To install it, make personal or common script, e.g. Then purge browser's cache (press Ctrl-F5).
 * HarvardReferences.js - text of the script as seen below.
 * to MediaWiki:Common.js add call of script: importScript('HarvardReferences.js');