dynamic blogroll
i’ve alluded to it several times, but for the past two weeks i’ve been working on a blogroll plugin for wordpress that sorts blogs from the most recently updated to the least recently updated.
sounds simple enough, right?
i started with a world-accessible web-interface for adding blogs. once i got that working, i realized it’d be great if it could auto-discover the feed url and blog name from the blog url. so i wrote some code to do that with an html parser i found. i figured out some things about RSS/Atom feeds so i could get the last modified date (not easy!) and last post title for each blog, using a pretty good rss parser. then i had to figure out how to use php on the command line so i could have a cron job call a method to poll all the feeds in the blogroll. fairly simple, but something i hadn’t done before.
i installed wordpress to help in transforming what i had done into a plugin, and i discovered that i needed another plugin that would evaluate php code in the body of a blog post.
that got me to what i called v0.1, a custom proof of concept which is currently running quite nicely over at OrangePolitics.org (check it out). the motivation for doing this in the first place was my desire to create a tool to support/reflect a local community of bloggers, which grew out of some discussions on orangepolitics sparked by anton’s upcoming conference on blogging and community. this may not be that tool, but that’s another blog post…
since then, i’ve gone over v0.1 with a finer-toothed comb in order to get the code to a place where i’d be willing let anyone else see it. it’s designed it to be highly configurable–there are 24 different settings that affect how it looks and works.
however, i have to say setting it up is not for the faint of heart. so far it has only been tested on my clean wordpress install and ruby’s reasonably-modded orangepolitics. it requires a number of different components working together to achieve the intended effect. of course if anyone does install it, i’d love to hear reactions, feedback, and questions.
download dynamic_blogroll-0.2.tar.gz
there are some more detailed instructions at the beginning of dynamic_blogroll.php in the archive above, but you should feel comfortable with the following before attempting to install this plugin:
- extracting the files (dynamic_blogroll.php, poll_feeds.php, run_php.php) from the archive above into wp-content/plugins
- downloading MagpieRSS and HTML Parser and extracting them in wp-content/plugins
- editing settings in dynamic_blogroll.php and poll_feeds.php (see instructions in dynamic_blogroll.php)
- activating Run PHP and Dynamic Blogroll in wordpress
- adding the following to a wordpress post:
<phpcode> $dynamic_blogroll = new DynamicBlogroll(); $dynamic_blogroll->run(); </phpcode>
- setting up a cron job to run poll_feeds.php every hour
be aware that other plugins may conflict with dynamic blogroll, in particular v0.9 of Scott Reilly’s auto-hyperlink urls plugin. however i found that it plays well with the latest version (v2.01).


Wow, I got dropped from the friendblogs list. Guess I should post once in a while.