This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/hellban/main.php

22 lines
410 B
PHP
Raw Normal View History

<?php
class HellBan extends Extension {
public function onPageRequest(PageRequestEvent $event) {
global $page, $user;
if($user->can("hellbanned")) {
$s = "";
}
else if($user->can("view_hellbanned")) {
2013-09-09 12:47:42 +00:00
$s = "DIV.hb, TR.hb TD {border: 1px solid red !important;}";
}
else {
2013-09-09 12:47:42 +00:00
$s = ".hb {display: none !important;}";
}
if($s) {
2013-09-09 12:47:42 +00:00
$page->add_html_header("<style>$s</style>");
}
}
}
?>