highlighting author comments

Posted on April 16th, 2011

If a commenter knows the email address of the blog author, she could use the blog owner’s email address in her comment and get her own comment highlighted. Someone could try to discover the blog owner’s email address by trying lots of email addresses until they saw their comments change to a different color.
For highlighting the author comments instead of checking the author’s email address, check their user id to see if it’s the user id of the blog owner. Then perform the following steps:
1. Changing my theme to add an “authcomment” style

.authcomment {
background-color: #B3FFCC !important;
}

2. Editing my comments.php file to add a little code

<li class=”user_id)
$oddcomment = “authcomment”;
echo $oddcomment;
?>” id=”comment…

Now the author will have a distinctive color for my his comments