Friday, August 21, 2009

How Highlight Author Comments In Blogger

You might have Seen highlighted author or admin comments in many popular WordPress powered websites. but how to get the same effect in blogger? yeah that can be done! :) Lets get on with the tutorial straightaway.

As usual login into your Blogger Dashboard > Layout > Edit HTML and check the "Expand Widget Templates" option.

Important Step: Now as a precautionary measure please download your template so that you have an emergency backup if in case you create any errors :)

First locate this code in your blogger template.

And copy the following code and paste it above ]]></b:skin> tag

.author-comments {
background: #ffffff;
border: 2px solid #666666;
padding: 5px;

Now you have to go to the comment section of your blog. Please note the code may vary for each template so try to find a similar code.

<dl id='comments-block'>
<b:loop values='data:post.comments' var='comment'>
<dt class='comment-author' expr:id='"comment-"'>
<a expr:name='"comment-"'/>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl' rel='nofollow'><></a>

<b:if cond=' =='>
<dd class='comment-body-author'>

<dd class='comment-body'>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>


<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='"#comment-" data:' title='comment permalink'>
<b:include data='comment' name='commentDeleteIcon'/>

Now you will have to add the bold text part into the comment code in your blogger template. I repeat, be careful, you wont find the exact codes. But you will have few tags here and there.After this is done paste the bold text in the above code segment.

Now how to style the comment part.
1. background: #ffffff; can be replaced by background: url(http://link_of_your_image.jpg) ;
2. change the border by setting it as higher value if you need a thicker border or make it as 0px if you don't need it. ( border: 2px solid #666666; )
3. If you are smart enough use the img attributes and add a gravatar like the one I'm using here.

Feel free to ask me in case of any doubts.
Stumble Delicious Technorati Twitter Facebook
If you enjoyed this post, make sure you subscribe as an Reader!


Post a Comment

← Newer Post Older Post → Home

Recent Posts

Recent Comments

Follow Me - Advertise your site at! Submit your site and get tons of traffic! - Advertise your site at! Submit your site and get tons of traffic!