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(http://2.bp.blogspot.com/_u4gySN2ZgqE/SrTInZfKwVI/AAAAAAAAAwA/xaGlRIqkHDw/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(http://3.bp.blogspot.com/_u4gySN2ZgqE/SrSUS1YpxwI/AAAAAAAAAv4/DihiWlWRxQs/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
i use intense debatte ;)
@Christian Schnitt (Stulles Weblog) ,
yea it was a little late.. but better late than never
Hi Anesh,
I'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.
But in this code, blog author's comment settings get disappeared.
Pretty darn cool! :-) Thanks! I love your tweaks!
very useful information, thank you
It is not working on my blog. Please help me.
@sajitha ,
did 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..........
@Ms Hetal Patil ,
blog author's comment setting means?
Hi Aneesh
I 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 ,
the 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.
Have you an idea of how we can choose an other Image for Anonymous comments ???
i don't see any method to replace the default image.. Blogger uses a blank image http://img1.blogblog.com/img/blank.gif . I don't know why they don't come up with a better no image avatar..
what about changing no-image blogger profiles icon size ???
For some templates, there's no a expr:name='data:comment.anchorName'/
so 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.
Great post
Thanks a lot !
@Ms Hetal Patil ,
give me the code used there and i can try to help you out..
@Ms Hetal Patil
i 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.
Many thanks to you
@Soufiane LeBlogger,
yes 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.
Thanks it's just perfect.
Nice!.........post with good info.,sure! i'll use it on my blog. Thanks !
Hi - 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!
@Nymeth ,
can 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.
@mackenzy ,
in case you need some help,comment me here..
hi,
where 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?
@SuziQoregon,
hmmmm ok my email is there in some previous comment
Thanks alot
Hi. I have tried this on my blog but it's not working. What could be wrong?
Really this is a nice feature of Blogger. I also told it in my blog.
Thanks for sharing
Obrigada pelo tutorial, ficou ótimo! Estou repassando ele para os meus visitantes com os devidos créditos.
@Lecca,
ok .. 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
thank u for the great job
kousik
waw,good bro!!!
nice info
Hi..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?
Help 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,
try 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!
@Boffill ,
i 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.
http://bloggershoutbox.blogspot.com
Hi, friends !
I 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
@Integralny,
try the second step only and let me know what happens.. :)
I can't find the second part with "anchor", too... :(
@Integralny ,
try 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 ?
@Integralny try putting the replacement code mentioned in b) after removing the line <a expr:name='data:comment.anchorName'/> from it
I've found cite but I haven't find any line of code with word "abchor". It doesn't exist.
@Integralny ,
just put the big code snippet mentioned in step b) of this post after <cite>
It doesn't work.
@Integralny,
hmm 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.
I 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,
thank 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
I´m a little confused. You say if I can´t find
expr: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,
check 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.
Another 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,
I 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
Hi, 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?
i 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
i 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,
I 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
It 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 :-(
Please, help!
well done! Very useful.
I have install this on my blog, but I use Mybloglog Avatar. Thanks anyway for this tips
Thank you so much for the easy instructions!
Everything 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
Hi.
I 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 ? ;)
Very useful, thank you
thanks it worked for me!
i try and it works.. so much thanks...
could not find the line
b)Now Find all occurrences of
4th one
in my blog ksrtcblog.com
hi friends
aww 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 :))
I'm such a bad girl , I cant leave the codes alone :( poor codes ...
Nice tips,..
Success for you!
basa apa gw kagak ngertiiiiiiiii........
Uh 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?
@Yeah, I'm Still Here,
yea this has happened to all blogs..i hope that the blogger team would soon fix it..
Very uesful. Thank
Excellent 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.
http://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
Look at comments on my site whats happening : (
http://bloggerplugnplay.blogspot.com/2009/10/zoom-image-to-original-full-size-on.html
Help!!!
I 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
Thanks for Share
it is not working on my blog. Please help me Aneesh!!! I sent you an email!
useful information..
Hi 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.
What do I do now?
kinda cool tutorial.... :D thx alot,.
thanks again, my simple blog becoming more & more sophisticated with your tweaks
Nice Tips, but how if any blogger using "template classic"? maybe you can help me.
only substitute avators show up when I use embedded comments. Real avatars show up when using pop-up comments. Help?
thanks for share, useful information...^_^
Thanks for sharing!
Thanks so much! I've BEEN trying to get this done. I love your site.
This is sooo cool...thanx man..
let me test
Thank you, it's so great. But I'd like to add some border to the avatars, where can I put that?
i am not getting how to use it.....
i have made this blog
http://abhifunworld.blogspot.com
and
http://abhicareer.blogspot.com
Thank you !
Hello, Aneesh, it's me again. Is there a way to change the default Blogger "B" favicon to another one of one's own choosing?
@Glenn - Refer http://www.bloggerplugins.org/2007/07/another-blogger-trick-change-favicon.html
@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.
cool,like it!
If you write the same post for Classic blogger templates (HTML) posted Using FTP it will be more helpful for custom blogger template users.
excellent and very informative.
Hi very useful information, thank you
thanks for information
Thank you very much.
Your 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?
Hello there...
some 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
HI, I'm from Brazil, this tool is very good "Comment Avatars", I'll try to implement.
Nice blog. congratulations!
i didn't find the two lines you mentioned, but i found:
dl 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
Works great - thanks!
One 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.
Hi - I couldn't find an occurrence of
In the custom blogger template I'm using. If you could help me out, it would be greatly appreciated. http://lisabrowndesign.blogspot.com/
good!
Hi - 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!web design
Thank you. It works like a charm!
just checking my openid avatar is shown or not?
how to create register/sign in in my blog?
why when we register to follow, we cant comment use this profile....
love it! it did work for me! thanks! bookmark this site already!
Not working.
I'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?
I love your code and have a link back to here in my blog's footer.
Let me se if it works.
Cool
Thank you very much!!!! I have become crazy to sold this! And i couldn't solve the problem without you! Thank you very much=)
Thankz a lot!
Great information resource! Thanks for sharing!
Thx bro, it's working :D
Works Fine with my Template. Thanks...
Thanks, 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)
I'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.
it's work..!!
Thank you so much.
my avatar shows here but on my blog
Hi!
My 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
Greta post :)
please help me add avatar to recent comments. mail to vietlao2003@gmail.com
yes..!!
this 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
honthakun pektra. thanks
Good
Post a Comment