Content feed Comments Feed
ADVERTISEMENTS

If you want to display your own comments, with a different background or text color or in any other customized way, then here's a simple hack for doing that.
After doing the coding work, all the comments made by you on your blog will get highlighted.This is done to differentiate the comments of author and the readers and now you will be desperate to how to implement in your blog.



Login to your Dashboard > Layout > Edit Html.

Check the Expand Widget Templates Check Box.

Copy and paste the code as shown below, before the closing ]]></b:skin>

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

Change the line
background: #ffffff;
with
background: url(http://DIRECT_LINK_OF_THE_IMAGE.jpg) ;
If you want to show any background image in place of white color.

Next, search for the following lines of 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>
<data:commentPostedByMsg/>
</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>

You have to add Red codes in your html in the way i have shown above between the codes.
And then save your template. I hope you will be able to do it.

* You have to login into your blogger account before to give comments. Take a look at the Below Comments.

Your Ad Here

0 comments

Post a Comment

Blogumulus by Wonderful-Tricks

Followers