diff --git a/comment.tpl.php b/comment.tpl.php
index 974638b8d027b770a3e64e61ca3bc21e7f37c210..c6cf21b84c847b2b27ccc73c9a44ea5c27c25df3 100644
--- a/comment.tpl.php
+++ b/comment.tpl.php
@@ -1,8 +1,8 @@
-
diff --git a/style.css b/style.css
index 47bf9d11f22ec4f54ed4ce62b016433730d19b4e..f094f940be664095b0b31d2b65f41850d169cbd7 100644
--- a/style.css
+++ b/style.css
@@ -497,6 +497,11 @@ div.error {
background: #EBF2F8;
}
+.comment-by-author {
+ background: none;
+ border: 1px solid #EBF2F8;
+}
+
.comment h3.title, .comment h3.title a {
font-size: 122%;
color: #2266AB;
diff --git a/template.php b/template.php
index 2e0f855fe03616c881c0f3ccb64f61c70d9f0e67..1ab04fdf2f2c54824ec1fda47f9acd471fef7cab 100644
--- a/template.php
+++ b/template.php
@@ -184,6 +184,25 @@ function _phptemplate_variables($hook, $vars = array()) {
// if the author of this comment is equal to the author of the node, we set a variable
// then in our theme we can theme this comment differently to stand out
$vars['author_comment'] = $vars['comment']->uid == $node->uid ? TRUE : FALSE;
+
+ $comment_classes = array('comment');
+ if ($vars['comment']->status == COMMENT_NOT_PUBLISHED) {
+ $comment_classes[] = 'comment-unpublished';
+ }
+ if ($vars['author_comment']) {
+ $comment_classes[] = 'comment-by-author';
+ }
+ if ($vars['comment']->uid == 0) {
+ $comment_classes[] = 'comment-by-anon';
+ }
+ $vars['comment_classes'] = implode(' ', $comment_classes);
+
+
+ // if comment subjects are disabled, don't display 'em
+ if (variable_get('comment_subject_field', 1) == 0) {
+ $vars['title'] = '';
+ }
+
break;
}