Installation

Installing Drupaltin is fairly easy and I'm doing my best to document every aspect so the install is painless and complete.

You will not have to edit any core files of Drupal or vBulletin, this is a great feature that Drupaltin offers while most other similar products do not. Since you do not have to edit any core files, nearly every module and plugin should work flawlessly. If you come across a module or product that does not work with Drupaltin, PLEASE report this in the support forums.

Remember to back up your Drupal and vBulletin databases and files! I am not responsible for any loss of data, if you make backups the possibility of dataloss will be eliminated.

Note that Drupaltin is still in it's early development stages. The latest version 5.x-1.0a is to be considered an alpha release. I have a testing team who has extensively tested the product, but I cannot guarantee you will not run into a bug somewhere. I would highly recommend you make a dummy copy of your website in a dev environment. This way you can install Drupaltin and make sure there aren't going to be any major issues with the rest of your site. As you can see I have Drupaltin running on this very web site so it is fit for a production web site, just realize it is still an alpha release.

Download Drupaltin

You should obtain the files directly from http://theoverclocked.com/drupaltin otherwise I cannot guarantee the integrity of the files. Once downloaded, the files will be in .tar.gz format and can be extracted using most compression tools.

 

Prior Installation

Drupaltin has been developed for web sites with existing vBulletin forums. When you install the plugin from the vBulletin admincp, Drupaltin will move any users registered in Drupal into a new table called backup_users and all users from the vBulletin database will be moved into the Drupal database. If you uninstall the plugin from the vBulletin admincp, the users will be deleted from the Drupal database and the backup users will be replaced. There will be no changes to the vBulletin database what-so-ever. You will not loose your users in vBulletin no matter what.

Drupaltin has only been tested with a fresh Drupal install and an existing vBulletin install. I cannot guarantee success when trying to install with an existing Drupal install. If someone has an existing Drupal install to use this on, please let me know in the support forums how it works for you. If further development is needed to support existing Drupal installs, any help would be greatly appreciated by many.

 

File Edits

For Drupaltin 5.x-1.0a you will need to edit a total of five files. The amount of file edits needed will decrease as Drupaltin is developed further. We will start with the main configuration file, drupaltin_config.php.

drupaltin_config.php
This file is located in /vBulletin/includes

We have seven items to define in this file. Input your Drupal server path which is the absolute path for your server. On a typical Unix based system, the location would be something like /var/www for the main directory. Go ahead and fill the other paths in, they are pretty self-explanatory. Notice I have left examples in each define to make it easier to understand. Just replace the example with your information.

The last thing we need to define in this file is your Drupal database information. This will be exactly the same as what you used when installing Drupal. Once you finish the database information, you can save the file and move on to the next.

drupaltin_logout.php
This file is located in /Drupal

We have one item to define in this file, vBulletin server path. This will be exactly the same thing that you put in the drupaltin_config.php file. Put in your directory and save the file.

*Note, if you do not want a login form within Drupal, you may skip editing the files below. Though if you do not use the Drupaltin login form, the default Drupal login form will not work but your users may login at vBulletin and it will effectively log them into Drupal automatically.

form.html
This file is located in /Drupal/modules/drupaltin

Now this is the hardest edit you will have to make. This is the form for the Drupaltin login which is part of the Drupaltin module.

If you look through the code you will see some URLs in there. I left the URLs for this site in there as an example so you know how to edit the files. Find where The Overclocked is specified and replace it with your domain. For example, if your vBulletin is not on a sub domain, if the URL is http://forums.theoverclocked.com/register.php change it to http://www.yoursite.com/forums or whatever the correct URL is for your web site.
  • http://forums.theoverclocked.com has to be replaced four times with your forums URL
  • www.theoverclocked.com has to be replaced one time with the URL where the "login success" pageshould be redirected to
form.php
This file is located in /Drupal/modules/drupaltin

You may copy and paste the edited code from the form.html file into this file. Paste where it says "PASTE HERE" leaving the quotation marks in place. Save the file.

drupaltin.module

This file is located in /Drupal/modules/drupaltin

Just like in the file above (form.php), you may paste the edited code from form.html into this file. The paste point is about halfway down on line 54. Paste where it says "PASTE HERE" leaving the quotation marks in place. Save the file.

You are done with the file edits.

 

Upload Files

Now it is time to upload the files to your web server.

  1. Upload the whole drupaltin folder located in the subfolder Drupal/modules of the download archive into the modules directory in your Drupal install.
  2. Upload the file drupaltin_config.php located in vBulletin/includes into the includes directory in your vBulletin install.
  3. Upload drupaltin_logout.php and drupaltin_login.php to the main folder of your Drupal installation.

 

Install Plugin

Now is when you should install the vBulletin plugin. This is perhaps the most painless part of the whole installation. Browse to your vBulletin admincp and login. Now go to Plugins & Products in the menu on the left. Click Manage Products link and find the [Add/Import Product] button at the bottom of the page. From here you may click the Browse button and find the product-drupaltin_5.x-1.0a.xml file. I highly recommend you change the "Allow Overwrite" option to yes.

Click Import and the installer will run. If the installation was successful you will be brought back to your Managed Products screen.

 

Edit Templates

We will need to make two very minor, but important template modifications in vBulletin. I recommend you edit every parent style you have installed. If you edit the parent style template, the child styles will inherit the change as well automatically.

The two templates that need modified are navbar and STANDARD_ERROR. The modification is exactly the same in both files.

Find:

<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">

Replace with:

<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">

It is as simple as that!

 

Superadmin Userid

If your userid in vBulletin is not 1 you will need to make a small change in the Drupal database. Otherwise you may skip this step.

Open up phpMyAdmin or whatever you use for editing your Drupal database. Find the users table and look for the entry for userid=1. You will need to change userid=1 to a userid that has not yet been used. Do not use userid=0, find the highest userid in your database and use the number after it. Now you can find your userid and change it to userid=1.

Everything should work fine with those changes but always keep an eye out for the username who used to be userid=1. If you find a bug somewhere, please report it in our support forums.

 

Install Module

Installing the Drupaltin module is just like installing most other Drupal modules. Just login to Drupal and go to Administrator -> Modules. Find Drupaltin at the bottom and enable it.

Now that the Drupaltin module has been installed, head over to Administer -> Blocks so we can enable the correct login form. The default login form is called User login, go head and change the drop down box to none to disable it. Now we need to enable the Drupaltin login form by clicking the drop down box and changing it to left side or wherever you would like it to show up.

One more thing to do, enable the logout menu item. Go to Administer -> Menus and find the default logout menu item. It will be called "Log out" with a lower-case "o" and a path of logout, just disable this item. Now find the logout item which was added by the Drupaltin module. It will be called "Log Out" with an upper-case "o" and a path of drupaltin_logout, enable this item.

 

Restrict Profile Edits

Since the user management is all handled by vBulletin now, we need to restrict access to certain fields in the Drupal user profiles. We do not want our users to change their username, password, timezone, or email address from Drupal since it will not update in vBulletin. The best way to take care of this is to install the User Protect module. It is a very light module which gives you the ability to restrict users from editing the fields in their profile.

Once you have the User Protect module installed, go to Administer -> User Protect. From here we want to click the Protected Roles button at the top of the page. Now you can block access by simply checking the boxes for each role.

 

You are done with the installation! Enjoy!!