How to Highlight Author Comments in Blogger – Comment with Style

Posted in Blogging

author-comment-man speaking-loudspeaker-president-Speech This trick is to give a Highlight Author Comment . This will make the blog’s owner comments looks different from the visitors comments. It’s very usefull and interesting blogger hack tips. You can see the example in my blog. Here is what to do to make a "Highlight Author Comment" effect in Blogspot.

1. Login to blogger, then choose "Layout –> Edit HTML". Don’t forget to backup your template first.
2. Check the "Expand Widget Templates" box.
3. Copy this script and put it before ]]></b:skin> or copy to your CSS area.

.comment-body-author {
background: #E6E6E6; /* Background color*/
color: #000; /* Text color*/
border-top: 1px dotted #223344;border-bottom: 1px dotted #223344;border-left: 1px dotted #223344;border-right: 1px dotted #223344;
margin:0;
padding:0 0 0 20px; /* Position*/
}

4. Then find this code:

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

<b:if cond=’data:comment.author == data:post.author’>
<dd class=’comment-body-author’>
<p><data:comment.body/></p>
</dd>
<b:else/>

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

</b:if>


<dd class=’comment-footer’>
<span class=’comment-timestamp’>
<a expr:href=’"#comment-" + data:

comment.id‘ title=’comment permalink’>
<data:comment.timestamp/>
</a>
<b:include data=’comment’ name=’commentDeleteIcon’/>
</span>
</dd>
</b:loop>
</dl>

5. The red color text is the code that you have to add to your script. The position must be right.
6. And then save your template.

 How to Highlight Author Comments in Blogger – Comment with Style
* You have to login into your blogger account before to give comments. Take a look at the Below Comments.
 How to Highlight Author Comments in Blogger – Comment with Style

Also Read : How to Show Related Posts / Articles in Blogger.

Sign Up to Get More Updates :

Related Posts

9 Responses to “How to Highlight Author Comments in Blogger – Comment with Style”

Debajyoti Das :

SO When I Post a Comment It Gets Highlighted. Now you Can Change Colors etc in the CSS part

p@r@noid :

nice one dude.!!!

will be helpful..!!

Anonymous :

Thanks!

indungg :

nice hack,..may i translate this article??
success!

Bata :

Great! Thanks a lot!

phattrienso :

i like your archives, can i translate to my language and post it in my blog at http://phattrienso.tk?

Debajyoti Das :

@ Phattrienso – Of Course, just make sure you Link your Translated article back to my blog…

Nessa :

Thanks for the tips. Works nicely for me, I like it! :D

Yodz Insigne :

I tried it but i’m having this error
“Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Open quote is expected for attribute “{1}” associated with an element type “cond”.”
HERE’S THE SNAPSHOT OF THE CODE:


THANKS, Hope you can help me out.

Leave a Reply