32 Add Recent Comments Widget with Avatars To Blogger

In the past tutorial, I've shared a simple Recent Comments widget, now you have the option to add a stylish Recent comments widget with round avatars, which comes along with comment excerpts. You also have the option to change default Anonymous Avatar Image.


How to add recent comments widget with avatars

Step 1. Go to Blogger Dashboard, then go to Layout and click on Add a Gadget link.

avatars, recent comments blogger, blogger widgets

Step 2. In the popup window scroll down + choose HTML/Javascript



Step 3. Paste in the following code in the empty box:

<style type="text/css">
ul.w2b_recent_comments {
    list-style: none;
    margin: 0;
    padding: 0;
}

.w2b_recent_comments li {
    background: none !important;
    margin: 0 0 6px !important;
    padding: 0 0 6px 0 !important;
    display: block;
    clear: both;
    overflow: hidden;
    list-style: none;
}

.w2b_recent_comments li .avatarImage {
    padding: 3px;
    background: #fefefe;
    -webkit-box-shadow: 0 1px 1px #ccc;
    -moz-box-shadow: 0 1px 1px #ccc;
    box-shadow: 0 1px 1px #ccc;
    float: left;
    margin: 0 6px 0 0;
    position: relative;
    overflow: hidden;
}

.avatarRound {
    -webkit-border-radius: 100px;
    -moz-border-radius: 100px;
    border-radius: 100px;
}

.w2b_recent_comments li img {
    padding: 0px;
    position: relative;
    overflow: hidden;
    display: block;
}

.w2b_recent_comments li span {
    margin-top: 4px;
    color: #666;
    display: block;
    font-size: 12px;
    font-style: italic;
    line-height: 1.4;
}
</style>
<script type="text/javascript">
//<![CDATA[
    // Recent Comments Settings
    var
 numComments  = 5,
 showAvatar  = true,
 avatarSize  = 60,
 roundAvatar = true,
 characters  = 40,
 showMorelink = false,
 moreLinktext = "More »",
 defaultAvatar  = "http://www.gravatar.com/avatar/?d=mm",
 hideCredits = true;
//]]>
</script>
<script type="text/javascript" src="http://helplogger.googlecode.com/svn/trunk/w2b recent comments with avatars.js"></script>
<script type="text/javascript" src="http://your-blog.blogspot.com/feeds/comments/default?alt=json&callback=w2b_recent_comments&max-results=5"></script>

Note
Replace your-blog with the name of your blog.
Replace the "5" values in red, with the number of comments you want to appear... from:

  • numComments  = 

and

  • &max-results=5 

To change the anonymous avatar, replace the following address with your own:
  • http://www.gravatar.com/avatar/?d=mm 

To change the size of the avatar, replace 60 value in green with your own

Step 4. After you've made the changes, click Save... and you're done!

The credit goes to Hrish @ way2blogging.org

32 comments:

  1. Doesn't work on my blog :(

    ReplyDelete
    Replies
    1. NVM I feel stupid, I use disqus comment, do you know how to set it up for disqus. Thanks :)

      Delete
    2. Hi John,

      You can get Disqus Recent Comments Widget by logging into your Disqus account, then go to Tools tab and from there you can copy the code for your widget.

      Delete
  2. wow. my blog: http://www.blog-ph.com/ is more cute now :) thank you helplogger

    ReplyDelete
  3. Awesome Work I Like It

    ReplyDelete
  4. Anonymous8/08/2012

    got it! it works. thanks helpblogger!

    ReplyDelete
  5. Great! It works perfectly on my blog. :)
    Thank you...

    ReplyDelete
  6. Anonymous9/22/2012

    nice hack

    ReplyDelete
  7. i can't seem to get thsi to work..
    your other one works ..

    ReplyDelete
  8. its works.. thanks! -from Malaysia

    ReplyDelete
  9. wow!!! amazing. thanks ya

    ReplyDelete
  10. Köszönöm!!:)

    ReplyDelete
  11. Design? Page elements?
    I see these menu items nowhere on the menu.

    And when I change the favicon in "layout" (on lefthand side of page) it has no effect. I cannot replace my old icon.

    ReplyDelete
  12. I used and change to avatar..change no of comment..but can't work

    ReplyDelete
  13. Why the avatar didnt comuout....

    ReplyDelete
  14. thanks sir its work nice widget

    ReplyDelete
  15. OMG OMG OMG thanks you so much this box looks really good on my blog <33 thanks !!! :D

    ReplyDelete
  16. Nice...that's working......Wohh..

    ReplyDelete
  17. how to exclude the blog author comment?

    ReplyDelete
  18. How do you get this type of commenting system? like the one with the pictures etc

    ReplyDelete
  19. How can you make cooler anoymous pictures? On my site it just shows that thing with no picture

    ReplyDelete
  20. Its work nice widget.I appreciate your post.Thanks so much and let keep on sharing your stuffs.

    ReplyDelete
  21. not working for me... idont see the output after i copied and changed the details as written. :(

    ReplyDelete
  22. Thanks for your code, my blog now http://facebooktopic.blogspot.com/ is more interactive and beautiful. Thanks you so much and keep the good work in helping newcomers in blogging world.

    ReplyDelete
  23. This is fabulous! Thank you for posting this tutorial. (:

    ReplyDelete
  24. Is working and is fabulous!! Thank you so, so much!!!!

    ReplyDelete
  25. Nice...
    It works on my blog...
    thanks

    ReplyDelete
  26. cool... works well on my blog
    http://blog3kaki.blogspot.com/

    ReplyDelete

  27. Thanks for the great article..

    ReplyDelete
  28. Thanks for sharing.

    ReplyDelete