Powered by Blogger.

How to add comment avatars to customized/non-standard Blogger templates

It seems the method for us to use is far simpler than my initial impressions - we need only add two small sections of code to our templates in order for the comment avatars to function.

Here's what to do:

1. Go to Layout>Edit HTML in your Blogger dashboard, and ensure you check the "Expand widget templates" box.

2. Using your browser's search function, locate the following line of code (or similar):

<dl id='comments-block'>
Depending on your particular template, you may discover this is <div id='comments-block'> instead.

3. Replace this line of code with the following:
<dl expr:class='data:post.avatarIndentClass' id='comments-block'>
Note: if your template included div instead of dl, leave this intact and replace all other elements of the line instead.

4. Now, locate this line of code (usually a few lines further down, depending on your particular template):
<a expr:name='data:comment.anchorName'/>
Immediately before this line, paste the following section of code:

<b:if cond='data:comment.favicon'>
<img expr:src='data:comment.favicon' height='35px' style='margin-bottom:-2px;' width='35px'/>
</b:if>
<a expr:name='data:comment.anchorName'/>
<b:if cond='data:blog.enabledCommentProfileImages'>
<data:comment.authorAvatarImage/>
</b:if>


If you use an "author comment highlighting" hack in your template, you will need to search for a second instance of<a expr:name='data:comment.anchorName'/> and paste the code a second time.


5. Finally, save your template.


Now when you view a post page for which comments are enabled, you should see avatars beside the names of respective commenters!

Source :

http://www.bloggerbuster.com/2009/09/profile-avatars-for-blogger-comments.html

Bannerad

Artikel Terpopuler

Tags

Blogumulus by Roy Tanck and Amanda Fazani