PDA

View Full Version : Only Admins and Mods can reply to SPECIFIC threads...


Chris M
07-23-2002, 07:32 PM
How would I make it, so that when a thread gets posted in Public, only want Mods/Admins will to be able to reply?

I will want to sometimes post a Thread in public, but only allow Mods, Super Mods and Admins to reply...

Satan

Logician
07-23-2002, 08:54 PM
in newreply.php find:


$threadid=verifyid("thread",$threadid);


After that you can add:


// Replace X, Y, Z with the threadid you want only Admins/mods can answer
$spec_threads=array(X, Y, Z);


if (in_array($threadid, $spec_threads) AND ($bbuserinfo[usergroupid]!=5 AND $bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=7))
{
show_nopermission(); exit;
}


Not tested but should work..

It is a little awkward because you need to edit your code everytime you need to add a new special thread, but it's the algorithm and you can use it to build a better user interface..

Xenon
07-23-2002, 09:42 PM
there is a much easier method:
just close the thread!

just mods/supermods and admins can reply to closed threads anymore ;)

Chris M
07-24-2002, 02:11 PM
Hmmm...

Thanks Logician:)

@Xenon - I never though of that;)

Though sometimes Mods cant reply to closed threads in forums they dont mod, so thats a little tricky...

Satan

Xenon
07-24-2002, 02:38 PM
yes, and i think this is good as it is ;)
but you can change it also if ya want:
open newreply.php find:
if (!$threadinfo[open]) {
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
eval("standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
exit;
}
}
and replace it with this:if (!$threadinfo[open]) {
if (!ismoderator($threadinfo[forumid],"canopenclose") and $bbuserinfo[usergroupid]!=7) {
eval("standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
exit;
}
}
so every mod can reply in every closed thread ;)

Logician
07-24-2002, 02:59 PM
Originally posted by Xenon
but you can change it also if ya want:

hehe if vb doesnt behave, hack it and it will ;)

himm I should consider this as my new sig lol

Chris M
07-24-2002, 06:32 PM
Lol...

Thanks to you both:)

Satan