Wednesday, September 6, 2006

Recent Comments in the Sidebar (yes, for Blogger, too!)

Lots of blogs have a feature in their sidebar relating to "Recent Comments." It's where you can see the most recent 5 or 10 comments that were left. Not all blogs have them, but many do.

TypePad blogs

For TypePad blogs (such as The Alliance), it's done by:

  • Click on the Weblogs tab

  • Click Edit Design for your blog

  • Under Your Content, click Change Content Selections

  • Under Your Sidebar Content, select the item Recent Comments

  • Click Save Changes

  • You should now be back to Weblogs > Design > Edit Current

  • Click Change Ordering

  • Drag Recent Comments to wherever you want it to appear. It will initially appear at the bottom, but you can drag it up to wherever you prefer. Or leave it at the bottom, if that works for you.

  • Click Save Changes

  • You should now be back to Weblogs > Design > Edit Current

  • Click Republish Weblog

  • In the popup window, select Publish All Files

  • Click Publish

  • Wait for your blog to republish

  • Click Close


That's it! Your done with TypePad.

WordPress Widgets

In WordPress blogs (including WordPress.com) there are many ways to make it happen. One of the easiest is using Widgets. For WordPress blogs that don't use Widgets, there are plug-ins that can fill the bill.

If your WordPress blog supports Widgets, it's really easy.

  • From the Dashboard, click Presentation

  • If your theme supports Widgets, you have a Sidebar Widgets tab.Click Sidebar Widgets

  • Under Available Widgets, drag Recent Comments to where you want it to appear in the sidebar

  • If you want, you can change the title by clicking the icon on the right of the widget, then entering the new title in the box that appears

  • Click Save Changes

  • Your done!


WordPress Plugins

There are several plugins available that relate to comments. Each includes its own documentation, and installation will vary depending on your theme.



All seem to work exactly as described. If you want something quick and simple, use the G-Loaded! , the Mind matters version of the same, or the Zero Boss widget. If you want more functionality, and want to put more work into it, use the Bitte keine heiße Asche einwerfen version.

Blogger Comments

Yes, a Blogger version. Sort of.

You see, Blogger doesn't support this functionality. Not really. But there's a "sort of" workaround.

What it actually does is show limited information about the comments on the current page. If there are no comments on that page, no comments show in the sidebar. If there are comments on the current page, they show in the sidebar.

This does NOT work with HaloScan. If you use HaloScan for you Blogger blog, I can't help you. But, if you use Blogger comments instead of HaloScan ... and I'm of the opinion (only my opinion, mind you) ... that you should use the Blogger commenting system rather than HaloScan's. But that's a topic for another day.

If you use Blogger's comments, here's how to "sort of" add Recent Comments to the sidebar.

  • Back up your template. Always back up your template before you make any changes. Always.

  • Back up your template. Yes, I know I said that already. I just want you to know how serious I am about this. If you haven't backed it up and this screws you up ... well, you'll learn the hard way to back up your template. Like I said.

  • From your Dashboard, select {the name of your blog}

  • Click the Template tab.

  • Cick Edit Current (probably already be selected).

  • Make your backup of your template!! Seriously, make a backup.

  • Scroll down to where you want the Recent Comments to appear. A good place is either before or after the Previous Posts section.
    • The Previous Posts section likely starts with
      <h2 class="sidebar-title">Previous Posts</h2>
      and ends with
      </ul>

  • Now, at the desired location, insert this:



<MainPage>
    <h2 class="sidebar-title">Recent Comments</h2>
    <ul>
    <Blogger>
        <BlogItemCommentsEnabled>
            <BlogItemComments>
                <li>
                <$BlogCommentAuthor$> on
                <a href="<$BlogCommentPermalinkURL$>">
                <$BlogCommentDateTime$>
                </a>
                </li>
             </BlogItemComments>
        </BlogItemCommentsEnabled>
    </Blogger>
    </ul>
</MainPage>

  • Click Save Template Changes

  • Click Republish


That's it. View your blog to see recent comments on the front page.

See how it looks on a demo blog I have.

Want More?

If you have a question about topics like this, or a question about other blogging tips, or blogging etiquette, drop me an e-mail at this address. Or contact phin. One of us will cover it in an upcoming post. Perhaps at the Alliance. Or at our respective blogs: Basil's Blog and The Phish Bowl.

6 comments:

  1. The Zero Boss: Yours works. And exactly as described. And I've updated the post to include it. Thanks. I'm sorry I missed it earlier.

    In the post, I didn't include the fact that the German plugin handles comments and TrackBacks separately, which is the primary reason I'm using it.

    ReplyDelete
  2. No where do you mention how to go about actually getting those recent comments.

    ReplyDelete
  3. Tommy: Sock puppets! Contact Glenn Greenwald for help in making that happen. Background: Ace of Spades HQ

    ReplyDelete
  4. Busy Thursday Roundup...

    Lots of projects on the agenda today, and new material coming later on, but for now, here’s your Thursday reading list from the Yak:
    1. On Freedom of Speech - (as long as it complies with my personal view of the universe): Blame Bush all you wa...

    ReplyDelete
  5. Another pretty good recent comment plugin is
    brian's recent comments

    I didn't really think about it earlier, it came pre built in on the template I use.

    ReplyDelete

Please choose a Profile in "Comment as" or sign your name to Anonymous comments. Comment policy