Extension:HarvardReferences

Description
Extension supports Author-date ("Harvard system") referencing style, e.g. Smith 2008:1. This reference system is often used in scientific literature.


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

Compatibility with Cite.php
This extension is compatible with Extension:Cite/Cite.php - links in both system can be used in some 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]

Highlinghting
Extension uses JavaScript to highlight references and backlinks, but works (without "yellow" and multiple-backlinks highlighting) also without JavaScript.

Changing format of references
There is selector in bottom of the page.



It can be used to change format or hide references. *-style reference has a title that can be shown if mouse cursor is above the link.

Switching off
There is emergency "switch off" for this extension, for compatibility reasons. Tag   may be used in wiki-text to disable extension for the article, where incompatibility may be found.

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.