vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Set default theme based on referrer (https://vborg.vbsupport.ru/showthread.php?t=71278)

Neyland 11-02-2004 01:00 PM

Set default theme based on referrer
 
I have many sites that share one central forum. Each site has it's own 'theme'. Is there a way to select the default board theme based on the which site the user is coming from?

memobug 11-02-2004 06:10 PM

How about setting up a .htaccess using mod_rewrite to add a "&styleid=XX" to the URL depending on the referrer

This should get you started:

http://dmr.ath.cx/notes/rewrite.html

Neyland 11-02-2004 07:56 PM

I could kinda follow that.

I sorta mis-spoke. I am developing a site that will have multiple themes based on the genre of the topic. I have not decided whether to make it one site or subdomain it. My forums are subdomained.

If I can bring the VB login information to the site page, I have access to the VB session. I don't want to over ride a member's theme choice. However, if the user is a guest or a generic forum member but not assigned a sub group, I would like to set the styleid based on the site they are coming from.

Thoughts?

memobug 11-02-2004 11:17 PM

Sorry, but you made it sound rather more simple than you actually intend.

It doesn't matter whether you are redirecting to different domains, subdirectories or scripts. mod-rewrite can do that. But, mod_rewrite doesn't know anything about your user's groups or preferred styleid. I think the styleid is both in the user database and bb cookie perhaps redundantly. Anyway, you would need a hack to identify the user, parse and assemble the redirect as necessary. It would have to identify the users to do what you're asking now.

Are the users all in different databases? If they are in the same database, maybe you could use vBAdvanced or something to make the forums more theme oriented.

Regards,

Matt




Regards,

Matt


All times are GMT. The time now is 12:57 PM.

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.01392 seconds
  • Memory Usage 1,712KB
  • 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
  • (4)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