PDA

View Full Version : Ignore List prevents users from posting in threads


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!

Neo
04-06-2002, 06:49 PM
Hehehe, fun fun. I will install it right now. I thought of a nice add to this either you or I can make. But how about user on ignor list cant read started thread?

Remi
04-06-2002, 07:10 PM
Can't he/she just use the quote butten to reply?

Thanks :D

Recluse
04-07-2002, 04:37 AM
quote uses the newreply.php. so it "should" also stop them from posting, same with quickreply

LouChipher
04-07-2002, 08:33 AM
Can post the Admin/Mod?!

Overgrow
04-08-2002, 12:17 PM
Normally you can't ignore mods/admins right? Anyway, added the check so it won't bother doing it if you're a mod or admin-- just replace the code above again with the edited code in the first post.

neo-- go for it, I don't mind if they read it.

quotes-- agreed, since it also hits newreply, it will be stopped.

Admin
04-08-2002, 12:56 PM
Great, installed here. :)

euangel
02-25-2003, 03:14 AM
Does this hack work under 2.3? I can't find the original text to be replaced in newreply.php.

magnus
04-29-2003, 07:35 PM
Wow, I know this is an oldie.. but can someone PLEASE port this to work on newer versions? I *really* need this. :)

Bison
04-29-2003, 11:45 PM
Give it a try ... just make a backup copy of your newreply.php file before you put the code above in! :)

magnus
04-30-2003, 01:07 PM
Yea, I tried it earlier.. no avail. :(

Koutaru
05-19-2003, 10:00 PM
anyone for 2.3?

Koutaru
06-08-2003, 05:35 AM
Hmm I still can't figure out this code, can someone spend a few minutes and look over it? :(

Cap
07-22-2003, 11:54 AM
I have the same problem. In newreply.php there is no $bbuserinfo found (Vers.2.3).

Cap
07-23-2003, 09:19 AM
.

Takara
08-13-2003, 09:34 PM
wouldn't mind an updated version either.

magnus
10-14-2003, 06:06 PM
One last ditch effort before writing off any hope of this being updated... :(

noonespecial
08-18-2007, 03:46 AM
This would be cool if ever updated.