MyBB Community Forums

Full Version: Hide theme's template for a certain usergroup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to block certain usergroups from displaying a template of a theme? 
I have to hide postbit_groupimage and member_profile_groupimage templates in my default theme so that guests and registered users wouldn't be able to see them (groups 1 and 2). 

I've explained it all in another thread http://community.mybb.com/thread-171855.html

I solved it myself with Theme Conditionals:


<if !in_array($mybb->user['usergroup'], array(1,2)) then>
{$post['groupimage']}
</if>
(2015-06-13, 08:23 PM)Vioner Wrote: [ -> ]Is it possible to block certain usergroups from displaying a template of a theme? 
I have to hide postbit_groupimage and member_profile_groupimage templates in my default theme so that guests and registered users wouldn't be able to see them (groups 1 and 2). 

I've explained it all in another thread http://community.mybb.com/thread-171855.html

I solved it myself with Theme Conditionals:


<if !in_array($mybb->user['usergroup'], array(1,2)) then>
{$post['groupimage']}
</if>

What do you mean hide them templates lol? Users can't access your template the only way they can access it, would be through ACP.. Also where have you placed that template code or whatever and what does it do? :s
Don't be silly -.- I meant the content of the template... Jesus...