Migrating vBulletin to Drupal 7

I'm currently working my way through setting up a migration from vBulletin 3.8 to Drupal 7 using the migrate module (2.2). Here's the code that I'm using that will hopefully be of use to other vBulletin users.

First of all, I've created a 'vbulletin_migration' folder in the sites/all/modules/migrate folder and added .module and .info files

I've named the .module file vbulletin_migration.module and it contains the following code:

// $Id: migrate_example.module,v 1.1.2.4 2010/12/18 16:04:59 mikeryan Exp $

/**
 * You must implement hook_migrate_api(), setting the API level to 2, for
 * your migration classes to be recognized by the Migrate module.
 */
function vbulletin_migration_migrate_api() {
  $api = array(
    'api' => 2,
  );
  return $api;
}

I've named the .info file as vbulletin_migration.info and it contains the following code:

name = "Migrate vBulletin"
description = "Module to migrate vBulletin content to Drupal 7"
package = "Development"
core = 7.x
dependencies[] = migrate
dependencies[] = migrate_extras
dependencies[] = field
dependencies[] = file
dependencies[] = image
dependencies[] = number
dependencies[] = text
dependencies[] = options
dependencies[] = taxonomy
dependencies[] = date
dependencies[] = link
dependencies[] = media

files[] = vbulletin_roles.inc
files[] = vbulletin_user.inc
files[] = vbulletin_forum.inc

As the second block of code shows, files called vbulletin_user.inc, vbulletin_forum.inc and vbulletin_roles.inc have also been created and put in the vbulletin_migration folder...more info about each of these in the following pages.

Connecting to the vBulletin database

My vBulletin mysql database is separate from the Drupal 7 database, so I'm connecting to it at the top of each of my migrate .inc files,

Migrating Blob avatar and profile images

vBulletin stores the avatar and profile images in 'blob' fields (filedata). The following vbulletin_blob.inc can be used to get them into

Migrating vBulletin Forum Structure with vbulletin_forum.inc

With vBulletin Roles and Users in D7, we can now create a class to import the Forum structure...threads and posts to follow

Migrating vBulletin Posts with vbulletin_forum.inc

With roles, users, forum structure and threads migrated, we can now add posts to the threads with something like...

Migrating vBulletin Tags in vbulletin_forum.inc

Some of my vBulletin site's threads and posts have tags that I'd liked to migrate to Drupal. vBulletin stores this data in the 'tag' table,

Migrating vBulletin Threads with vbulletin_forum.inc

With roles, users and forum structure in place, we can now look at migrating threads from the vBulletin database threads table with

Migrating vBulletin Users with vbulletin_users.inc

After vBulletin Roles Migration we can migrate the vBulletin users. The following was added to the vbulletin_user.inc

vBulletin Roles Migration with vbulletin_roles.inc

Before migrating from vBulletin, we need to identify a sequence of migrations where one class might first rely on another to be loaded with

Guide maintainers

StuartDH's picture