From a9ec9b6b7065457457ce9dad7b0869cd18fbbcaf Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 6 Feb 2012 14:42:38 +0000 Subject: [PATCH] comment info box --- ext/comment/theme.php | 32 ++++++++++++++++++-------------- themes/default/style.css | 5 ++--- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/ext/comment/theme.php b/ext/comment/theme.php index 08976d9d..c0f8ca0b 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -157,33 +157,37 @@ class CommentListTheme extends Themelet { } $stripped_nonl = str_replace("\n", "\\n", substr($tfe->stripped, 0, 50)); $stripped_nonl = str_replace("\r", "\\r", $stripped_nonl); - $h_dellink = $user->is_admin() ? - '
('.$h_poster_ip.', '.$h_timestamp.', Del)' : ''; if($trim) { return ' '.$h_userlink.': '.$h_comment.' >>> - '.$h_dellink.' '; } else { - //$avatar = ""; - //if(!empty($comment->owner->email)) { - // $hash = md5(strtolower($comment->owner->email)); - // $avatar = "
"; - //} + $avatar = ""; + if(!empty($comment->owner_email)) { + $hash = md5(strtolower($comment->owner_email)); + $avatar = "
"; + } + $a = $user->is_admin(); + $h_reply = " - Reply"; + $h_ip = $a ? "
$h_poster_ip" : ""; + $h_del = $a ? + ' - Del' : ''; return '
- - '.$h_userlink.': '.$h_comment.' - '.$h_dellink.' +
+ '.$avatar.' + '.$h_timestamp.$h_reply.$h_ip.$h_del.' +
+ '.$h_userlink.': '.$h_comment.'
'; } + return ""; } protected function build_postbox($image_id) { @@ -197,7 +201,7 @@ class CommentListTheme extends Themelet { '.make_form(make_link("comment/add")).' - + '.$captcha.'
diff --git a/themes/default/style.css b/themes/default/style.css index db384169..1b2c7355 100644 --- a/themes/default/style.css +++ b/themes/default/style.css @@ -128,9 +128,8 @@ UL { .comment { text-align: left; } -.comment .timeago { - float: right; - font-size: 75%; +.comment .info { + display: none; } .more:after {