Blogger is now introducing features every day as part of its 10th birthday celebrations.Now it has formally announced the Blogger Comment avatars. To know what it means take a look at the comments here on this blog and you will see the profiles pictures of the commentators near to the comments.If you are using some default blogger template things would be much easy.Here is a little screenshot of the new feature.
Implementation of Comment Avatars
1.First of all Go to Blogger > Settings >Comments and enable “Show profile images on comment”
2.Now if you have a normal un customized template you will see the avatars on the comments on your blog.
3.If you have a customized template you will have to add some codes and play around with your template.For that first go to Blogger Layout >Edit HTML and backup your template.
4.Expand the widget templates and check if you can find this line there
<dl expr:class='data:post.avatarIndentClass' id='comments-block'>
If you can’t then that means we have something to do..
If you couldn’t find this,then do the following steps.
a)Find
<dl id='comments-block'>
and replace it with
<dl expr:class='data:post.avatarIndentClass' id='comments-block'>
b)Now Find all occurrences of
<a expr:name='data:comment.anchorName'/>
and replace each of it with
<b:if cond='data:comment.favicon'> <img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/> </b:if> <a expr:name='data:comment.anchorName'/> <b:if cond='data:blog.enabledCommentProfileImages'> <div expr:class='data:comment.avatarContainerClass'> <data:comment.authorAvatarImage/> </div> </b:if>
If you are using the author comment highlighting trick and if doesn’t work out with that trick,then leave a comment and i will try to help you out..
Further Styling.
If you want to add a default avatar for the ones with no profile pics,then place the CSS code just above
]]></b:skin>
CSS Code
.avatar-image-container {background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEherQO_GtDS1bTeU1XNM5qaxTQsfELbw4IJwldSWJfVI08pDskwXPsf4dje2g9_1k3Q7L5CdE6g_CuM-28EadKuGXLIuvCdHuqLHYSTzNjPgkhHtIiWYHUB6AbbR9dy1SYJU8-AQTuUEw/s400/default.gif); width:35px;height:35px; } .avatar-image-container img { border:none;}
You can customize the CSS according to what you need.
If you need bigger avatars instead of smaller ones,then use the following CSS instead of the one above.
.avatar-image-container{width:50px;height:50px;margin-top:-5px;} .avatar-image-container img {background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6wAVNvvz4RXw6PUyXNzjDN9wg-u-O-achsTXfbu9-AwIVcuZrx8n2OdvUhnkdK5mTw_UmDZ5TwU9_JSEJf7Iuxc7gXSQKZQf_Lr45dtjHsh3QD7Ae5X4wDEfB9n-tnRzixfQBFXU3Hhg/s400/grav.png);width:50px;height:50px;}
This will give you a bigger avatar and also a default gravatar image but it has a little drawback.It will also resize the small blogger favicons to a big size.(blooger favicon is displayed when a blogger user doesn’t have a profile avatar.Similarly OpenId also has a similar small icon.. ).
BTW to set you avatar pic you can use two methods.You can choose the edit profile link on your blogger profile and upload an image there,The second method is to enter a blogger comment somewhere in any blogger comment form and then click the Preview button instead of the Post Comment button.Now you will see an option to upload your avatar.
In case anything bad happens restore the template backup.. and comment here..:)
Permalink: Show avatars on Blogger Comments
Its a little bit to late for the blogger comment system ,, lol
ReplyDeletei use intense debatte ;)
@Christian Schnitt (Stulles Weblog) ,
ReplyDeleteyea it was a little late.. but better late than never
Hi Anesh,
ReplyDeleteI'm using mybloglog avatar in my blogger blog cz that is support custom URL, and not only blogger profile, anywy, Thanks for info about this update :D
Thanks, very useful. Appreciate the post for us with Customized templates.
ReplyDeleteBut in this code, blog author's comment settings get disappeared.
ReplyDeletePretty darn cool! :-) Thanks! I love your tweaks!
ReplyDeletevery useful information, thank you
ReplyDeleteIt is not working on my blog. Please help me.
ReplyDelete@sajitha ,
ReplyDeletedid you follow the steps in this post??
and if that doesn't work try reverting widget templates to default(From Blogger Layout>Edit Html page)
BTW you have a good blog but a bad design.. :)
nice..........
ReplyDelete@Ms Hetal Patil ,
ReplyDeleteblog author's comment setting means?
Hi Aneesh
ReplyDeleteI get this hack working Only by replacing <dl id='comments-block'> in Blogger Template code by :
<dl expr:class='data:post.avatarIndentClass' id='comments-block'>
<b:if cond='data:comment.favicon'>
<img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/>
</b:if>
<a expr:name='data:comment.anchorName'/>
<b:if cond='data:blog.enabledCommentProfileImages'>
<data:comment.authorAvatarImage/>
</b:if>
Juste try it, its working perfectly with my blog LeBlogger.com (French)
Hope this could help.
@Soufiane LeBlogger ,
ReplyDeletethe avatar image code should appear within the blogger comment b:loop.
<dl id='comments-block'> lies outside the comment loop in normal blogger templates.So if you replace that with the modified avatar codes,then the avatar code would be outside the blogger comment loop..
Yes you're right, I was in a little hurry when i wrote my comment any way its working in my blog and your first code it wasn't working.
ReplyDeleteHave you an idea of how we can choose an other Image for Anonymous comments ???
what about changing no-image blogger profiles icon size ???
ReplyDeleteFor some templates, there's no a expr:name='data:comment.anchorName'/
ReplyDeleteso the code must be added after the first <b:loop values='data:....>
?????
Sorry to confuse you, Aneesh. I mean that hack where blog author's comments are highlighted as compared to visitor's comments.
ReplyDeleteGreat post
ReplyDeleteThanks a lot !
@Ms Hetal Patil ,
ReplyDeletegive me the code used there and i can try to help you out..
@Ms Hetal Patil
ReplyDeletei rejected the previous comment because its not the code that i am talking of(and it was too big :P). You wont be able to paste template codes into this comment box. So i can help you if you mail me the template or post the same in the forums. Email aneesh[at]bloggerplugins.org..
Aneesh, please provide me your mail id i will mail you template.
ReplyDeleteMany thanks to you
@Soufiane LeBlogger,
ReplyDeleteyes place it within the loop,
probably below the first dt tag in the b:loop
i added some CSS to display a default no image(gravatar default image) and also resized theavatar a lil bit..
@Ms Hetal Patil i have already done that in my previous comment.
ReplyDeleteThanks it's just perfect.
ReplyDeleteNice!.........post with good info.,sure! i'll use it on my blog. Thanks !
ReplyDeleteHi - I'm using the author comments hightlight hack, and sadly using these instructions didn't work. If you could help me figure out what I'm doing wrong it'd be very much appreciated!
ReplyDelete@Nymeth ,
ReplyDeletecan i have a look at your template.. you will get my email from the previous comments..
thanks for the help with this. I cant get it to work on mine, but i'll toy with it some more. great post.
ReplyDelete@mackenzy ,
ReplyDeletein case you need some help,comment me here..
hi,
ReplyDeletewhere do i place the backlink code you provided?
I'm having trouble with this too. "anchorName" is nowhere in my template. Can I email my template to you for some assistance?
ReplyDelete@SuziQoregon,
ReplyDeletehmmmm ok my email is there in some previous comment
Thanks alot
ReplyDeleteHi. I have tried this on my blog but it's not working. What could be wrong?
ReplyDeleteReally this is a nice feature of Blogger. I also told it in my blog.
ReplyDeleteThanks for sharing
Obrigada pelo tutorial, ficou ótimo! Estou repassando ele para os meus visitantes com os devidos créditos.
ReplyDelete@Lecca,
ReplyDeleteok .. You are welcome .. continuem visitando ..
i am not that bad at Portuguese :P
@Terence Chan ,
i missed you.. i haven't provided any backlink code..This one is the comment code..If you want me to help, show me your template code or explain what has gone wrong. :)
its working
ReplyDeletethank u for the great job
kousik
waw,good bro!!!
ReplyDeleteHi..anyone helpme..i found the step (a) code and replaced it,but im unable to find the step code(b)to replace..its not their in my template code..what to do?
ReplyDeleteHelp me
..My template is SCARLETT 4 column template..you download it from here and check the code..
http://www.allblogtools.com/blogger-templates/4-columns/scarlett-4-columns/
@jumper,
ReplyDeletetry placing the code mentioned in b) after the line
<b:if cond='data:comment.isDeleted'>
I installed this but its not working in my blog. I am using the highlighting the author trick, I hope you can help me with this one. Thanks!
ReplyDelete@Boffill ,
ReplyDeletei can't say without seeing the template as there are many implementations of the highlighting hack.
Thank you Aneesh. I try for this new feature to show avatar on blogger comment.
ReplyDeletehttp://bloggershoutbox.blogspot.com
Hi, friends !
ReplyDeleteI have a blog about psychology (in polish, but I have Google Translator Widget).
I can't find the line dl id='comments-block' so I don't know what should I do. Please help me !
thankyou frienda
ReplyDelete@Integralny,
ReplyDeletetry the second step only and let me know what happens.. :)
I can't find the second part with "anchor", too... :(
ReplyDelete@Integralny ,
ReplyDeletetry putting after <cite>
If you cant find that one also,then contact me with your template.
I've found "cite". What should I put after it ?
ReplyDelete@Integralny try putting the replacement code mentioned in b) after removing the line <a expr:name='data:comment.anchorName'/> from it
ReplyDeleteI've found cite but I haven't find any line of code with word "abchor". It doesn't exist.
ReplyDelete@Integralny ,
ReplyDeletejust put the big code snippet mentioned in step b) of this post after <cite>
It doesn't work.
ReplyDelete@Integralny,
ReplyDeletehmm your template codes are lil different.. if you want to get it fixed.. Contact me with your template at the forums
First of all, thanks to this very useful post.
ReplyDeleteI have a customized templet and reading your post I am trying to show profile images on comments.
I have followed your steps and completed step (a), but now I am unable to find the code in step (b)in my templet. What I have to do now is the question?
please instruct me for the same.
Thanking you.
Hey there,
ReplyDeletethank you very much for this helpful post. I tried it on a testblog and it worked, although the avatar appears above the name and not right next to it.
Do you have a idea how to fix that ? Thank you very much for your help
:)
you`re the best
ReplyDeleteI´m a little confused. You say if I can´t find
ReplyDeleteexpr:class='data:post.avatarIndentClass' id='comments-block'>
What if I can find it? It´s there, but I don´t know what to do now. Do I just continue to follow the other steps in your description?
Thanks, Mike
@Mike,
ReplyDeletecheck if this code is present
<data:comment.authorAvatarImage/>
If that is not present,backup your template and continue the steps mentioned in the post..
Yes, that´s there too. My blog isn´t really that customized either. Nav bar is hidden and I´ve unhidden the page elements above posts and in the header, as well as hidden the header border. Also some really basic color modifications, but that´s it. But when I go to enable Post Pages, the drop-down button is greyed out and unaccessable.
ReplyDeleteAnother problem I have is not being able to back up my template. When I try I always get a message telling me it can´t be opened wherever I try to open/save it.
Thanks again for any help,
Mike
Hi Aneesh,
ReplyDeleteI was trying to follow your instructions but I can't make it work. I'm not very technical person. Does it have something to do with the placement of code in step b?
Here's what I did:
a. Replaced dl class='comments-block' id='comments-block' with dl expr:class='data:post.avatarIndentClass' id='comments-block'.
b. Added the following code after b:loop values='data:post.backlinks' var='backlink':
b:if cond='data:comment.favicon'
img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/
b:if
a expr:name='data:comment.anchorName'/
b:if cond='data:blog.enabledCommentProfileImages'
div expr:class='data:comment.avatarContainerClass'
data:comment.authorAvatarImage/
/div
/b:if
Please tell what is wrong with what I'm doing. I just remove the open and close braces to get this comment through.
Thanks in advance.
excellent site blogger
ReplyDeleteHi, Aneesh, i tried to install it, i see some avatar, but not mine, it's the blogger logo actually. is there something wrong with it?
ReplyDeletei copied the code after b) at two places, the one you describe (nothing happened) and before this:
[a expr:href='data:comment.authorUrl' rel='nofollow'
data:comment.author]
and then i had some pic appeared but not the avatar. Can you help me?
I accepted the showing avatar in blogger option and all...
thanx
@nicquee ,@Pabouch
ReplyDeletei am not able to figure it out.. I can fix it for you guys,if you mail me your template. My email is there in the previous comments..
or you can use the contact form here..
Hi Aneesh,
ReplyDeleteI want to follow your instructions, but I don't know where I heve to put that code because I couldn't find this code on my blog this code
dl id='comments-block'
and
a expr:name='data:comment.anchorName'/
where is it ? and so on.
Please tell me how and where I have to put your code
dl expr:class='data:post.avatarIndentClass' id='comments-block'
b:if cond='data:comment.favicon'
img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/
/b:if
a expr:name='data:comment.anchorName'/
b:if cond='data:blog.enabledCommentProfileImages'
div expr:class='data:comment.avatarContainerClass'
data:comment.authorAvatarImage/
/div
/b:if
or this
]]>/b:skin
and this
.avatar-image-container {background:url(http://2.bp.blogspot.com/_u4gySN2ZgqE/SrTInZfKwVI/AAAAAAAAAwA/xaGlRIqkHDw/s400/default.gif); width:35px;height:35px; }
.avatar-image-container img { border:none;}
or this
.avatar-image-container{width:50px;height:50px;margin-top:-5px;}
.avatar-image-container img {background:url(http://3.bp.blogspot.com/_u4gySN2ZgqE/SrSUS1YpxwI/AAAAAAAAAv4/DihiWlWRxQs/s400/grav.png);width:50px;height:50px;}
on my blog html code.
Please help me.
Thank you.
Very good article and very useful. Thank you Aneesh
ReplyDeleteIt doesn't work in my blog (http://lilleskvat.blogspot.com). I get the same small image in every comment, but it isn't the avatar :-(
ReplyDeletePlease, help!
well done! Very useful.
ReplyDeleteI have install this on my blog, but I use Mybloglog Avatar. Thanks anyway for this tips
ReplyDeleteThank you so much for the easy instructions!
ReplyDeleteEverything worked great except that I noticed for my blog, I needed to do it like this:
1. Implementation of Comment Avatars
2. Save Template
3. Further Styling
I found that if I tried to do both steps at once then saved last nothing worked but this way worked perfect for me!
Thank you, Thank you, Thank you!
useful blog
ReplyDeleteHi.
ReplyDeleteI implemented all the code but it only displays my avatar whenever I leave NEW Comments on my blog. It still displays the old blogger icon next to all the previous comments I left on my blog. Is it supposed to work like this?
Is it not supposed to automatically display my avatar on ALL the older comments I've already made on my blog too? Just asking. Or only for new comments from now on?
Example of new comments after your code has been implemented:
http://globetrottingonline.blogspot.com/2009/04/launchy-keystroke-launcher-for-windows.html
Example of old comments after your code has been implemented:
http://globetrottingonline.blogspot.com/2009/08/my-facebook-profile-gives-page-not.html
(as you can see on the last URL my avatar still shows the old blogger icon, not the new avatar)
Another thing I noticed is that every time I leave a comment now, it makes a new copy of the avatar image and stores it in my blogger album at Picasa. If I leave 3 comments on a post on my blog and you look at the Properties of my avatar images, the URLs are different. So if you had to leave 1000 comments over time on your own blog, you'll have 1000 copies of your avatar image in your blogger album! Surely it must reference only one image since I only have one avatar?
when the next post ? ;)
ReplyDeleteVery useful, thank you
ReplyDeletethanks it worked for me!
ReplyDeletei try and it works.. so much thanks...
ReplyDeletecould not find the line
ReplyDeleteb)Now Find all occurrences of
4th one
in my blog ksrtcblog.com
hi friends
ReplyDeleteaww geez, Ive played around w/ my template so much , Ive changed the avatar images so many times, eliminated codes, added new ones - wheeew I cant even find the codes you have listed above anymore- I believe they all ran away to China ! they got tired of getting shifted around by me all the time :))
ReplyDeleteI'm such a bad girl , I cant leave the codes alone :( poor codes ...
Nice tips,..
ReplyDeleteSuccess for you!
basa apa gw kagak ngertiiiiiiiii........
ReplyDeleteUh oh... what happened? It all seemed to be working perfectly and then all of a sudden only the first five profile pics are showing up in the comments. I noticed that the same thing has happened here too! Any ideas?
ReplyDelete@Yeah, I'm Still Here,
ReplyDeleteyea this has happened to all blogs..i hope that the blogger team would soon fix it..
Very uesful. Thank
ReplyDeleteExcellent bro ... I finally got it working. Point b was missing for my template, I copied content before after " dd class='comment-body' " and it worked fine for me.
ReplyDeletehttp://sureshvaishya.blogspot.com
On each of your post there is the total number of comments displayed on the top. I tried finding that in your site and couldn't find how to do that. Please give directions
ReplyDeleteLook at comments on my site whats happening : (
ReplyDeletehttp://bloggerplugnplay.blogspot.com/2009/10/zoom-image-to-original-full-size-on.html
Help!!!
ReplyDeleteI can't find my template this code a expr:name='data:comment.anchorName'/ help me???
very good, I finally found the answer. because I was looking for this tutorial to my blog .. thanks, nice post
ReplyDeleteThanks for Share
ReplyDeleteit is not working on my blog. Please help me Aneesh!!! I sent you an email!
ReplyDeleteuseful information..
ReplyDeleteHi Aneesh. The profile pic shows on my blog but not within the comment like here on your blog, despite following the steps of the hack.
ReplyDeleteWhat do I do now?
kinda cool tutorial.... :D thx alot,.
ReplyDeletethanks again, my simple blog becoming more & more sophisticated with your tweaks
ReplyDeleteNice Tips, but how if any blogger using "template classic"? maybe you can help me.
ReplyDeleteonly substitute avators show up when I use embedded comments. Real avatars show up when using pop-up comments. Help?
ReplyDeletethanks for share, useful information...^_^
ReplyDeleteThanks for sharing!
ReplyDeleteThanks so much! I've BEEN trying to get this done. I love your site.
ReplyDeleteThis is sooo cool...thanx man..
ReplyDeletelet me test
ReplyDeleteThank you, it's so great. But I'd like to add some border to the avatars, where can I put that?
ReplyDeleteHello, Aneesh, it's me again. Is there a way to change the default Blogger "B" favicon to another one of one's own choosing?
ReplyDelete@Glenn - Refer http://www.bloggerplugins.org/2007/07/another-blogger-trick-change-favicon.html
ReplyDelete@Aneesh - I'm sorry, Aneesh. I did not mean the favicon on the tab line, I meant the default "B" in 16px which shows up in the comments when the commenter has no favicon for him- or herself. Specifically, as it relates to this post. Thanks.
ReplyDeletecool,like it!
ReplyDeleteexcellent and very informative.
ReplyDeleteHi very useful information, thank you
ReplyDeletethanks for information
ReplyDeleteThank you very much.
ReplyDeleteYour website has really helped me in gathering the information I needed.
Very useful posts... thanks! I have a question, though. Do you know how to make the comment avatars un-clickable, so they don't link back to a Blogger (or any other) profile?
ReplyDeleteHello there...
ReplyDeletesome how i am not able to find it for my site....
i really dont know what to do... kindly help me.....
My avatars are not being displayed...
Please visit http://handpickednotes.blogspot.com and let me know... please!
hey there i did everything you told us to but its not working pls help me man
ReplyDeleteHI, I'm from Brazil, this tool is very good "Comment Avatars", I'll try to implement.
ReplyDeleteNice blog. congratulations!
i didn't find the two lines you mentioned, but i found:
ReplyDeletedl class='comments-block' id='comments-block'
and
a expr:href='data:blog.url + "#" + data:comment.anchorName' title='comment permalink'
can i actually use the steps above with those lines?
i've tried, but it doesn't work :(
thanks for your attention :) nice blog!
it works very well on my blog, thanks
ReplyDeleteWorks great - thanks!
ReplyDeleteOne question I have - I would like to stylize the comments even further. I'd like to put the avatar and the commenter's name in a separate box above their comment (maybe 2 separate colored boxes?). Do you know how I could do this?
I have added. It works.
ReplyDeleteHi - I couldn't find an occurrence of
ReplyDeleteIn the custom blogger template I'm using. If you could help me out, it would be greatly appreciated. http://lisabrowndesign.blogspot.com/
good!
ReplyDeleteThank you. It works like a charm!
ReplyDeletejust checking my openid avatar is shown or not?
ReplyDeletehow to create register/sign in in my blog?
ReplyDeletewhy when we register to follow, we cant comment use this profile....
love it! it did work for me! thanks! bookmark this site already!
ReplyDeleteNot working.
ReplyDeleteI've been using your code since you first put it up but suddenly it isn't working any more. I haven't changed my code or template. I can't see the avatars in FireFox or Chrome. I have a friend who uses your code and the avatars are still working for her. Any ideas?
ReplyDeleteI love your code and have a link back to here in my blog's footer.
Let me se if it works.
ReplyDeleteCool
ReplyDeleteThank you very much!!!! I have become crazy to sold this! And i couldn't solve the problem without you! Thank you very much=)
ReplyDeleteThankz a lot!
ReplyDeleteGreat information resource! Thanks for sharing!
ReplyDeleteThx bro, it's working :D
ReplyDeleteThanks, it worked well... but I couldn't get to have the same border as I have around the blogger avatar (I have a thin border around them)
ReplyDeleteI've tried border: 1px solid $(image.border.color); instead of {border:none;} but I couldn't get a border. Frustrating.
Thx a lot Aneesh. After several attemps, I finally made it to my blog. Thx and keep up your good works. Will visit again soon.
ReplyDeleteit's work..!!
ReplyDeleteThank you so much.
my avatar shows here but on my blog
ReplyDeleteHi!
ReplyDeleteMy blog is http://yoyepunto.blogspot.com and I can't find any ANCHOR in my template. What can I do? Thanks in advance!
nice one i ll use his @ www.jasica.in
ReplyDeleteGreta post :)
ReplyDeleteplease help me add avatar to recent comments. mail to vietlao2003@gmail.com
ReplyDeleteyes..!!
ReplyDeletethis great tutorial.
BTW, how to generate favicon url blog to gravatar blogspot ?
avatar comment from favicon url like this http://gravatar.com/favicon.ico
any idea ?
thank you.
Your blog is great , thx for the tips
ReplyDeletehonthakun pektra. thanks
ReplyDeleteGood
ReplyDeleteFriend i need your help pls do at the earliest.
ReplyDeleteThe Comment Avatar Could not Set Center and need also remove the avatar Border.
Thanking You
little weird on mine
ReplyDeleteHello dear, nice tutorial . I had tried to apply this one in my blog, but no effect happened. Could you find the problem for me?? oh ya this is my blog thanks before
ReplyDeletehttp://ypsrandy.blogspot.com/
I have a blogger account, and all my old comments (that used to display my profile pic) the picture is gone now. It is now just a circle with a line through it?
ReplyDeleteAny idea how I can get my pic back on all the old comments? I did something, not sure what; but anyhow the profile is showing up on new comments I post, but not on the old comments.
Thanks...
ReplyDeleteMy avatar seems to show up on others' blogs but not my own. Also, no one's photos show up with their comments on my blog.
ReplyDelete