I’ve seen it lots of times before, but I just added it to Ariejan.net (and the next release of the iAriejan theme). Sometimes there are lots of comments and it’s nice for visitors to see what the official reaction of the blog author is.
Since I haven’t really looked into a plugin or anything, this is just a very simple theme hack.
You can apply it to your current theme with almost no effort at all.
Open up your comments.php file in your themes directory. And look for the following code:
[php]
What this will do is match the e-mail address of the poster with the e-mail address of the post author. This is in some way spoofable, as users may be able to post a comment with your e-mail address on it.
If you posted the comment an extra CSS class named ‘authorcomment’ is added. So add the following to your style.css file. (You may change this to suit your own taste of course):
[css].authorcomment {
background-color: #363636;
border: 1px solid #969696;
}[/css]
To prevent this you can add your e-mail address (the one you use with your WP account) to Options -> Discussion -> Comment Moderation. This will keep any post that contains your email address back for moderation by you. This is the only fool-proof method I know right now to keep people from spoofing. There might be some other hacks for this, but I haven’t had time to think about that yet.















6 Comments
As you can see here, it works :)
Brilliant! That’s just the sort of thing I’ve been after but always forget to look up. Will it work if I’m logged in as admin or do I have to be entering an email in the section?
Actually, I suppose I’ll just try it & see - thanks :)
Oh PS - I had this page open in another tab & it stopped me from commenting with a 15 second split needed between comments. I really liked that - very swish.
Nice Work for me :)but if some one comment by my email wht should i do?
This code just alternated the color for me instead of doing what I wanted. I changed the code a bit and got it the way I liked using this:
comment_author_email == get_the_author_email() ) echo ‘class=”authorcomment”‘; else echo $oddcomment; ?> id=”comment-”>
A very nice modification though :)
I have visited your site 393-times
Your site found in Google: http://google.com/search?q=sqd