Applying the patch

This patch is made against a 1.4.2 version of pixelpost. You can apply it on your version by going to the directory where you installed pixelpost and running the following command: patch -p1 -b < ./rss_comments.patch

What does this patch modify?

It modifies two files: functions.php to add anchors to every comment (this allows the rss and Atom feeds to have link which point directly on the comment) and index.php to provide the feeds themselves. I have tested these modifications on a friend's photoblog for a few weeks, and no problem arised during this test run.

How to use these new feeds?

You can either modify your image templates to add by hand the links index.php?x=rsscomment (for RSS 2.0 comments) and index.php?x=atomcomment (for Atom 0.3 comments). Or you can use the tags <SITE_RSS_COMMENT_LINK> and <SITE_ATOM_COMMENT_LINK> in your image template to have them automatically replaced by the corresponding link.

Further improvements

This is a quick hack and I don't use pixelpost myself, so obviously there's room for improvement. One of the first thing that should be done is to merge the code for "normal" feeds and comment feeds (for now, it's just a copy and paste of those part of the code) and maybe make this code work as an addon. But I don't think I'll have the time to make these improvements, so if someone wants to make them, please be my guest.

Download links

You can find the patch here.

Or you can download the two files: index.php and functions.php. (Do not forget to remove the final 's' in those filenames before saving them to your installation.)

Final thoughts

Please leave comments!