MyBB Community Forums

Full Version: Prevent admin post in locked topic
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How would I go about preventing mods and admins from posting in topics that have been locked?
Open newreply.php

Find
if(is_moderator($fid, "caneditposts") != "yes")
{
	if($thread['closed'] == "yes")
	{
		error($lang->redirect_threadclosed);
	}
}
replace with
if($thread['closed'] == "yes")
	{
		error($lang->redirect_threadclosed);
	}


now open showthread.php

find
// Show the appropriate reply button if this thread is open or closed
		if($thread['closed'] == "yes")
replace with
// Show the appropriate reply button if this thread is open or closed
		if($thread['closed'] == "yes" && $ismod == true)

ALso find

	if($forumpermissions['canpostreplys'] != "no" && ($thread['closed'] != "yes" || is_moderator($fid) == "yes") && $mybb->settings['quickreply'] != "off" && $mybb->user['showquickreply'] != "no" && $forum['open'] != "no")
replace with
	if($forumpermissions['canpostreplys'] != "no" && $thread['closed'] != "yes" && $mybb->settings['quickreply'] != "off" && $mybb->user['showquickreply'] != "no" && $forum['open'] != "no")


regards
Thanks Zaher. That's a lot of changes... think I'll try turning that into a plugin Smile
What's the use in that if the mod/admin can open the thread, post a reply, then lock the thread? Rolleyes
Quote:What's the use in that if the mod/admin can open the thread, post a reply, then lock the thread?

NOT MY FAULTToungue Rolleyes Toungue i did what was requestedToungue

but good point Toungue i thought about it