Monday, December 10, 2007

Blog news: feed subscribers can now access comments

Back in October, I asked for some feedback on the blog, and Doug Geiger pointed out that people who read the blog through an RSS feed cannot easily click a link to add comments to a post.

I looked into it a bit and found a short script to enable that, but when I tried to upload it to the blog, the feed service objected (even though I obtained it from their own catalog).

Well, over the weekend, I had a bit of a blog template disaster (it was just a stupid-human trick, nothing to get excited about) and had to rebuild the template from scratch. Then today, I decided to check into the comments problem again, and I discovered that the same problem was occurring. So I looked at it a little harder and found the problem—a missing space in one line of code. I fixed that and uploaded the patch. The upshot is that for those of you using a feed reader, you should now see a Comments link at the foot of every post and you should be able to click it to access the comments, where you can then add a comment and, if you so choose, subscribe to the comment stream for that single post (that part seems silly to me, but it’s part of the deal). All this works in theory. If the stars are properly aligned.

Feel free to write back if you find it doesn’t work as advertised.

2 Comments:

Blogger Gordon said...

Great idea - so go on, spill the beans. HOW did you do this, what/where is the script?

3:22 AM  
Blogger Dick Margulis said...

Gordon,

I wasn't trying to be mysterious about it, exactly.

I use a feed service called FeedBurner. On my FeedBurner dashboard (which controls the details of how the RSS feed is configured), I can select from a menu of add-ons (labeled FeedFlare, although the URL for page spells it flair) that populate the line at the bottom of the post with links (Rate me on Authorati, Email this, Stumble It!). Those are the three I've selected to show on the blog if you read it on the Web. I added a fourth one, a link to the comments in the post, for people viewing the blog through a feed reader.

The way this is implemented is that FeedBurner provides a snippet of code to add to the Blogger template. That snippet in the template creates a unique javascript call to FeedBurner, where the database retains my choices and populates the links with a unique URL for every post.

Anyway, getting back to the FeedFlare page, it offers several "Official" FeedFlares and a tool for adding a new one by inserting the URL of a code snippet that it verifies before adding it to the "Personal FeedFlare" section of the page. I clicked the Browse the Catalog link and picked the Comments Link FeedFlare from the catalog. That's the one that didn't validate. So I looked at the source code for it, copied it to a new file, stared at it long enough to find the coding error, and uploaded it to my own website, then provided the URL of the corrected file.

If you want to follow the same bouncing ball, look for a missing space before a terminal slash inside an XML tag.

4:40 AM  

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home