PDA

View Full Version : Override Users' Style Choice with two styles?


Sampsa
02-25-2014, 11:29 AM
Hello,

I have a forum with three styles users can select: light (1) , dark (2) and mobile (3).

We have one category with two subforums where I would like to have another style with light (4) and dark (5) options.

With Override Users' Style Choice option I can force users to use ONE style (4 or 5) in subforums but is there a way to allow users only to choose from two styles (4 and 5) in subforums and not allow them to use styles 1, 2 and 3?

Thanks!

Lynne
02-25-2014, 04:31 PM
There is no way to do that in default vbulletin. I can't think of an easy way to change this. I suppose to could edit the footer template and manually write the style chooser to only output style 1, 2, 3 in some forums and then only 4 and 5 in other forums. But, then I think you would need a plugin to make sure that in those forums, they have selected one of those styles and I think that will get messy with the style cookie and could end up being bothersome to your users.

edit: actually, maybe just a plugin for those forums where if they had selected style 1 (light), then show them style 4 (light) when in the other forums. Or vice versa for dark. That would probably be the easiest way. Except, you'll have to modify some permissions to allow them to see style 4 or 5. Perhaps another plugin for that?

Sampsa
02-25-2014, 05:48 PM
Thanks Lynne for your reply, that's what I thought after googling, there is no ready solution.

I managed to do a workaround which seem to work. I created a style_fetch plugin with conditionals if styleid = light (1) and forumid = subforum -> styleid = light (4) and same thing with dark style. And another check when returning from subforum back to main forum: if styleid = light (4) and forumid != subforum -> light (1) and same with dark style. Finally I created a simple custom quick theme chooser to each theme :)