Depending on your site layout you might need
to change the cookies settings within vBulletin. This page will guide
you to the settings you'll have to make. Note: A misconfigured site may disable login, tread carefully.
Example layouts
Below are a couple of examples of site layouts:
Layout 1
vBulletin location
vbDrupal location
http://example.org/forum/drupal
No changed will have to be made, this set up should work out of the box.
Layout 2
vBulletin location
vbDrupal location
This
setup is similar to the vbdrupal.org setup. For this to work properly
you may need to change the cookie path setting. The cookie path must be
'/'. The cookie domain doesn't need to be adjusted.
Layout 3
vBulletin location
vbDrupal location
In
this case the forum and drupal run on different hostname. Mostlikely
you will have to adjust the cookie domain value. In this case the value
must be .example.org (note the leading dot). You may also need to
adjust the cookie path, it must be '/'.
Layout 4
vBulletin location
vbDrupal location
Both
sites are on different domains, this set up is not allowed. The cookies
can not be shared between different domains, only between sub-domains.
How to change these settings
The
cookie settings can be found in the vBulletin admin control panel. It's
one of the various settings you can change from the 'vBulletin Options' page under the 'Cookies and HTTP Header Options' sub heading.
Concerns with changing cookies settings
When
you change cookie settings (path or domain) you need to invalidate the
old cookies before everything will work. After you change the cookie
settings you will most likely not be able to log out through vBulletin.
This is because the cookie settings send to the browser do not match
the currently stored cookies.
There are a
couple of ways to kill these stale cookies. On way is to remove the
cookies from your browser. This option might not be available to all
browsers.
Another way is to wait until the cookies have been expired. However this could take a long while.
The
best way would be to user a cookie kill script that removed the stale
cookies based on the old settings. A script like this is available from the vbDrupal CVS.
You will have to edit that script to reflect the old settings and let
users visit the script in one way or the other. One way would be simply
to point the users to that script through a link. A nicer, and
transparent method, would be to include this script in vBulletin. When
users visit vBulletin again their old cookies will be automatically
killed. A method to include this script in vBulletin would be to place
it in the includes directory of vBulletin and add the following line to
the config.php file:
@include_once('includes/kill_stale_cookies.php');
Note: if you screw up the configuration you might not be able to log in while this script is still being included.
Originally published at vbdrupal.org, used with permission.