Hackadelic Series PlugIn, Arrr

Jan 31, 2009   //   by Hackadelic   //   WordPress  //  12 Comments
This entry is part of a series, Hackadelic Series Releases»

shake your tail featherAye, me hearties, here’s my third WordPress plug-in: Hackadelic Series.

It is the consummation of an idea I gave a quick shot to back in December 2008, when I first had the need for something to support authoring series of posts, and my search revealed no functional lightweight solution for it.

Here is the history of the plug-in.

Market Analysis (Sort Of)

[toc class=toc-left style=”max-width:25em”]

Basically, there have been only two series plug-ins: “In-Series” and “Organize Series”.

In-Series, which had the most downloads, is declared to be compatible up to WordPress 2.3.2 – apparently an abandoned development. Which is a pity, because with its less than 90 KBytes of code, it is much lighter than the other one.

Organize Series, with its 190+ KBytes code size1 belongs clearly to the heavyweight category of plug-ins. It appears to be under active development, but I utterly disliked its operation principle (which is based on adding a new WordPress taxonomy, and extra database tables).

My Way

As you may notice, I consider lightness a key quality. In this case, I absolutely didn’t want extra database tables, not only because most plug-ins leave you alone with their manual disposal, but because there is a built-in WordPress feature in place already that would be the perfect, most natural choice: Meta-data.

Meta-data, also known as custom fields, lets you store extra information about a post, without interfering with the post itself. And you don’t need any extras to use it. A blank WordPress installation already gives you both, the database table, and the UI (the custom fields editor in the editing area).

MetamorphosisSo I figured, all I need to do is add a “series” custom field to the posts that contain the series title, and automate the process of nicely decorating posts with series informations.

For the latter part, I wanted the series information to be presented in a subtle and unobtrusive way. No big-bang bullet lists or the like that would obscure the post itself. I needed something that stays in the background, and only pops up when required, but also sufficiently stands out to not be overseen. Something like… Sliding Notes.

It was decided: I’d write the plug-in my self. And of course, it was clear how I would name it: Hackadelic Series.

The Front-End

So ready, steady, go… I quickly put together a plug-in that automatically decorates posts with series information placed directly under the post title, elegantly wrapped inside a Sliding Note. The series information is just a single line initially, mainly consisting of the series name. The name, when clicked, expands to a Sliding Note that contains a series index. The entries of the index are sorted by date, and link to the corresponding posts (all except the current one). You can see it live in action on a sample series, and here’s a screen shot:

Of course, the front-end requires that Sliding Notes is installed (or you’ll see the raw shortcodes otherwise).

I could have released the the plug-in in this shape… if it wasn’t for a slight missing detail…

The Missing Detail

It became immediately clear that this time I’d need an administrative interface, or otherwise the plug-in would be of limited use only.

The reason why an administrative interface is required is simple:

Custom field values are stored per post. So if you wanted to rename a series, you’d have to visit every post, and change its custom field. I wouldn’t want to do that. And I figured neither would you.

Alas, I never found the time to implement the envisioned back-end and complete Hackadelic Series to my satisfaction.2 . Until recently…

The Back-End

I actually had it all set up in my mind. When a time slot opened, it just poured out into what I believe is a really convenient admin interface for series. Here’s what it looks like:

Its main function is to individually rename series, by adjusting the corresponding custom fields in all associated posts. This is done by changing the text in the input box and clicking on the “Rename” button to its right.

Right next to the “Rename” button, there is an “Entries” button. It expands to an “administrative” series index. Similar to the series index in the front end, it lists all posts in that series, ordered by post date. In addition, when you hover over an entry in the index, two links appear: “Edit” and “View”. Use them to quickly open the post editor on that particular post, or jump to the blog post itself.

In the back-end, it is also possible to change the meta-key – the custom field key that indicates a series. (It is “series” by default). But this one does not simply change an option. (Doing so would remove existing series out of view of the plug-in, and you’d have to change the key back to recover.) It actually adjusts all corresponding custom field keys. Your series remain intact.

Care must be taken though when renaming to an existing meta-key. Later renames would change all keys, including those that were originally not associated with a series.

In case you wonder why you need a meta-key rename feature, read on.

Great minds think alike, fools seldom differ

Two Minds by Simon Venus (detail)The first version of the back-end did not provide for meta-key renaming. And it wouldn’t have made it into this release if it wasn’t for a curious twist of fate.

Just before releasing the plug-in, I checked again for other series plug-ins (mainly to get the correct infos about the “other two” for inclusion in this article). And there it was, out of nowhere: A “Serial Posts” plug-in – one that basically builds on the same idea of utilizing post meta-data.

After a short moment of slight frustration (“Damn! Someone forestalled me!”), and hesitation (“Does it make sense to publish this plug-in at all anymore?”), I realized that, rather than being in competition, this was a chance for the two plug-ins to complement each other.3

