forked from Cavemanon/cavepaintings
add 'hellbanned' user class, with support from the comments extension
This commit is contained in:
21
ext/hellban/main.php
Normal file
21
ext/hellban/main.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
class HellBan extends Extension {
|
||||
public function onPageRequest(PageRequestEvent $event) {
|
||||
global $page, $user;
|
||||
|
||||
if($user->can("hellbanned")) {
|
||||
$s = "";
|
||||
}
|
||||
else if($user->can("view_hellbanned")) {
|
||||
$s = "border: 1px solid red !important;";
|
||||
}
|
||||
else {
|
||||
$s = "display: none !important;";
|
||||
}
|
||||
|
||||
if($s) {
|
||||
$page->add_html_header("<style>.hb { $s }</style>");
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user