MyBB Community Forums
Remove New thread button for certain forum ID? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Requests (https://community.mybb.com/forum-65.html)
+---- Thread: Remove New thread button for certain forum ID? (/thread-23951.html)



Remove New thread button for certain forum ID? - FirefoxWiz - 2007-09-12

Hey,

Is there any way to remove the New Thread button only for a certain forum? Like for my requests forum, I need the New Thread button to be gone.
The users can still post requests though by using the theme request plugin. (Modified version of StaffApp. Wink)

Is this possible?

Thanks,
FFW


RE: Remove New thread button for certain forum ID? - LeX- - 2007-09-12

Open forumdisplay.php
Find
if($foruminfo['type'] == "f" && $foruminfo['open'] != "no" && $fpermissions['canpostthreads'] != "no")

Change by
if($foruminfo['type'] == "f" && $foruminfo['open'] != "no" && $fpermissions['canpostthreads'] != "no" && $fid != X)

Open showthread.php
		if($forumpermissions['canpostthreads'] != "no")

Change by
		if($forumpermissions['canpostthreads'] != "no" && $thread['fid'] != X)

Change X by the FID !


RE: Remove New thread button for certain forum ID? - FirefoxWiz - 2007-09-12

Quote:
if($forumpermissions['canpostthreads'] != "no" && $thread['fid'] != X) 
Thanks LeX-, but wouldn't that ^^ mean it would remove the new thread icon if they don't have permission to post threads? I need it to where they do have permission, but no thread button. Wink

I'll try that though, too. Smile


RE: Remove New thread button for certain forum ID? - MrD. - 2007-09-12

The new thread button is already removed if they don't have permission to post threads, LeX- just added an extra condition so that the button only shows if they do have permission to post threads and they are not in forum id X.


RE: Remove New thread button for certain forum ID? - FirefoxWiz - 2007-09-14

Hey, I tried that out and I can't seem to find that phrase in showthread.php Confused Maybe someone could modify it for me, since it won't find it for me?


RE: Remove New thread button for certain forum ID? - LeX- - 2007-09-14

FirefoxWiz Wrote:Hey, I tried that out and I can't seem to find that phrase in showthread.php Confused Maybe someone could modify it for me, since it won't find it for me?

My Bad =P That line is from another modification a user asked a while ago =P

Find
	// If the forum is not open, show closed newreply button unless the user is a moderator of this forum.

Change that whole if($forum['open'] != "no") statement by
	if($forum['open'] != "no")
	{
		// Show the appropriate reply button if this thread is open or closed
		if($thread['closed'] == "yes")
		{
			eval("\$newreply = \"".$templates->get("showthread_newreply_closed")."\";");
		}
		else
		{
			eval("\$newreply = \"".$templates->get("showthread_newreply")."\";");
		}
		if($forumpermissions['canpostthreads'] != "no" && $thread['fid'] != x)
		{
			eval("\$newthread = \"".$templates->get("showthread_newthread")."\";");
		}
		else
		{
			$newthread = "";
		}
	}

Replace x with the fid;


RE: Remove New thread button for certain forum ID? - FirefoxWiz - 2007-09-15

Okay all done. I'm gonna see if it works. Smile