A really simple bibliography system with references stored in a taxonomy.
Description
The RS Bibliography plugin implements a really simple bibliography for a site using a taxonomy.
Each referenced work is a term in the bibliography taxonomy.
Each post, page or custom post type can have its own bibliography based on which referenced it is tagged with.
The bibliography is displayed with a shortcode.
Adding references
The references are the terms in the taxonomy, so works are added by inserting new terms into the taxonomy.
The terms have some extra fields:
- Author — the name or names of the author(s) of the work, separated by
//
. If they have edited the work, add(ed.)
or(eds.)
as a separate entry at the end, and it will be handled correctly. - Title — the title of the work.
- Serial / Collection — if the work is found within a journal or collection, write the title of the journal or collection here.
- Publisher — where and by whom the work was published.
- Year — Year of publishing.
The standard fields of the taxonomy terms are used like this:
- Name — this is the name you see in the editor and on the archive pages for the work.
- Slug — the slug is used for sorting the entries of a bibliography, and for referencing it through shortcodes, but isn’t used otherwise.
- Description — not used by the plugin, but might be displayed on archive pages.
Defining and displaying a bibliography
For any post where the bibliography is enabled, simply tag the post with the works you want in the bibliography, and put the [bibliography]
shortcode somewhere on the post.
The [bibliography]
shortcode will insert a header automatically, if the title is defined in the settings.
If there are no works tagged, the shortcode does nothing.
A full bibliography of every work referenced somewhere on the site can be made with [full_bibliography]
.
Citing individual works
A long or a short reference can be inserted anywhere, whether the work is tagged or not, through shortcodes.
The shortcode [bibrefs]
inserts short references. It is used in either of these ways:
[bibrefs slug]
[bibrefs slug="slug"]
The default output for a short reference is “Author (year)”, “Author et al. (year)” or “short-title (year)”, depending on which fields are available, and how many authors there are.
The shortcode [bibrefl]
similarly outputs the long reference, identical to what appears in the bibliographies.
[bibrefl slug]
[bibrefl slug="slug"]
The shortcode [bibref]
will insert a long reference the first time a work is cited, and then short references afterwards. If the same work is cited several consecutive times, the text “ibid.” can optionally be used for all but the first of several consecutive citations.
Changing the citation formats
The citation formats can be changed by using WordPress filters.
The filters are named rs_bibliography_bibrefs
and rs_bibliography_bibrefl
. The hooks receive three arguments:
$text
— the citation generated by previous hooks, initially empty. The defaults hooks will do nothing is$text
is not empty.$ref
— an object with properties for the fields described above, but also authors which is an array of arrays with author last and first names, and eds with contains an eventual editor indicator from the author list.$term
— the term object for the work.
The hooks should return the correctly formatted and escaped HTML output for the citation.
Side effects of using a taxonomy
Since references and posts are connected through a custom WordPress taxonomy, there are automatically archive pages for each work, listing all the pages where the work is referenced.
It is also straightforward to see how many pages reference a given work, and look them up.
Also, there are no extra tables involved.
Caveat
This plugin is intentionally kept simple, and it is not meant as an alternative to something like Zotero and the ZotPress plugin.
Managing references
References can be managed as for any other taxonomy, but for efficient searching the plugin creates a page under the Tools menu.
There is also a dashboard widget as a front end for this search interface.
A click on the “Shortcode” column will copy the shortcode to the clipboard, for easy insertion elsewhere.
Installation
Installation as any other plugin.
Download
This plugin requires the RS Base Plugin to work: Download stable version 1.14.11.
Leave a Reply