Comment Notification and Author Comment Highlighting
I now have some hacks for the comments section - a hack to highlight your comments as the blog author and another to notify your readers when you respond to their comment.
I recently found a hack by Ramani over at Hackosphere. This is a two for one hack. This one really makes sense and is extremely helpful to all concerned.
It is helpful to the person posting a comment on someone else's blog because they will get an email notification when there is a response to that comment by the blog owner. How many times have you written a comment on a blog, and forgot about it or couldn't remember the blog you commented on?
It is helpful for the owner of a blog because many times a response to a comment is lengthy and involves research. Especially for blogs such as mine. Believe it or not, I read all comments and attempt to help all inquires for assistance. For me, it can be very time consuming. When I finally get the answer posted, I know that the person will be notified of my response.
As for the highlighting, it simply makes it easier to find the blog owner's comments in the list.
Read Ramani's instructions. If you need more explanation I'm outlining the steps below with a little more detail for how to:
In your style sheet find this:
.comment-body {and add this:
margin:0;
padding:0 0 0 20px;
}
.comment-body p {
font-size:100%;
margin:0 0 .2em 0;
}
.comment-body-author {This changes the blog owner's comment color and font type. The code in red is where you can change it from bold to normal or italics, and the color from this (which happens to be red) to whatever color you like.
margin:0;
padding:0 0 0 20px;
}
.comment-body-author p {
font-size:100%;
margin:0 0 .2em 0;
color:#CC3300;
text-decoration:bold;
}
Next open you template/edit HTML and check the little box above the editing window that says "Expand Widget Templates". Then look for:
<dl id="comments-block">and replace with this code:
<b:loop var="comment" values="data:post.comments">
<dt class="comment-author" id="'">
<a name="'">
<b:if cond="data:comment.authorUrl">
</b:if></a><a href="data:comment.authorUrl" rel="nofollow"><data:comment.author></data:comment.author></a>
<b:else></b:else>
<data:comment.author></data:comment.author>
</dt></b:loop>
<data:commentpostedbymsg></data:commentpostedbymsg>
<dd class="comment-body">
<b:if cond="data:comment.isDeleted">
<span class="deleted-comment"><data:comment.body>
</data:comment.body></span>
<b:else></b:else>
</b:if><p><data:comment.body></data:comment.body></p>
</dd>
<dd class="comment-footer">
<span class="comment-timestamp">
<a title="comment permalink" href="http://beta.blogger.com/">
<data:comment.timestamp></data:comment.timestamp>
</a>
<b:include name="commentDeleteIcon" data="comment"></b:include>
</span>
</dd>
</dl>
<dl id="comments-block">Now when you open a post page (that is the page that comes up when you click on a post title) you will see a little icon after each post. (Note, it does not show on the page where you actually type the post!) When you click on a person's post that you have responded to, an email will be sent to them saying a response has been posted to their comment. This only works if the commentor has enabled "Show my Email Address" in their 'User Profile'.
<b:loop var="comment" values="data:post.comments">
<dt class="comment-author" id="'">
<a name="'">
<b:if cond="data:comment.authorUrl">
</b:if></a><a href="data:comment.authorUrl" rel="nofollow"><data:comment.author></data:comment.author></a>
<b:else></b:else>
<data:comment.author></data:comment.author>
</dt></b:loop>
said...
<b:if cond="data:comment.author == data:post.author">
<dd class="comment-body-author">
<p><data:comment.body></data:comment.body></p>
</dd>
<b:else></b:else>
<dd class="comment-body">
<b:if cond="data:comment.isDeleted">
<span class="deleted-comment"><data:comment.body>
</data:comment.body></span>
<b:else></b:else>
</b:if><p><data:comment.body></data:comment.body></p>
</dd></b:if>
<dd class="comment-footer">
<span class="'">
<form action="http://www.anniyalogam.com/scripts/notify.php" method="post" target="_blank">
<input value="data:comment.authorUrl" name="profile" type="hidden">
<input value="data:post.author" name="nickname" type="hidden">
<input value="data:post.title" name="post_title" type="hidden">
<input value="data:post.url" name="post_link" type="hidden">
<input src="http://www.anniyalogam.com/1clickbutton.png" type="image">
</form>
</span>
<span class="comment-timestamp">
<a title="comment permalink" href="http://beta.blogger.com/">
<data:comment.timestamp></data:comment.timestamp>
</a>
<b:include name="commentDeleteIcon" data="comment"></b:include>
</span>
</dd>
</dl>
I love this hack! I only wish more bloggers would enable "Show my Email Address"!!!
17 Comments:
Cool hack! Just might give this one a try. Thanks!
It is cool, and I'm about to find out if you have email notification enabled!
And it works!
Well said! I'm fixin to send my readers to your site to see if they get it! I'm like you what is the point of all this if you get lost in the maze.
Wonderful....
@janet, Amen, Sister!
Hi: I had used this hack a long long time ago but then there were technical server problems so I stopped using it. But I missed it and today I did it again. It works on one blog (http://meeyauw-pad.blogspot.com) but not on the other (http://meeyauw.blogspot.com). Do you know of any reason why?
Thank you.
sigh
Please delete my last comment. I put the code in the wrong place. I can't believe I commented before checking, but in my excuse, I haven't been feeling well today. But it is fixed now. Just have to fix the colors. Thank you so much.
@Andree, you don't know how many times that happens to me. Usually on about the 5th time I catch it. duh.
Why is it that you have to change your name to set your post aside? everytime i tried this hack it only work if i put out a new name. is there a way i can make it show my current name rather then my having to come up with a new identity?
Annie, I can't find a piece of code that looks like yours. It might be that my template has been tweaked to death... I don't know. Could you take a look when you find the time please? Also, is there a way to get the comment authors' photos to show up in the embedded comment form?
Thanks! That's really neat.
Thank you very much for this trick. I am going to apply this on my new blogger blog.
I had seen this on a couple blogs and thought it would be great to have. Thanks you you, I do!
Thank's for the code.
Thanks for share, I'll try it in my blog. Is it work to all templates?
A very nice idea to remember what you were commenting on. I think I will try it out.
Thanks for the code Man, nice post ever!