diff --git a/drupalvb.inc.php b/drupalvb.inc.php
index 349b759..cbb33d8 100644
--- a/drupalvb.inc.php
+++ b/drupalvb.inc.php
@@ -288,15 +288,37 @@ function drupalvb_get_options() {
 
 /**
  * Get vBulletin configuration.
+ *
+ * @return array
+ *   An associative array containing the vBulletin configuration, plus
+ *   additional key:
+ *   - version: The vBulletin version number string, as contained in the first
+ *     PHP comment lines of config.php.
  */
 function drupalvb_get_config() {
   static $config = array();
 
-  // @todo Find & include vB's config automatically?
-  // $files = file_scan_directory('.', '^config.php$', $nomask = array('.', '..', 'CVS', '.svn'));
-  $config_file = drupal_get_path('module', 'drupalvb') .'/config.php';
-  if (empty($config) && file_exists($config_file)) {
-    require_once $config_file;
+  if (empty($config)) {
+    // @todo Find & include vB's config automatically?
+    // $files = file_scan_directory('.', '^config.php$', $nomask = array('.', '..', 'CVS', '.svn'));
+    $config_file = drupal_get_path('module', 'drupalvb') . '/config.php';
+    if (file_exists($config_file)) {
+      require_once $config_file;
+
+      // Additionally parse the vBulletin version out of the php file header, as
+      // some integration functionality needs to account for API changes in
+      // later vBulletin versions.
+      $config['version'] = NULL;
+      $file = fopen($file, 'r');
+      $max_lines = 10;
+      while ($max_lines && $line = fgets($file, 30)) {
+        if (preg_match('@vBulletin\s+([0-9a-zA-Z\.-]+)@', $line, $version)) {
+          $config['version'] = $version[1];
+        }
+        $max_lines--;
+      }
+      fclose($file);
+    }
   }
   return $config;
 }
