Installing vbDrupal

Installation instructions for vbDrupal NG are included with the distribution, open the file called README.html. Alternatively you can read the instructions online.

Installation instructions for the old vbDrupal 4.6 can be found here

Cookie path and domain

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.

Example layouts

Below are a couple of example site layouts:

Layout 1

vBulletin location
http://example.org/forum
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
http://example.org/forum
vbDrupal location
http://example.org/

This setup is similar to the vbdrupal.org setup. For this to work properly you might need to change the cookie path setting. The cookie path must /. The cookie domain doesn't need to be adjusted

Layout 3

vBulletin location
http://forum.example.org/
vbDrupal location
http://example.org/

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 might also need to adjust the cookie path, it must be /.

Layout 4

vBulletin location
http://example.com/
vbDrupal location
http://example.org/

Completely different domains. This setup prevents sharing of cookies, thus single sign-on is not available.

Starting from vbDrupal 5.2.1 it is possible to use a setup like this. To enable cross domain authentication you will need to add a configuration directive to the settings.php. See the settings.php or default.settings.php file for further instructions. There are a few limitations to this setup:

  • Only works on browsers with cookies enabled
  • No single sign-on
  • You can not use the login form on the vBulletin navbar; either use a different Drupal theme or change the vBulletin navbar.

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.

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 mostlikely 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.

Installing vbDrupal 5.x

Installation

As an example we use the following system layout:

vBulletin installation path
/websites/forum.example.org/public_html
vBulletin web location
http://forum.example.org
vbDrupal installation path
/websites/www.example.org/public_html
vbDrupal web location
http://www.example.org

Important note: it's best to always make a backup of your existing database before you continue.

Important note #2: depending on your setup you should make sure the vBulletin cookies are accessable by vbDrupal. So make sure the cookie domain and path are set correctly. If they are not set correctly you will not be able to complete the installation and users will not be able to log in. Also note that the old cookies must be deleted before you can succesfully continue. More information about this can be found here.

Step 1: Disable vBulletin

Disable vBulletin through the admincp. Only administrators will be able to log in. This is to prevent various errors users might trigger while the vbDrupal is being installed. It also disables vbDrupal being loaded from within vBulletin, this is required in order to perform various upgrade steps.

Step 2: Copy the files

Copy the files from the drupal directory to your desidered location.

You do not need to install drupal in a subdirectory of the forum, you can install it everywhere you like, even on a different hostname.

Note: vbDrupal requires access to the vBulletin database and it's files.

Step 3: vbDrupal system configuration

Copy the file sites/default/default.settings.php to sites/default/settings.php and make the file world writable.

Alternatively you can put

Then rename the file .htaccess_new to .htaccess. If you have a similar setup as our example setup you don't need to change a thing. If you install vbDrupal in a subdirectory you should edit the file and change the line #RewriteBase /drupal to point to the proper location (note: also remove the # prefix).

You might want to enable an option in your system to show hidden files to see the .htaccess_new file.

Step 4: Drupal installation

Next you should visit the location where you copied the vbDrupal files to and open the install.php script.

In our example case this would be http://www.example.org/install.php.

On opening vbDrupal you might be prompted to enter the path to vBulletin. Simply enter the absolute path to vBulletin and press Save configuration. If the path is correct the installation will continue.

Step 5: User synchronization

The last step requires the synchronization of the user records between vBulletin and vbDrupal.

The previous step should automatically direct you to the user synchronization script. If this is not the case simply visit the location http://www.example.org/install.php?syncusers=true.

Follow the on sceen instructions and wait.

Depending on the size of the forum this step could take a few seconds up to several minutes.

Without user synchronization the users will not be able to show up as logged in on the vbDrupal pages until they logged in on the forum.

Step 6: .htaccess

As a safe guard the .htaccess file has been named .htaccess_new. If you are using an Apache webserver you should rename the file .htaccess_new to .htaccess.

You may need to edit the contents of this file to update the RewriteBase directive if vbDrupal is installed in a sub-directory.

The .htaccess file plays an important part in the clean url feature of vbDrupal.

Step 7: Done

Now vbDrupal should be in a working state.

Do not forget to enable vBulletin again so your visitors will be able to log in.

Also remember to delete any .tmp files you might have created during the installation.

Upgrading to vbDrupal 5.x

Update

Updating your installation of vbDrupal is identical to updating a normal Drupal installation.

After copying the new files, simply op the vbDrupal update script: update.php, and follow the on screen instructions.

