diff --git a/core/sys_config.inc.php b/core/sys_config.inc.php index c70acb93..2a3f302e 100644 --- a/core/sys_config.inc.php +++ b/core/sys_config.inc.php @@ -36,7 +36,7 @@ _d("WH_SPLITS", 1); // int how many levels of subfolders to put in _d("VERSION", 'trunk'); // string shimmie version _d("TIMEZONE", null); // string timezone _d("MIN_FREE_SPACE",100*1024*1024); // int disable uploading if there's less than MIN_FREE_SPACE bytes free space -_d("CORE_EXTS", "bbcode,user,mail,upload,image,view,handle_pixel,ext_manager,setup,upgrade,handle_404,comment,tag_list,index,tag_edit,alias_editor"); // extensions to always enable +_d("CORE_EXTS", "bbcode,user,mail,upload,image,view,handle_pixel,ext_manager,setup,upgrade,handle_404,comment,tag_list,index,tag_edit,alias_editor,hellban"); // extensions to always enable _d("EXTRA_EXTS", ""); // optional extra extensions diff --git a/core/userclass.class.php b/core/userclass.class.php index c9368d83..a8bec4e5 100644 --- a/core/userclass.class.php +++ b/core/userclass.class.php @@ -99,6 +99,9 @@ new UserClass("base", null, array( "edit_other_vote" => False, "view_sysinfo" => False, + "hellbanned" => False, + "view_hellbanned" => False, + "protected" => False, # only admins can modify protected users (stops a moderator changing an admin's password) )); @@ -152,8 +155,13 @@ new UserClass("admin", "base", array( "bulk_edit_vote" => True, "edit_other_vote" => True, "view_sysinfo" => True, + "view_hellbanned" => True, "protected" => True, )); +new UserClass("hellbanned", "user", array( + "hellbanned" => True, +)); + @include_once "data/config/user-classes.conf.php"; ?> diff --git a/ext/comment/main.php b/ext/comment/main.php index 3fc24124..1cc05c2a 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -42,6 +42,7 @@ class Comment { $this->owner_id = $row['user_id']; $this->owner_name = $row['user_name']; $this->owner_email = $row['user_email']; // deprecated + $this->owner_class = $row['user_class']; $this->comment = $row['comment']; $this->comment_id = $row['comment_id']; $this->image_id = $row['image_id']; @@ -335,7 +336,7 @@ class CommentList extends Extension { global $database; $rows = $database->get_all(" SELECT - users.id as user_id, users.name as user_name, users.email as user_email, + users.id as user_id, users.name as user_name, users.email as user_email, users.class as user_class, comments.comment as comment, comments.id as comment_id, comments.image_id as image_id, comments.owner_ip as poster_ip, comments.posted as posted @@ -356,7 +357,7 @@ class CommentList extends Extension { global $database; $rows = $database->get_all(" SELECT - users.id as user_id, users.name as user_name, users.email as user_email, + users.id as user_id, users.name as user_name, users.email as user_email, users.class as user_class, comments.comment as comment, comments.id as comment_id, comments.image_id as image_id, comments.owner_ip as poster_ip, comments.posted as posted @@ -379,7 +380,7 @@ class CommentList extends Extension { $i_image_id = int_escape($image_id); $rows = $database->get_all(" SELECT - users.id as user_id, users.name as user_name, users.email as user_email, + users.id as user_id, users.name as user_name, users.email as user_email, users.class as user_class, comments.comment as comment, comments.id as comment_id, comments.image_id as image_id, comments.owner_ip as poster_ip, comments.posted as posted diff --git a/ext/comment/theme.php b/ext/comment/theme.php index 5bcc1fc6..ba4d12b4 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -242,13 +242,14 @@ class CommentListTheme extends Themelet { $stripped_nonl = str_replace("\n", "\\n", substr($tfe->stripped, 0, 50)); $stripped_nonl = str_replace("\r", "\\r", $stripped_nonl); + $hb = ($comment->owner_class == "hellbanned" ? "hb" : ""); if($trim) { - return ' -