In one of my previous tutorials, I have shared a simple Recent Comments widget having the ability to display the latest comments published on the blog posts. However, the main disadvantage of it was that it didn't have the option of showing the users' avatars; so for those who'd like to see something more, here's a stylish Recent comments widget with round avatars and comment excerpts. Besides providing the option of displaying the commenters avatars, we'll be able to change the default image for the anonymous avatar, as well.
Isn't that great? Let's begin adding it!
Step 2. When the popup window appears, scroll down and choose the 'HTML/Javascript' gadget.
Step 3. Now, copy and paste the following code inside the empty box:
- by default, 5 comments will be displayed... to show more replace the "5" values in red
- to change the avatar for anonymous users, replace the following address with the url of your image:
- for square avatars, remove the line in red
Step 4. After you've made the changes, click Save... and we're done!
Once a reader sees the recent comments widget in the blog's sidebar, he comes to know that your blog is pretty active and that encourages him to post comments on your blog. This way, you can gather some active user base to comment on your blog posts.
Isn't that great? Let's begin adding it!
How to add recent comments widget with avatars
Step 1. Go to Blogger Dashboard > select your blog > go to 'Layout' & click the 'Add a Gadget' link.Step 2. When the popup window appears, scroll down and choose the 'HTML/Javascript' gadget.
Step 3. Now, copy and paste the following code inside the empty box:
<style type="text/css">Note
ul.helploggercomments{list-style: none;margin: 0;padding: 0;}
.helploggercomments li {background: none !important;margin: 0 0 6px !important;padding: 0 0 6px 0 !important;display: block;clear: both;overflow: hidden;list-style: none;word-break:break-all;}
.helploggercomments 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;}
.helploggercomments li img {padding: 0px;position: relative;overflow: hidden;display: block;}
.helploggercomments 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 = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG40OLCbN6IzopBwXi6JcsRrHE0znqYX5W3LUBQUjr0M5ueYA8h1jIwdl8cFsU6WptY80Q5U6gsDXk8MJ59I0PhRTa8X2_rjRdWX-Db2sBqUyP0Lz60xfea4e7oBzhnYyC3T_YDIrX_B4h/s1600/default-avatar.jpg",
hideCredits = true;
//]]>
</script>
<script type="text/javascript" src="http://helplogger.googlecode.com/svn/trunk/helplogger/[helplogger.blogspot.com]recent-comments.js"></script>
<script type="text/javascript" src="/feeds/comments/default?alt=json&callback=helploggercomments&max-results=5"></script><div style="font-size: 10px; float: right; margin-top: -15px">Get this <a href="http://bloggerchive.blogspot.com/2012/03/add-recent-comments-widget-with-avatar.html" >Recent Comments Widget</a></div>
- by default, 5 comments will be displayed... to show more replace the "5" values in red
- to change the avatar for anonymous users, replace the following address with the url of your image:
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG40OLCbN6IzopBwXi6JcsRrHE0znqYX5W3LUBQUjr0M5ueYA8h1jIwdl8cFsU6WptY80Q5U6gsDXk8MJ59I0PhRTa8X2_rjRdWX-Db2sBqUyP0Lz60xfea4e7oBzhnYyC3T_YDIrX_B4h/s1600/default-avatar.jpg- to change the size of the avatar, replace 60 value in green.
- for square avatars, remove the line in red
Step 4. After you've made the changes, click Save... and we're done!
Once a reader sees the recent comments widget in the blog's sidebar, he comes to know that your blog is pretty active and that encourages him to post comments on your blog. This way, you can gather some active user base to comment on your blog posts.
Doesn't work on my blog :(
NVM I feel stupid, I use disqus comment, do you know how to set it up for disqus. Thanks :)
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.
wow. my blog: http://www.blog-ph.com/ is more cute now :) thank you helplogger
Awesome Work I Like It
got it! it works. thanks helpblogger!
Great! It works perfectly on my blog. :)
Thank you...
nice hack
i can't seem to get thsi to work..
your other one works ..
Super, Thank You!
it's work but why admin also in the widget ??
Berkunjung sob,ditunggu
kunjungan baliknya
Not working
It's a great help. Thanks U dude ...
its works.. thanks! -from Malaysia
wow!!! amazing. thanks ya
Köszönöm!!:)
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.
this is usefull to me
I used and change to avatar..change no of comment..but can't work
Why the avatar didnt comuout....
thanks sir its work nice widget
OMG OMG OMG thanks you so much this box looks really good on my blog <33 thanks !!! :D
Nice...that's working......Wohh..
how to exclude the blog author comment?
How do you get this type of commenting system? like the one with the pictures etc
How can you make cooler anoymous pictures? On my site it just shows that thing with no picture
Its work nice widget.I appreciate your post.Thanks so much and let keep on sharing your stuffs.
not working for me... idont see the output after i copied and changed the details as written. :(
This is fabulous! Thank you for posting this tutorial. (:
Is working and is fabulous!! Thank you so, so much!!!!
Nice...
It works on my blog...
thanks
cool... works well on my blog
http://blog3kaki.blogspot.com/
Thanks for the great article..
Thanks for sharing.
it works my friend... thank you so much, from Philippines..
avatar-image-container
A very useful article! Thanks.
Thank you, it works on my blog. I use standard theme instead of Dynamics.
Doesn't work
Thanks for yout tips, it's cute! It works on my blog but it's not the most recent comment, any idea why?
Thanks. It works
I have tried but still can't appears,,, maybe some problem on my template.
Visit back on my blog please,,, to every one :)
http://juragancipir.blogspot.com
thx
It work! Thanks!!
Thanks for sharing... :D
Love it! Thanks!
I've just add this code above and it works correctly..
Thank you for sharing
A million thanks!
Cool, thank you :)
http://ayungavis.blogspot.com
great tip !! keep the good work !
Works beautifully - THANK YOU!
works perfect.
.thanks.
It may be that I am unfamiliar with C&P codes, but I tried to use the first tutorial and after I (Did change with original blog address) Saved and went and checked it was wrong. What I saw after clicking "Recent Comments" was a link to the tutorial. I think maybe I used to much of the code. I would like to use the code here with the Rose, but I think I need it to be broken down to what I should exactly Copy & Paste. I would appreciate any help. Thank you! May you have a Blessed 2014.
Thanks for tips:)
tq bro, it's awesome. have it attached in my blog
This is really awesome! My old widget was broken and I used your advice. Works perfectly, thank you so much! Andreas
Thanks, Its working on my blog
Works fine in my blog except for the round part, which puzzles me.
Hi Lyrans,
You have the option to remove the roundness of the avatars, just delete the line in red from above (I've updated my post). Thanks for visiting!
Many thanks for this great widget which works well.
However I have changed to google+ comments system on my blog http://lastingrose.blogspot.co.uk
Is there an rss feed for these comments or a way to extract and show in the widget?
Thanks so killer! Thank you!!
It worked perfectly -- I love the round icons and the choice of replacing the boring anonymous icon with my own image..thank you so much!!
i like this blog,so owesome....!!!
wow, very easy to do,,
Thanks
It looks like I can't customize this widget. I actually changed the number of comments to 6 and set the number of shown characters to 110, but it definitely doesn't show these changes.
cool .. it work ^^
Also it doesn't show the default avatar I set, even though it leads precisely to the link of the image I want to have as the default avatar for the widget.
Hi,
It doesn't work for me, after the modifications, I juste can read the following information on my blog :
"get this recent comments widget".
By the way, thank you for this great tutorial, I hope I'll find a widget.
Greetings from France.
thanks... very cute ^_^
I really like this widget, but it is not working on my blogspot, either. If I don't replace helplogger with my blog name (wingsofprophecy), I get YOUR comments - lol, but if I replace it in the html code (several places - which may be what I'm doing wrong), then nothing displays at all, except my caption, Most Recent Comments. Can you please tell me what I am doing wrong? My blog gets a mil or so hits a year, and this would be really helpful. I originally came to your page looking for a way to make most recent comments appear first on one of my pages and found this.
Hi Glynda,
Please add the code again, you don't have to replace any address. I hope it works now!
Please make one for Disqus too...