Installation

  1. If you are upgrading, first deactive the previous version of BiblioFly.
  2. Download the latest version (see http://www.deborahmcdonnell.com/damselfly/wordpress-plugins/bibliofly)
  3. Upload bibliofly.php into your plugins directory (usually /wp-content/plugins)
  4. Navigate to the Plugins page in your administration panel and activate the plugin BiblioFly

That's it! The plugin should automatically create/update the table it needs and after that you can manage your bibliography through your wordpress administration panel, under the Manage tab.

Embeddable Functions

Embed Entry

[bfentry id=# small]

Inserted into a wordpress post or page, the above code will embed the specified bibliography entry into the page. The command 'small' is optional; if omitted, the full bibliography entry will be embedded.

Print Full Page

[biblioflypage]

This is the function that prints out your bibliography page. Simply insert the above code into your WordPress Page. The function will grab all bibliography entries marked as visible, sort them into categories (novel, short fiction, poem, non-fiction book, article) and print them out in full.

Each bibliography category is printed under an <h3 class="bibliofly"> element. For an example, see my biblio page.)

This function uses non-default classes, in case you want the full entry styled differently on the biblio page compared to when you call it through random/recent/specific functions:

Print One Category Per Page

[biblioflypage type=#]

If you wish to restrict the function to calling only one category, this is the code to use, where:

 

Template Functions

Print Specific:

<?php bf_specific($id, $full) ?>

Prints a specific biblio entry.

Example 1:

<ul><?php bf_specific(3); ?></ul>

This will output an unordered list containing BiblioID #3 as its list item

Example 2:

<ul><?php bf_specific(3,"full"); ?></ul>

This will output a full bibliography entry for BiblioID #3, using the default CSS classes

 

Print Random:

<?php bf_random($full) ?>

Prints a random biblio entry.

Each entry is wrapped in a list item, so you will need to call this function inside a parent list.

Example 1:

<ul><?php bf_random(); ?></ul>

This will output an unordered list (with one item ;) , so probably not so much call to use an ordered list here)

Example 2:

<ul><?php bf_random("full"); ?></ul>

This will output a random full bibliography entry, using the default CSS classes

 

Print Recent:

<?php bf_recent($limit); ?>

This is the function I use in my sidebar: it calls the most recent bibliography entries, and displays them in descending order by id. It wraps each entry in <li class="bf_small"></li>, so you will need to call the function inside an ordered or unordered list.

Example:

<ul><?php bf_recent(3); ?></ul>

This will call the 3 most recently entered bibliography entries (eg if you have 10 entries, it will call 10, 9 & 8 (providing all three of those are marked as visible)).

 

Default CSS Classes

For the Bibliography Page

 

Disclaimer

I am far from being an expert in PHP. You can rest assured that all care was taken with this code, because I don't want to break my site (and because I based it on other peoples' code, so it should be stable enough). But I can't guarantee it won't break yours. If you have any questions or queries or suggestions, I'll do my best to answer them.