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

24 lines
542 B
PHP
Raw Normal View History

2021-12-14 18:32:47 +00:00
<?php
declare(strict_types=1);
class HellBan extends Extension
{
public function onPageRequest(PageRequestEvent $event)
{
global $page, $user;
2019-07-09 14:10:21 +00:00
if ($user->can(Permissions::HELLBANNED)) {
$s = "";
2019-07-09 14:10:21 +00:00
} elseif ($user->can(Permissions::VIEW_HELLBANNED)) {
$s = "DIV.hb, TR.hb TD {border: 1px solid red !important;}";
} else {
$s = ".hb {display: none !important;}";
}
if ($s) {
$page->add_html_header("<style>$s</style>");
}
}
}