Not Solved How do I hide the new thread button?
#1
Not Solved
I set the permissions so that normal registered users can't post in a certain forum. However, the new thread button is still there even though they can't post. How do I make it so the button is hidden?
Reply
#2
Not Solved
Thats not possible without php file editing, if i'm not mistaken
Reply
#3
Not Solved
Can't post in a certain forum ? That's the New Reply button ?

Open showthread.php
Find
		else
		{
			eval("\$newreply = \"".$templates->get("showthread_newreply")."\";");
		}

Replace by
		else if($forumpermissions['canpostreplys'] != "no")
		{
			eval("\$newreply = \"".$templates->get("showthread_newreply")."\";");
		}
		else
		{
			$newreply = "";
		}
Reply
#4
Not Solved
That's what I want to do except with the new thread button.
Reply
#5
Not Solved
Then add
$newthread = "";

into the code.
Reply
#6
Not Solved
Thanks, it works Smile

But I want to make it so the new thread button is hidden when they can't make new threads.

Sorry about all the questions, but I would also like to do this in the forumdisplay.php, too
Reply
#7
Not Solved
jpang Wrote:Thanks, it works Smile

But I want to make it so the new thread button is hidden when they can't make new threads.

-sighs-

First can't make new posts, hide new thread button =/ , then can't make new threads, hide new thread button ...

change that canpostsreplys to canpostthreads

Open forumdisplay.php
Find
if($foruminfo['type'] == "f" && $foruminfo['open'] != "no")
{
	eval("\$newthread = \"".$templates->get("forumdisplay_newthread")."\";");
}

Change into
if($foruminfo['type'] == "f" && $foruminfo['open'] != "no" && $fpermissions['canpostthreads'] != "no" )
{
	eval("\$newthread = \"".$templates->get("forumdisplay_newthread")."\";");
}
Reply
#8
Not Solved
LeX- Wrote:change that canpostsreplys to canpostthreads

Yeah, I tried that before and it didn't work. It makes both buttons disappear.
Reply
#9
Not Solved
jpang Wrote:
LeX- Wrote:change that canpostsreplys to canpostthreads

Yeah, I tried that before and it didn't work. It makes both buttons disappear.

Probably because you have

$newthread = "";
$newreply = "";

Remove that $newreply = "";
Reply
#10
Not Solved
I tried
		else if($forumpermissions['canpostthreads'] != "no")
		{
			eval("\$newreply = \"".$templates->get("showthread_newreply")."\";");
		}
		else
		{
			$newthread = "";
		}
and
		else if($forumpermissions['canpostthreads'] != "no")
		{
			eval("\$newthread = \"".$templates->get("showthread_newthread")."\";");
		}
		else
		{
			$newthread = "";
		}
They both make both buttons disappear. Changing canpostreplys to canpostthreads makes the new reply button disappear no matter what the permissions are set. I don't want the new reply button to disappear, just the new threads button
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)