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?
Thats not possible without php file editing, if i'm not mistaken
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 = "";
}
That's what I want to do except with the new thread button.
Thanks, it works
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
jpang Wrote:Thanks, it works
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")."\";");
}
LeX- Wrote:change that canpostsreplys to canpostthreads
Yeah, I tried that before and it didn't work. It makes both buttons disappear.
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 = "";
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