Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
Multiple domain affect whole site Details »»
Multiple domain affect whole site
Version: 1.00, by xmeltrut xmeltrut is offline
Developer Last Online: May 2008 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 06-05-2005 Last Update: Never Installs: 7
 
No support by the author.

Situation: you have forums.example1.com and boards.example2.com. You want cookies to work on both of them so that it remembers users but you want to set the cookie domain so that it affects all of example1.com or example2.com whichever the user is on.

The problem is that if you set the cookie domain in the admin panel, it will always use that domain even if you are using a second domain that is set-up to work with the forum also.

This quick mod will solve the problem and set the cookie to the full domain so no matter domain you are using it will set the cookie for the whole site (doesn't work with multiple sub-domains such as x.y.example.com yet).

I tested it with vB 3.0.7 but I checked the code for one of my older boards and I am pretty sure it will work fine with 3.0.3 and everything in between.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-06-2005, 10:12 AM
nexialys
Guest
 
Posts: n/a
Default

hum... this is not to share the users db, so there is no problem with the license...

btw, take care, this is only for boards where users have the same login/pass on both sides...

also take care:
Quote:
An owned license grants you the right to run vBulletin on one web server and one web site for each license purchased for an unlimited time. Each license may power one instance of vBulletin on one domain.
Reply With Quote
  #3  
Old 06-08-2005, 12:53 AM
CompuJonathan CompuJonathan is offline
 
Join Date: Nov 2004
Location: Georgia, USA
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for releasing this.

We have two VBulletin licenses and had a hard time getting the cookies to work. But somehow VB support got it going. :ninja:

We will use this when we rebuild the forums in 3.5 :squareeyed:
Reply With Quote
  #4  
Old 07-05-2005, 03:01 PM
jb605 jb605 is offline
 
Join Date: Feb 2004
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It might also be helpful to add IP based cookie:


PHP Code:
  if (preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/',$_SERVER["HTTP_HOST"]))
 {
    
// this is a ip address
    
$vboptions['cookiedomain'] = "." $_SERVER["HTTP_HOST"];

Or something similar
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:34 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05309 seconds
  • Memory Usage 2,221KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete