Extension:Refbase

refbase is web-based institutional repository and reference management software which is often used for self-archiving. refbase is licensed under the GPL and written in PHP and uses a MySQL backend. It can import and export a variety of standard bibliographic formats, including BibTeX, Endnote, RIS, ISI, MODS XML, PubMed, Medline, RefWorks, and Copac.

The refbase extension allows you to place a serial number within  markup tags. Metadata for the reference is retrieved and and can be displayed using one of the pre-defined modes: using the citation template, the Cite extension or a simple renderer with no dependencies). refbase also ships with a MonoBook skin for integration with MediaWiki.

Usage
Citations must be placed in  tags where   is either the serial number of the refbase entry ('Serial' field) or the citation key ('Cite Key' field). All options are set globally (by the  variables in ) for the whole wiki. Most can also be modified for individual instances of the  tag by passing extra arguments to the tag, e.g..

Tag type
This option controls the interpretation of the tag input: when using the refbase tag in wikipages, e.g., the input key (XXX) can refer to the serial number ('serial' type) or the citation key ('citekey' type). Note that if no entry is found using the selected tag type, a second search is performed with the other tag type.


 * Possible values: 'serial', 'citekey'
 * Global setting:
 * Individual setting:

Output type
This option determines the way citations are rendered in the wikipage. There are several modes:
 * 1) 'cite_journal':  This is the default mode, used in version 0.9 of the extension.  The output will use citation templates, as are used on Wikipedia: Citation_templates.  Currently, only journal articles may be cited with this output type.  In the future, this extension is likely to be modified.  'refbase' should be able to generate WP citation templates as an export format & this extension should make use of that functionality directly.
 * 2) 'cite':  This mode uses the Cite extension Extension:Cite.  A footnote is generated for each citation using the   tag.  Multiple references to the same entry are automatically combined using the   option.  To see the list of references a   tag must be added to the wikipage where the bibliography should be displayed.  See the Cite extension documentation for details.  The footnote text is a citation following the 'citation type' option (see below).
 * 3) 'link':  This is a simple renderer which does not require any installed template/extension.  It simply writes the tag input (serial or citation key) to the wikipage, adding a tooltip and a hyperlink to the refbase entry.  The tooltip contains the citation text (controlled by the citation type variable) and the hyperlink links to the refbase page (the base refbase installation location is given by the   variable).


 * Possible values: 'cite_journal', 'cite', 'link'
 * Global setting:
 * Individual setting:

Citation type
This option determines how citations are rendered in the 'cite' and 'link' output modes (it has no effect when using the 'cite_journal' output type). The two possible modes are:
 * 1) 'minimal':  This generates a simple citation with the authors, title, publication and year.
 * 2) 'rb-*':  This requests the citation text from the refbase web interface (located via the   parameter).  The * in 'rb-*' can be 'default' (i.e. 'rb-default') or any acceptable citation style (defined in the 'styles' database), e.g. 'rb-Chicago'.


 * Possible values: 'minimal, 'rb-default', 'rb-MLA', 'rb-APA', etc.
 * Global setting:
 * Individual setting:

Download
The extension can be found in the refbase.net package (in the contribs/mediawiki directory). Download the code and place it in. Note: stands for the root directory of your MediaWiki installation, the same directory that holds .

Installation
To install this extension, add the following to :

Configuration parameters
To configure the extension, add the following lines (modified to match your setup) after the 'require_once' line in your LocalSettings.php (omitted fields take the default value indicated here):

Database connection mode
This option selects the way the extension connects to the mysql database. The 'mysql' mode is getting deprecated in recent versions of php, but is still available for older installations.


 * Possible values: 'mysql', 'PDO'
 * Global setting:
 * Individual setting: This option can only be set at the global level.

HTTP authentication for requests to refbase instance
This option is used to pass an HTTP authentication token to the server hosting the refbase installation (basic authentication e.g. from apache server). If $wgRefbaseURLAuth is empty (' '), no authentication is passed. If set to 'default', the current user/password token will be passed when requesting data from the refbase web interface (this is useful when both mediawiki and refbase are under the same basic server authentication). To specify an arbitrary user and password, set $wgRefbaseURLAuth to 'user:pass' where 'user' is the username and 'pass' the password for that user (note that the username cannot contain colon characters ':'). This option is relevant only when using the 'cite' or 'link' output types along with one of the 'rb-*' citation type.


 * Possible values:, 'default' or 'user:pass'
 * Global setting:
 * Individual setting: This option can only be set at the global level.

Rendering options
A few options can also be set for the whole wiki (they may be changed for individual tag instances as described above):