A really simple bibliography system with references stored in a taxonomy.

Description

The RS Bibliography 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.

Inserting 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, 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].

Referencing individual works

A long or a short reference can be inserted anywhere, whether the work is tagged or not, by other 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"]

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 and 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 references.

It is also quite easy 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 very simple, and it is not meant as an alternative to something like Zotero and the ZotPress plugin.

Installation

Installation as any other plugin.

Download

This plugin requires the RS Base Plugin to work: Download stable version 1.14.11.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *