Overgrow
04-05-2002, 10:00 PM
This hack should help lessen your moderation load by allowing users to somewhat moderate their own threads. When someone hits newreply to make a post, it checks the original thread poster's ignore list. If the person is on the ignore list, they cannot post in the thread.
Open newreply.php, find:
$bbuserinfo['userid']==$threadinfo['postuserid'])) {
show_nopermission();
}
Under that add:
// HACK: REPLY IGNORE
if ($bbuserinfo['userid']>0 and $bbuserinfo['usergroupid']!=6 and
$bbuserinfo['usergroupid']!=5 and $bbuserinfo['usergroupid']!=45 and $threadinfo['postuserid']>0) {
$firstposter=$DB_site->query_first("SELECT username,ignorelist
FROM user WHERE userid='$threadinfo[postuserid]'");
$ignorelist = explode(' ', $firstposter['ignorelist']);
while ( list($key, $val)=each($ignorelist) ) {
$ignore[$val] = 1;
}
if ($ignore[$bbuserinfo[userid]]) {
eval("standarderror(\"".gettemplate("error_ignoredreply")."\");");
}
}
// END: REPLY IGNORE
Create a new template called "error_ignoredreply":
The original poster of this topic, $firstposter[username], has you on their ignore list. You are unable to reply to the threads they start.
Done!
Open newreply.php, find:
$bbuserinfo['userid']==$threadinfo['postuserid'])) {
show_nopermission();
}
Under that add:
// HACK: REPLY IGNORE
if ($bbuserinfo['userid']>0 and $bbuserinfo['usergroupid']!=6 and
$bbuserinfo['usergroupid']!=5 and $bbuserinfo['usergroupid']!=45 and $threadinfo['postuserid']>0) {
$firstposter=$DB_site->query_first("SELECT username,ignorelist
FROM user WHERE userid='$threadinfo[postuserid]'");
$ignorelist = explode(' ', $firstposter['ignorelist']);
while ( list($key, $val)=each($ignorelist) ) {
$ignore[$val] = 1;
}
if ($ignore[$bbuserinfo[userid]]) {
eval("standarderror(\"".gettemplate("error_ignoredreply")."\");");
}
}
// END: REPLY IGNORE
Create a new template called "error_ignoredreply":
The original poster of this topic, $firstposter[username], has you on their ignore list. You are unable to reply to the threads they start.
Done!