Quote:
Originally Posted by msimplay
i think i would prefer my moderators to act responsibily with the warnings else why have them as moderators
however post the modification am still thinking
ps i love the design on your site 
|
Thanks
ok, in Warn.php find:
PHP Code:
if ($action == "dominus") {
$DB_site->query("UPDATE userfield SET $warnfield=$warnfield-1 WHERE userid='$newuser'");
$error = "<b>Message:</b> You have warned this member!";
$show['closewindow'] = true;
}
Replace With:
PHP Code:
if ($action == "dominus") {
if ($bbuserinfo['usergroupid']==6) {
$DB_site->query("UPDATE " . TABLE_PREFIX . "userfield SET $warnfield=$warnfield-1 WHERE userid='$newuser'");
$error = "<b>Message:</b> You have lowered this members warnings.";
$show['closewindow'] = true;
} else {
$error = "<b>Message:</b> Only Administrators can remove warnings.";
$show['closewindow'] = true;
}
}
Next find:
PHP Code:
if ($action == "doreset") {
$DB_site->query("UPDATE userfield SET $warnfield=0 WHERE userid='$newuser'");
$error = "<b>Message:</b> You have warned this member!";
$show['closewindow'] = true;
}
Replace with:
PHP Code:
if ($action == "doreset") {
if ($bbuserinfo['usergroupid']==6) {
$DB_site->query("UPDATE " . TABLE_PREFIX . "userfield SET $warnfield=0 WHERE userid='$newuser'");
$error = "<b>Message:</b> You have reset this members warnings.";
$show['closewindow'] = true;
} else {
$error = "<b>Message:</b> Only Administrators can reset warnings.";
$show['closewindow'] = true;
}
}
I'm no PHP expert, but I haven't heard that anything's wrong with the code.