It is adviced to turn off vBulletin and vbDrupal during updating.

Upgrading from a previous vbDrupal generation

vbDrupal 4.7

You can simply copy the new files and run the update script.

However, you will need to clean up some of the old 4.7 files and replace all your 3rd party modules and themes with 5.x versions.

As of vbDrupal 5 all stock modules will have their own directory in the modules directory. It is adviced to simply remove all the 4.7 stock modules and directories.

Below is a list of all the files in the modules directory that you should remove.

aggregator.module
archive.module
block.module
blog.module
blogapi.module
book.module
comment.module
comment_vb.install
comment_vb.module
contact.module
drupal.module
filter.module
help.module
legacy.module
locale.module
menu.module
node.module
page.module
path.module
ping.module
poll.module
profile.module
search.module
statistics.module
story.module
system.module
taxonomy.module
throttle.module
tracker.module
upload.module
user.module
vbBirthdays.module
vbcore\vbcore.install
vbcore\vbcore.module
vbcore\vbforumblocks.install
vbcore\vbforumblocks.module
vbcore\vbnode.module
vbcore\vbpm.module
vbcore\vbpolls.install
vbcore\vbpolls.module
vblist\vblist.install
vblist\vblist.module
watchdog.module

vbDrupal 4.6

Updating from this release is not supported. You should first upgrade to the lastest 4.7 release before upgrading to the 5.x releases. Sorry about that.

Warning: mkdir(files): Permission denied

When I visit the Settings page I get the following error:

warning: mkdir(files): Permission denied in /.../includes/file.inc on line 91.
The directory files does not exist. 

Drupal uses a single directory for the storage of various files (for example attachments to content). When you visit the settings page it will check if the file directory exists and tries to create it when it doesn't exist.

However if the webserver doesn't have write permission (and it shouldn't) in the directory where the file directory will be created you'll get an error. In order to fix this first think about the name of the directory you want to use. By default Drupal uses the name "files".

When you've decided on the name create a directory with that name in the Drupal base directory and give the world ("Other" in most programs) read, write and execute permissions.

If you decided to use a different name for the files directory change the value of "File system path" under "File system settings" on the settings page and press "Save configuration"

Installing vbDrupal 4.6

Installation:

1.  Download the latest version of vbDrupal.

2. Edit the file forum/drupal/sites/default/config.php_new and enter your drupal and forum directory path. Save as config.php, then upload the full drupal directory as is (in full) to a directory of your choosing on your server. You may rename the drupal directory to something else if you want.

3. Import the product-drupal.xml file through your product/plugin menu. The steps, in case you have not used the product manager before, are: go to your AdmincCp -> Plugin Systems -> Product Manager -> Manage Products. Clcik on Add/Import Products links, click the "Browse" button, locate the product-drupal.xml file on your local PC drive, select it, and click "yes" to the "Allow Overwrite" option, and click "Import".

4. Go to your AdminCP vBulletin Options -> vB Drupal and setup the Drupal URL and site name and the comment options.

5. Browser to your new Drupal URL (you need to be logged in to vBulletin as admin, and click "adminsiter". Set up your site.

6. If you have a customized style, go to the template manager, and edit drupal_header template. Note that this template also contains the navbar/menu code. You simply apply any CSS/HTML changes you used to customize your style to the drupal_header template. Say you have a background image to your header, or page, apply that to the drupal_header as well, additional nav bar items, etc.

Drupal Admin CP:
First thing is setup your user "roles". These act like vB usergroups. You can assign multiple vB groups to a single Drupal role, or the other way around, or both. You can do that for primary or secondary group id's.

Mapping vB usergroups to Drupal Roles:
Go to administer -> access control -> Roles. Create a new role, then click edit, and enter the vB usergroup ids you want to have that role, separated by commas. Each time you create a new role, update Access Control -< Permissions to refine the new role's permissions.

Module, Blocks, Menus and Settings:
Next is activating the modules you want. Here's how the usual module setup works. Clcik "modules" to activate or diactivate a module. Then click "access control" to set who can use that module. Then click "blocks", to set where you want the block (if it has one) should be placed. Then click "menus" to enable any new menu items. Then click "settings", to see if this module has any additional settings. Some module will add one admin menu, some will add another one under settings.

Documentation: Drupal has an extensive online manual, and many hands on examples. Please visit their online handbooks to learn more about Drupal: http://drupal.org/handbooks