vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Override Users' Style Choice with two styles? (https://vborg.vbsupport.ru/showthread.php?t=308867)

Sampsa 02-25-2014 11:29 AM

Override Users' Style Choice with two styles?
 
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 :)


All times are GMT. The time now is 10:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01100 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete