From 6abf65c062c35253e11f0ce22625facfef912d1a Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 3 Oct 2012 21:28:29 +0100 Subject: [PATCH] option for making samefags public --- ext/comment/main.php | 2 ++ ext/comment/theme.php | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ext/comment/main.php b/ext/comment/main.php index 242abcc8..f9cdac35 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -243,6 +243,8 @@ class CommentList extends Extension { $sb->add_label("
Show "); $sb->add_int_option("comment_list_count"); $sb->add_label(" comments per image on the list"); + $sb->add_label("
Make samefags public "); + $sb->add_bool_option("comment_samefags_public"); $event->panel->add_block($sb); } diff --git a/ext/comment/theme.php b/ext/comment/theme.php index 548ab10a..4fa676c9 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -187,11 +187,12 @@ class CommentListTheme extends Themelet { $anoncode2 = ""; if($this->show_anon_id) { $anoncode = ''.$this->anon_id.''; - if($user->can("view_ip")) { + if(!array_key_exists($comment->poster_ip, $this->anon_map)) { + $this->anon_map[$comment->poster_ip] = $this->anon_id; + } + #if($user->can("view_ip")) { #$style = " style='color: ".$this->get_anon_colour($comment->poster_ip).";'"; - if(!array_key_exists($comment->poster_ip, $this->anon_map)) { - $this->anon_map[$comment->poster_ip] = $this->anon_id; - } + if($user->can("view_ip") || $config->get_bool("comment_samefags_public", false)) { if($this->anon_map[$comment->poster_ip] != $this->anon_id) { $anoncode2 = '('.$this->anon_map[$comment->poster_ip].')'; }