MyBB Community Forums

Full Version: Allow selective groups to post even if thread is locked
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
You may noticed that if you lock a thread, only admins and mods are able to post in those threads. All other usergroups will receive an error while creating a post through quick replies / new replies. If you want to allow selective usergroups to post in those locked threads, then here is how Wink

Open ./showthread.php and find; (around line # 1025)
if($forumpermissions['canpostreplys'] != 0 && $mybb->user['suspendposting'] != 1 && ($thread['closed'] != 1 || is_moderator($fid)) && $mybb->settings['quickreply'] != 0 && $mybb->user['showquickreply'] != '0' && $forum['open'] != 0)
and change it to;
if($forumpermissions['canpostreplys'] != 0 && $mybb->user['suspendposting'] != 1 && ($thread['closed'] != 1 || is_moderator($fid)) && $mybb->settings['quickreply'] != 0 && $mybb->user['showquickreply'] != '0' && $forum['open'] != 0 || in_array($mybb->user['usergroup'], array(2,4,8)))

save the file.

Now open ./newreply.php and find; (around line # 161)
if($thread['closed'] == 1)

and change it to;
if($thread['closed'] == 1 && !in_array($mybb->user['usergroup'], array(2,4,8)))

save the file.

Now change the number 2,4,8 to your desired usergroup IDs you wish to show and allow them to post quick replies / new replies even if the thread is locked Wink
Thanks for this, I've always wanted to allow certain users this possibility.

+rep
Thanks. Wink
Nice Big Grin
The problem with this modification is that you'd have to keep on replacing it whenever you upgrade your forum. Something like this could easily be made a plugin than a core edit.
(2011-02-14, 03:22 PM)Shukaku Wrote: [ -> ]The problem with this modification is that you'd have to keep on replacing it whenever you upgrade your forum. Something like this could easily be made a plugin than a core edit.

It must require a core edit. There is not any other easy method then this I believe. If you are upgrading your forum then editing two lines is not a big deal.
Rolleyes