Drup, drup, drup...

Submitted by hrm on 13 October, 2009 - 21:15

... the sound of blog filtering through the percolator.

I've been putting together a website for my current work project, in Drupal, and wanted to aggregate items from many blogs, filtered by keyword on the item's tags. Now, Drupal's default Aggregator module doesn't do this. The News Page module seems to offer the feature, but I couldn't get it to display any blog posts, which was rather a shame. I eventually wound up with the FeedAPI modules.

FeedAPI and its friends seem to be incredibly powerful, and this is probably using a steam hammer to crack a nut, but it does seem to work reasonably well. However, even with FeedAPI, I couldn't seem to filter incoming posts on the basis of the tags. Finally, after quite a bit of investigation (and swearing at Drupal developers who don't document their data structures at all -- seriously, guys, this is a major pain), I discovered that the "keywords" module filters on the item description, not the tagged keywords.

Fortunately, it was about this point that I also discovered that a FeedAPI item filter can be implemented in about 5K of code, most of which can be copied verbatim from the example filter. So I've now written my own tag-based filter, to use on the Linksphere site, so I can now aggregate people's blog posts on the subject when they tag them with "linksphere" -- just like this one.

I'll upload the submodule for doing this tomorrow. It's late...