Remove New thread button for certain forum ID?
#1
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
~ FFW

FYI: I'm not a sir, dude, or guy. I am a 'miss'. Rolleyes
Reply
#2
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 !
Reply
#3
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
~ FFW

FYI: I'm not a sir, dude, or guy. I am a 'miss'. Rolleyes
Reply
#4
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.
[Image: sig.php]
The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.
Reply
#5
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?
~ FFW

FYI: I'm not a sir, dude, or guy. I am a 'miss'. Rolleyes
Reply
#6
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;
Reply
#7
Okay all done. I'm gonna see if it works. Smile
~ FFW

FYI: I'm not a sir, dude, or guy. I am a 'miss'. Rolleyes
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)