Ma.gnolia WordPress Plugin 0.001

[Edit: The latest version of this plugin can be found here.]

Okay, this is laughably rubbish, but it works. Hopefully publishing this version will motivate me to write a proper one.

This is just a wrapper for Ma.gnolia’s JavaScript feed – I haven’t had time to write the RSS/XML parser yet. I had forgotten how much I hate PHP.

You can set the default number of stories to include, as well as whether to include the byline, within the plugin code itself. Or just override them when you call the function. The defaults number of stories is 10, and the byline display boolean defaults to ‘true’.

Call it from within your sidebar, like this:

<?php magnolia(USERNAME[, NUMBER_OF_STORIES, BYLINE_TRUEORFALSE); ?>

eg. to show my feeds with the default options, I simply use:

<?php magnolia('barryprice'); ?>

To show 20 of my feeds without the byline, I’d use this instead:

<?php magnolia('barryprice', 20, 'false'); ?>

The RSS/XML version of this plugin will be better. Hopefully. Can’t believe nobody else has written one of these yet, looks like you’re stuck with this one for now…

Download ma.gnolia plugin

PS. Regarding K2 integration, I’ve hacked my local version to allow K2 to auto-configure this plugin (as it does by default with Alexander Malov’s del.icio.us plugin). Will send some diffs to Michael if he’s interested – as soon as I’ve finished the final code…