MyBB Community Forums

Full Version: Theme based on user group
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This might be pushing the limits of MyBB but I dont' know Smile

For non-admin activated users, I want them to see one theme (the navigation bar will, for example, include a Buy Now link).

For activated users, I want them to see another theme (different navigation links available to them).

Is this a configuration I could set up somehow to force different themes based on user group membership?
Its doable if its between admins, users or guests but other than that you'll need a plugin. You could try the conditionals in templates plugin or request a plugin specific for this.
Ok, I won't approach it that way then.

In my own site, I check if the person is a subscribing member by looking at the PHP $s->user->isLoggedIn().

I guess I could also call that PHP method from within MyBB's templates if I include my initialisation file?
You could try, it might work as long as it doesn't conflict with MyBB's functions/variables.
(2011-01-08, 11:13 AM)- G33K - Wrote: [ -> ]You could try, it might work as long as it doesn't conflict with MyBB's functions/variables.

Ok, I'm just asking for trouble including my own scripts.

I went back to your original suggestion. I installed the PHP in Templates plugin. Now this following works for me:

<if $mybb->user['usergroup'] == 1 or $mybb->user['usergroup'] == 5 then> 
You're either not logged in, or awaiting activation.
<else>
You're logged in, and you're not awaiting activation.
</if>