[Edit: The latest version of this plugin can be found here.]
I finally got round to hacking up the Ma.gnolia plugin so that it caches the link list for 30 minutes (by default), so as not to irritate the Ma.gnolia XML server any more than really necessary. Until now, it had been sending a request for each and every page render. I meant to fix it last week, and completely forgot…
To recap, this plugin allows you to easily publish your latest Ma.gnolia links in your WordPress sidebar (or anywhere else you want to call it from).
WordPress’s built-in RSS handlers didn’t seem to like Ma.gnolia’s feeds (they serve them up with a 301 redirect, which Snoopy apparently can’t cope with – details here), so I’ve used PHP5’s built-in DOM XML functions. Obviously this means that you will need version 5 of PHP on your server. If this isn’t an option, feel free to use my original JavaScript plugin, still available here.
The syntax remains the same as the previous version, with the exception that the byline is no longer an option. The default number of links to show is 10.
<?php magnolia(USERNAME[, NUMBER_OF_LINKS); ?>
eg. to show my 10 latest links, I simply use:
<?php magnolia('barryprice'); ?>
To show my 23 latest links, I’d use this instead:
<?php magnolia('barryprice', 23); ?>
Dead simple.
Diffs to automate usage of this plugin with K2 will be up shortly at some point…
Download Ma.gnolia plugin v0.2