[Edit: The latest version of this plugin can be found here.]
Well, that took slightly longer than I’d intended. Version 0.001 (a simple JavaScript wrapper) was posted almost four months ago. I’ve had some adventures on the way – neither Snoopy nor curl() could cope with the HTTP 301 codes they received from Ma.gnolia’s servers, and PHP’s DOM XML client requires PHP5, which just isn’t an option for most people not running their own servers, who are stuck with PHP4.
I tried hacking Snoopy, I tried reporting the bugs to WordPress and Snoopy forums, and for a while I thought Gary White’s RSSReader library was my saviour. But it couldn’t cope with the HTTP/1.1 301 either, and Gary didn’t respond to my email. Finally, I found LastRSS. It works.
So here it is. The syntax remains the same as the previous version. The default number of links to show is 10, and the maximum is 20 (as this is all that ma.gnolia will supply).
<?php magnolia(USERNAME[, NUMBER_OF_LINKS); ?>
eg. to show my 10 latest links, I simply use:
<?php magnolia('barryprice'); ?>
To show my 3 latest links, I’d use this instead:
<?php magnolia('barryprice', 3); ?>
Dead simple.
Hello!
I installed WordPress on my server, and set up a site. It’s a relly nice piece of software. However, I am missing a piece of functionality, and
couldn’t find a suitable answer for it. Mayou you know a plugin I could use?I need to automatically inserts ads in my posts.And not AdSense ads, but rather HTML snippets defined by me (affiliate links, etc). Let’s say I would insert a tag in my post:
– ad here –
and the plugin would automatically replace it with some HTML code, when the post is displayed on my site.I really don’t need any fancy configuration options etc, just the basic replace functionality.
Do you know a plugin that can handle this?
I’ve never come across a plugin for doing that, but the AdSense plugin uses a <!–adsense–> marker to insert its code. If you’re comfortable with hacking PHP, I guess you could adapt that…
I would like to install this plugin, is the output XHTML complaint? Thanks :)
Yes, it is XHTML 1.0 Strict compliant.
The lastRSS.php file isnt showing in my plugin listing, even though it has been correctly uploaded to the directory via ftp. Have you come across this before?
Hi Kelly,
The lastRSS.php file isn’t supposed to show up in the plugin listing – only magnolia.php (it’s a library, not a plugin).
Hmm… installed the plugin, but I cannot seem to configure the number of items returned. Any ideas? Great plugin btw.
Hi Chris, congratulations on finding the first bug :-)
Note to self: “next” in PHP does something different to “next” in Perl – I actually wanted “break”.
Ho hum.
The download (let’s call it Magnolia 1.01) now accepts a number-of-links limiter, as it always should have done. Maximum is 20, as this is all that ma.gnolia supplies. A few other fixes will join this in v1.1, to be posted real soon now…
This is nice! But is there a way to only show links tagged with a specified tag? Or is this coming in v1.1?
v1.1 :-)
Comments are now closed – please move along to v1.1 :-)