After all, “Serial Posts” offers a freely positionable series index (via shortcode, an approach similar to “TOC-Boxes”).

The drawback of Serial Post is primarily the lack of a convenient rename feature. Also, manually adding the post index manually can be cumbersome, especially because the user would need to supply input on two different channels: A shortcode in the post content, and a custom field elsewhere.

And Hackadelic Series fills both gaps. The only “hindrance” to using both plug-ins together was that they were using different meta-keys. “Serial Posts” uses the meta-key “Serial”, while I chose the key “series”. (I also like “series” better, but that’s of course a matter of taste. 😉 )

This gave birth to the idea to extend my series admin interface by a feature for free meta-key selection, rather then implicitly resorting to the “Serial” meta-key. And I am quite happy with this solution.

Divide And Conquer

In some cases, automatic series info insertion maybe not be desired. Especially users of “Serial Posts” may prefer to insert that info explicitly, using their shortcode. For that reason I divided the plug-ins into Front-End and Admin. To turn off automatic series info insertion, simply deactivate the Front-End plug-in.

Other Settings

“Hackadelic Series” breaks with a “tradition” of avoiding WordPress options, and includes settings to specify the text that appears in the series front-end index. The reason for this was support languages different than English without the complexities of internationalization. Here’s how the options page looks like:

You can see them live in the sample series.

Conclusion

This is the third in my series of plug-ins, all of which focus on supporting bloggers in provide their readers with a rich reading experience, while otherwise staying out of the their way. I hope you’ll find it a useful and visually attractive addition to your blogging toolbox.

For further information, visit the plug-in homepage.

Cheers and happy serial writing!

If you use this plug-in, please consider making a donation to support the further development. Donate whatever you feel appropriate. Any amount is appreciated.
Thank you.

pixel Sliding Notes

  1. not counting images and text files, which add to a total size of almost 560 KBytes []
  2. Apart from “daily business”, I gave priority to my other plug-in, TOC Boxes. I considered it to be of more immediate value, by being helpfull to any blogger, whether or not (s)he’s a “serial writer” or not. Then came a new Sliding Notes release, then a new TOC Boxes release, occasional site maintenance work… []
  3. And I truly hope this “complementary” spirit finds endorsement by the authors of “Serial Posts”. []

12 Comments

  • Hey there, is there an easy way to get the next/previous entries in a series? The series box shows up in between the excerpt and the content, which is great, but I’d also like to have two quick links after the post, for next and previous entries. That way users won’t have to scroll up, click the Hackadelic series link, and then click on the next post.

    Thanks!

    • No there isn’t, but it’s a good idea.

  • Nice plug-ins. I like the implementation of the series especially in combination with the sliding notes.

    One request: I’ve been going through my website to validate the code and I’ve removed (at least from my current home page) all the validation errors…except those produced by the hackadelic sliding notes (10) and series (1). Do you know if these errors are produced by the plug-in or by my implementation of the plug-in?

    For the series error, is it possible that the >> character is not escapted?

    Thanks

    • Todd, as of version 1.6.1, Sliding Notes gets as close to satisfying the W3C standards as it can get. The remaining issues are inherent to how sliding notes are used, and how WordPress does what it dies. They cannot be removed without defying SN’s purpose.

      For example, you can enter arbitrary text in a Sliding Note, including bullet lists and paragraphs, even when the note is embedded in another paragraph (and does not stand in a line of own). But nesting other elements in paragraphs (that is P tags) is a W3C rule violation.

      Some other CMS’es out there use DIV tags for paragraphs instead to circumvent this problem, but, alas, WP still sticks with

      tags.

      The >> you mention is actually a &raquo, which is entered as the HTML entity “»” (of course).

  • Looks like you answered my question here:
    http://hackadelic.com/solutions/wordpress/series#comment-4354

    Feel free to delete both comments!

    I might go with EG-Series instead to see if it can do what I want.

    • Ray, you can combine EG-Series and Hackadelic Series. For example, you may find it interesting to user my frontend to display the series index instead of theirs.

  • Hey Zoran,

    Just a quick question about your Hackadelic Series plugin.

    Does your admin area offer the ability to rearrange posts in a series?

    -Ray

  • I use WP 2.8

    • Guffy, right at the beginning and at the end of this post, there is a reference to the plugin homepage, where you will find your answers. Look for the chapters “Installation” and “Usage”.

  • Hi!, please halp me! how to add “Hackadelic Series PlugIn” to my post?
    Have a Hackadelic Series PlugIn a shortcode like Hackadelic Notes PlugIn

  • I don’t see this “Hackadelic Series Settings” options panel anywhere under “Settings” (or anywhere) in my dashboard after install. Only the Admin panel is available under Tools.

    • Ria, do you use WordPress, or WordPress MU?

Blog Categories

I have come here to chew bubblegum and kick ass...
and I'm all out of bubblegum.
-- Nada in They Live