sw'as

Footnotes 0.9 Plugin for WordPress 2.0.x

§

This post is now seriously old. GO AND FIND THE LATEST VERSION BY CLICKING HERE.

Ok, so finally, after an unacceptable delay1, Footnotes 0.9 is released. I have chosen the rather arbitrary version number 0.9 because this is still pretty much untested (except for my requirements) so I'm expecting a few bugs to be uncovered over the next few months as more people use it, and I'll update to version 1.0 soonish.

Mark up

There are some significant changes in this version, not the least of which is how footnotes are marked up when you're writing your posts. Because of changes in WordPress 2.0 I've had to abandon the previous method. My main goal when considering how to mark up the footnotes was to ensure they would degrade reasonably gracefully if the plugin was to stop working. Secondary to that, given the WYSIWYG interface in WP 2.0 and the fact I couldn't figure out how to add a button with the functionality I wanted2, I also wanted the mark up to be quick any easy to type.

For these two reasons I settled on "3" to close. You should carefully note the space before the first opening bracket, which is deliberate4 looks better than((this)).)). If for some reason, you or your WP install are allergic to this mark up, it is possible to change it reasonably simply5.

Legacy Support

If the legacy support option is selected (which it is by default) Footnotes 0.9 will still render all your post that use the old mark up6. Additionally, if you ever edit any of your posts that use the old mark up they should be automatically upgraded to the new style7. I considered writing a utility that does an upgrade of all posts to ensure you're up to date with the new version but decided it wasn't totally necessary. Feel free to write such a utility if you have the time or energy.

Paginated Posts

I have included limited8 support for paginated posts in this release. In order to use footnotes with paginated posts you will need to add <!--postnum=#--> directly after each <!--nextpage--> tag9. Where # is the number the footnotes should start on for that page.

Other features

From time to time you're bound to need to refer to the same footnote twice10. To do this you will need to know what number it is11. Simply type "ref:#" as the footnote text and it will refer to the footnote of said number.

There have been a couple of additions to the options panel. You can now insert any text you like both before and after the link number as well as the back link. And you can still change the back link text.

Where is it? Let me at it!

Calm down, the latest version is right here get the new version.

Installation is pretty standard. Just stick the footnotes.php file into your WP-content/plugins/ directory on the server and enable the plugin in WP admin. If you're upgrading, you shouldn't have to do any more than replace the old file12.

Disclaimer, etc...

Change Log

0.9.1

0.9

0.1

The Original which you can still download here. It's not suitable for WP 2.0.x and it lacks a bunch of features.

  1. But hey, I am working for free here. [↩]
  2. Even with the much praised buttonsnap class, I couldn't do it. [↩]
  3. " to open the footnote and " [↩]
  4. It has been included so that it degrades more gracefully. If for some reason the plugin doesn't work ((this [↩]
  5. All you need to do is edit lines 13 and 14 of the source, but keep in mind that if you do edit this after having used Footnotes for a while, it will break any footnotes using the default/previous mark up. [↩]
  6. However, it is not possible to mix old and new mark up in one post, that will create all kinds of havoc. [↩]
  7. This had to happen because the damned TinyMCE implementation has issues with the old mark up. [↩]
  8. By limited I mean not totally automatic and not totally valid. [↩]
  9. You don't actually have to have it right after the tag, simply somewhere within that page, but you'd be stupid to put it somewhere other than right at the top. [↩]
  10. This is really likely to break with paginated posts. [↩]
  11. And that means that if you insert a new footnote above the original you will need to change the second. Confused yet? [↩]
  12. Although it would be wise to check the options page as there might be some weirdness. [↩]
  13. Even if I'm not busy, maybe I just won't feel like it. [↩]

This was posted on February 10th, 2006 at 10:05 pm.

web development

Mentions

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.