Monday, October 3, 2005

Movable Type Recent Comments in Blogger

Recents Comments are a good measure for guessing the popularity of individual posts in a blog. Recent Comments are available in Movable Type blogs and if your blog is hosted on Blogger, you are out of luck.

So I have written a simple trick for Bloggers to add a “Recent Comments” sidebar in their blogs without migrating to MT. And just like Movable Type, the recent comments sidebar gets updated in real-time whenever a new comment is posted on the blog. Just follow the steps below:

1. I assume that you already have a main blog on Blogger where you like to incorporate Recent Comments. You need to create one more blog on Blogger that will be used for storing comments. You can give it any name but for this example, I will call my new blog as MTComments.



2. Now in Settings | Email of MTComments blog, specify a Mail-to-Blogger email address which you will use to send posts via email to this MTComments blog. The format of the email address is username.BLOGPOST@blogger.com. Change BLOGPOST to something more meaningful like mtcommentsemail.



3. Blogger sends notification by en email whenever new comments have been posted on your blog. We will make use of this feature to put all our comments in one place. Open your main blog control panel and Choose Setting | Comments - specify the email address choosen in Step 2 as Comment Notification Address. By doing so, we are automatically converting the comment notification email to a new post in the MTComments blog.

Update: For some reason, you cannot directly specify a blogger.com email address for comment notification. Hence, I would suggest you mention your gmail address here and create a rule in gmail to forword all your email from your main blog to the email address specified in step 2.

4. This is the last step. Using any of the free RSS-to-JavaScript services, you can convert the ATOM feed of your MTComments blog into simple Javascript. Add this javascript code into your main blog template wherever you like, click save and republish your entire blog. That’s it.

Remember that the email address of Step 2 must be kept a secret. Otherwise, anyone who gets it will be able to post as you.

No comments:

Post a Comment