Ok, how to hide the quick reply box when a user is reply-banned:
In
showthread.php find:
Code:
if (($bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) {
Right BEFORE that, INSERT:
Code:
$threadban=$DB_site->query_first("SELECT COUNT(DISTINCT banid) AS activeban
FROM bans
WHERE userid=$bbuserinfo[userid] AND threadid=$threadid AND active=1
");
Next, find:
Code:
} else {
$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
}
and right BEFORE that, INSERT:
Code:
} elseif ($threadban[activeban]!=0) {
$replybox='';
That's it. And for the query freaks: yes it DOES add a query.