sw'as

Still practising

  1. About
  2. Archive

New WordPress Plugin: Footnotes

This beast has been upgraded for WordPress 2.0.x.

Yesterday while working on a draft of a future post I decided footnotes would be useful. After recently setting up a wiki1 I very much like how DokuWiki handles footnotes2.

So I figured I'd knock together a quick plugin for WordPress to handle footnotes in a similar way. One drawback I found to the DokuWiki method is that you can't refer to the same footnote in more than one place, so I made it so you could.3

After finishing the coding late last night, I decided that given how simple it turned out to be there were probably other footnote plugins out there, and I wasn't wrong.

It turns out there is already a DokuWiki mark-up parser for WordPress, in the plugin repository 4 which (I would assume) includes the footnotes functionality.

There are other more full-service mark-up plugins which provide footnote functionality as well such as Textile 2.0 5.

There are also footnote Plugins out there for WordPress done by MovableTripe and Alex King 6.

Anyway, I'm releasing my footnotes plugin as my first "released to the world" plugin for WordPress. In my opinion it offers a better solution than the others I've seen (assuming you don't want a full service mark-up plugin like Textile). I might one day put it on the WordPress Plugin Repository7 assuming they eventually make it easier to navigate and use.

Installing the Footnotes WordPress Plugin

For now I have released it as version 0.1 (Beta) and I welcome improvement suggestions. You shouldn't really need to be told how to install it (because it's so damn easy) but here goes:

  1. Download it.
  2. Unzip the file footnotes.php to the wp-content/plugins directory of your site.
  3. Enable the plugin in admin.
  4. Start using it.

I'm not putting any restrictions on the use of this plugin, you may do with it what you like. However, I do assert my authorship and copyright. I would appreciate it if you would let me know in the event that you modify this plugin for use or redistribution.

I must acknowledge Mark because I used the same method as he used in his Run PHP plugin to go through the posts and pull out the footnotes.

UPDATE 1 (12 August 2005):

The question has been asked "how do I use this thing?" That's a fair question, and I'm surprised it wasn't asked sooner. All you need to do is suround the text you want as a foot note in footnote tags8. So your post might look like this: This plugin<footnote>Which you can find here. </footnote> is great for making footnotes in your posts. But you don't have to type that manually, simply use the "footnote" button that should now appear in your quicktags list when you are writing a post.

UPDATE 2 (14 August 2005):

New Version: 0.2 (beta) New Features:

  • Works with WP-Amazon plugin.
  • Choose if links are superscript or not.
  • Customise the backlink text.9
  1. The ABC TechTalk wiki [↩]
  2. The are generated automatically via some mark-up in the text. Check out the DokuWiki mark-up here. [↩]
  3. Simply by having "ref:[footnote number]" in place of the footnote text it will refer back to the footnote of that number. This isn't the best solution for a document that has heaps of footnotes (especially if you go back and add some in later) but it will do for now. [↩]
  4. If anyone has any idea how to navigate or understand the Plugin Repository page, please let me know. [↩]
  5. Which I found via Huddled Masses. [↩]
  6. Although I couldn't for the life of me get the Alex King one to work (sorry Alex). [↩]
  7. If anyone has any idea how to navigate or understand the Plugin Repository page, please let me know. [↩]
  8. i.e. <footnote> and </footnote> [↩]
  9. To customise the backlink text see the Footnotes tab in the Options admin menu. [↩]

web development
29 July 2005 — Simon Elvery — Permalink