MyBB Community Forums

Full Version: Hide new thread button from everybody but Administrator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello MyBB Community,

I have a question for you.

I'm using MyBB for making a structurised portfolio.
This means that nobody is supposed to be able to create threads and is only able to reply to the ones i create (if they ever will). I configured that in the general settings and registred users will not be able to create threads. However the button is still there and it refers to them registring. To prevent confusion and frustration for visitors i want to make the thread creation button available to administrators only.

Any idea on how i can do this would be appreciated.

Kind regards,
Thomas de Meijer
forumdisplay_threadlist template has {$newthread} code twice (at the top & at the bottom)
you can use template conditionals plugin to hide {$newthread} code for the other groups users

Sorry but this doesn't seem to be the solution.
I've tried implementing the plugin combined with the code you delivered but for any kind of account the entire threadlist dissapears.

Any other suggestions?
Just activate that PHP conditionals plugin which ranjani said and in forumdisplay_threadlist replace both {$newthread} with this code :

<if in_array($GLOBALS['users']['usergroup'], array(4)) then>
{$newthread}
</if>

So that'd only show that button to Administrators usergroup.
Thanks.
It works like it's supposed to do now.
However, if the normal users have permission to post threads, even if you hide the new thread button, they could still post by accessing the URL directly.
(2012-01-26, 09:51 AM)jard0n5 Wrote: [ -> ]However, if the normal users have permission to post threads, even if you hide the new thread button, they could still post by accessing the URL directly.

(2012-01-25, 09:42 AM)Thomachine Wrote: [ -> ]Hello MyBB Community,

I have a question for you.

I configured that in the general settings and registred users will not be able to create threads. However the button is still there and it refers to them registring. To prevent confusion and frustration for visitors i want to make the thread creation button available to administrators only.