vBulletin Manual
 

vBulletin

vBulletin® 3.8 Manual

Installing vBulletin

The first step towards running vBulletin after you have purchased a license is to download the latest vBulletin package, upload it to your web server and run the installer script.

The following documents will take you through this process step-by-step.
Note:
Before installing vBulletin you need to have PHP and MySQL and have created a database within the MySQL engine to hold vBulletin's data.

Downloading the vBulletin Package

The first thing you will need to do when installing vBulletin is to download the latest version from the Members' Area.

You will need to log-in to the Members' Area using the Customer Number and Customer Password that was emailed to you when you purchased your license.

Once logged in, you will see a list of Current Licenses. For each active license that you own, there will be a Download vBulletin link that you can click.

Click the link for the license you want to use and you will be taken to the download page, where you will be given options for how to download the latest vBulletin package.

By default compression is performed on the JavaScript files included within the clientscript directory in order to reduce the size of the files. YUI Compressor is used to do this but you can choose uncompressed JavaScript files using the option described below.

You can choose from the following options:When you have set the download options you can click the Download button to start the download. When the download prompt window appears, you should choose the Save option and choose a directory on your computer in which to save the package.

The package will then be downloaded and saved to the location you specified.

Preparing the vBulletin Files for Upload

To extract the files from the package, open the folder on your computer where you saved the vBulletin package and right-click on its icon, then choose Extract All from the pop-up menu.

This will open a wizard to guide you through the unzipping progress. Accept the default options suggested and the system will decompress the files from the zip package.

When the unzipping progress is complete, you will find that the process has created a new folder called upload and another called do_not_upload.

upload - This folder contains the vBulletin files that need to be uploaded to your web server.

However, before you upload the files you must make some changes to the vBulletin configuration file. This file is located in the includes folder (within the upload folder) and is called config.php.new.

The first thing you must do is to rename this file from config.php.new to config.php (removing the temporary .new extension).

The second folder is do_not_upload - This folder contains tools to perform various tasks on your board

Editing the vBulletin Configuration File

Before uploading the vBulletin files to your web server, you must edit the vBulletin configuration file (includes/config.php) to tell vBulletin how to communicate with your database.

To edit the config.php file, you will need to open the file in a text editor such as Windows® WordPad. (Note that we do not recommend that you use Windows® Notepad to edit config.php, as Notepad has problems displaying the line breaks in some file types.)

Editing the config.php file is one of the few times in vBulletin where you will need to edit raw PHP code. The file is heavily commented in order to help you fill in the necessary information.

Of the settings in this file, only a few need to be edited in order to create a working vBulletin configuration file. These settings are:
$config['Database']['dbname']This value should be altered to state the name of the database that will contain your vBulletin installation on the database server.
$config['Database']['technicalemail']An email address should be entered here. All database error messages will be forwarded to the email address provided.
$config['MasterServer']['servername']This sets the address of your database server. On most installations the database server is located on the same computer as the web server, in which case the address should be set to 'localhost', otherwise use the address of the database server as supplied by your web host.
$config['MasterServer']['username']This variable contains the username provided to you by your host for connecting to your database server.
$config['MasterServer']['password']The password that accompanies the database username should be entered here.
Note:
Please note that Jelsoft / vBulletin Support can not provide the values you require for $config['Database']['dbname'], $config['MasterServer']['servername'], $config['MasterServer']['username'], and $config['MasterServer']['password']. These variables are only available from the web host providing your web/database server.

If you need to create a new database for vBulletin to use, instructions for doing so in a variety of systems are available here.

Also note that you only edit the info to the right of the equal sign. Do NOT edit the names in the brackets to the left of the equal sign. For instance in this line:

$config['MasterServer']['username'] = 'root';

You change 'root' to the appropriate database username and leave everything else as is.

This is correct:

$config['MasterServer']['username'] = 'your_dbusername';

This is NOT correct:

$config['MasterServer']['your_dbusename'] = 'root';

Never edit anything to the left of the equal sign.

On Yahoo Small Business Server, $config['MasterServer']['servername'] should be set to 'mysql'.
The remaining variables in config.php do not need to be edited in order to make a working vBulletin configuration. For most, it is recommended that you do not alter them until after the installation process is complete, unless you are confident that you know what you are doing beforehand. A description of these remaining variables follows.
$config['Database']['dbtype']If you are using PHP5 in combination with MySQL 4.1.x you may want to change this variable to 'mysqli' to take advantage of the MySQL Improved engine
$config['Database']['tableprefix']In order to easily identify the tables related to vBulletin in your database, you may prefix the names of all tables with a few letters or a word. For example, if you specify the $config['Database']['tableprefix'] as 'vb_' then all tables will be prefixed with vb_, making vb_forum, vb_user etc.
If you choose to change your $config['Database']['tableprefix'] at some point after you have installed your vBulletin, tools are provided to do this.
$config['Database']['force_sql_mode']New versions of MySQL (4.1+) have introduced some behaviors that are incompatible with vBulletin. These behaviors are enabled by default with MySQL 5. Setting this value to "true" disables those behaviors. You only need to modify this value if vBulletin recommends it.
$config['MasterServer']['usepconnect']Setting this variable to 1 will cause PHP to use persistent connections to the MySQL server. For very large vBulletin installations, using persistent connections may result in a slight performance boost but in most cases leaving it set to 0 (off) is the best option. If you are unsure, leave it set to 0
Slave Database ConfigurationThese variables only apply if you have a Slave Database configured. If you are not sure, you should leave these variables alone. This is an advanced setting!
$config['Misc']['admincpdir']By default, vBulletin will install the files for the Administrators' Control Panel into a folder called admincp, but you may wish to rename this folder this for security purposes. If you rename the folder, enter the new name here. Note that you can only rename the folder, if you move the folder to a new location the system will be unable to function.
$config['Misc']['modcpdir']This variable is similar to the $admincpdir setting, with the exception that $modcpdir refers to the Moderators' Control Panel rather than the Administrators' Control Panel.
$config['Misc']['cookieprefix']When vBulletin sets cookies on users' computers they will all be prefixed with a few characters in order to be easily identified as cookies set by vBulletin. By default this prefix is bb but you can change it to be whatever you like. This option is particularly useful if you have many vBulletin installations running on the same domain.
$config['Misc']['forumpath']Some systems may require a full path to the forum files. If vBulletin does not tell you that you need this, leave this blank.
$config['SpecialUsers']['canviewadminlog']All actions performed in the vBulletin Administrators' Control Panel are logged in the database. This variable controls the permissions for which users are allowed to view this log. The variable takes the form of a list of user IDs separated by commas. For example, if you would like the users with user IDs 1, 15 and 16 to be able to view the Admin Log, this variable would be set like this:
$config['SpecialUsers']['canviewadminlog'] = '1,15,16';
$config['SpecialUsers']['canpruneadminlog']In the same way as $config['SpecialUsers']['canviewadminlog'] controls which users can view the Admin Log, $config['SpecialUsers']['canpruneadminlog'] controls which users are permitted to prune (delete items from) the Admin Log. Use the same user IDs separated with commas system as with the $config['SpecialUsers']['canviewadminlog'] setting.
$config['SpecialUsers']['canrunqueries']The vBulletin Administrators' Control Panel contains a simple interface for running queries directly on the database. This variable contains the IDs of the users with permission to do this. For security reasons you may wish to leave this list totally empty.
$config['SpecialUsers']['undeletableusers']If your vBulletin installation is going to have multiple users with administrative privileges, you may wish to protect certain users from accidental (or even malicious) deletion or editing. Any user IDs entered into this list will not be editable or deletable from the Administrators' Control Panel by anybody.
$config['SpecialUsers']['superadministrators']Any users whose user IDs are specified within the $config['SpecialUsers']['superadministrators'] setting will be automatically granted full access to all vBulletin features, including the ability to set the permission levels of other administrators.
$config['Mysqli']['charset']If you need to set the default connection charset because your database is using a charset other than latin1, you can set the charset here. If you don't set the charset to be the same as your database, you may receive collation errors. Ignore this setting unless you are sure you need to use it.
$config['Mysqli']['ini_file']PHP can be instructed to set connection parameters by reading from the file named in 'ini_file'. Please use a full path to the file. This is generally used to set the connection's default character set. This setting should also be ignored unless you are sure you need to use it.
Note:
The variables $config['SpecialUsers']['canviewadminlog'], $config['SpecialUsers']['canpruneadminlog'], $config['SpecialUsers']['canrunqueries'], $config['SpecialUsers']['undeletableusers'] and $config['SpecialUsers']['superadministrators'] should all contain a single userid number, a comma-separated list of user id numbers, or nothing at all. For example:
$config['SpecialUsers']['canviewadminlog'] = '1,15,16';
$config['SpecialUsers']['canpruneadminlog'] = 
'1';
$config['SpecialUsers']['canrunqueries'] = 
'';
$config['SpecialUsers']['undeletableusers'] = 
'1,15';
$config['SpecialUsers']['superadministrators'] = 
'1'
Note: When editing config.php, make sure there is no whitespace or extra lines either before the <?php or after the ?>. If there are any extra lines or space, you will see an 'Unable to add headers' error when accessing your forums.
Note:
Later versions of vBulletin may not have the ?> at the end. This is to help prevent this kind of error from happening.
Once you have finished editing your config.php file you should save it again and prepare to upload the file to your web server.

config.php

<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.6.6 - Licence Number 1a2b3c4
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ©2000-2007 Jelsoft Enterprises Ltd. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

/*-------------------------------------------------------*\
| ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
+---------------------------------------------------------+
| If you get any errors while attempting to connect to    |
| MySQL, you will need to email your webhost because we   |
| cannot tell you the correct values for the variables    |
| in this file.                                           |
\*-------------------------------------------------------*/

    //    ****** DATABASE TYPE ******
    //    This is the type of the database server on which your vBulletin database will be located.
    //    Valid options are mysql and mysqli, for slave support add _slave.  Try to use mysqli if you are using PHP 5 and MySQL 4.1+
    // for slave options just append _slave to your preferred database type.
$config['Database']['dbtype'] = 'mysql';

    
//    ****** DATABASE NAME ******
    //    This is the name of the database where your vBulletin will be located.
    //    This must be created by your webhost.
$config['Database']['dbname'] = 'forum';

    
//    ****** TABLE PREFIX ******
    //    Prefix that your vBulletin tables have in the database.
$config['Database']['tableprefix'] = '';

    
//    ****** TECHNICAL EMAIL ADDRESS ******
    //    If any database errors occur, they will be emailed to the address specified here.
    //    Leave this blank to not send any emails when there is a database error.
$config['Database']['technicalemail'] = 'dbmaster@example.com';

    
//    ****** FORCE EMPTY SQL MODE ******
    // New versions of MySQL (4.1+) have introduced some behaviors that are
    // incompatible with vBulletin. Setting this value to "true" disables those
    // behaviors. You only need to modify this value if vBulletin recommends it.
$config['Database']['force_sql_mode'] = false;



    
//    ****** MASTER DATABASE SERVER NAME AND PORT ******
    //    This is the hostname or IP address and port of the database server.
    //    If you are unsure of what to put here, leave the default values.
$config['MasterServer']['servername'] = 'localhost';
$config['MasterServer']['port'] = 3306;

    
//    ****** MASTER DATABASE USERNAME & PASSWORD ******
    //    This is the username and password you use to access MySQL.
    //    These must be obtained through your webhost.
$config['MasterServer']['username'] = 'root';
$config['MasterServer']['password'] = '';

    
//    ****** MASTER DATABASE PERSISTENT CONNECTIONS ******
    //    This option allows you to turn persistent connections to MySQL on or off.
    //    The difference in performance is negligible for all but the largest boards.
    //    If you are unsure what this should be, leave it off. (0 = off; 1 = on)
$config['MasterServer']['usepconnect'] = 0;



    
//    ****** SLAVE DATABASE CONFIGURATION ******
    //    If you have multiple database backends, this is the information for your slave
    //    server. If you are not 100% sure you need to fill in this information,
    //    do not change any of the values here.
$config['SlaveServer']['servername'] = '';
$config['SlaveServer']['port'] = 3306;
$config['SlaveServer']['username'] = '';
$config['SlaveServer']['password'] = '';
$config['SlaveServer']['usepconnect'] = 0;



    
//    ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ******
    //    This setting allows you to change the name of the folders that the admin and
    //    moderator control panels reside in. You may wish to do this for security purposes.
    //    Please note that if you change the name of the directory here, you will still need
    //    to manually change the name of the directory on the server.
$config['Misc']['admincpdir'] = 'admincp';
$config['Misc']['modcpdir'] = 'modcp';

    
//    Prefix that all vBulletin cookies will have
    //    Keep this short and only use numbers and letters, i.e. 1-9 and a-Z
$config['Misc']['cookieprefix'] = 'bb';

    
//    ******** FULL PATH TO FORUMS DIRECTORY ******
    //    On a few systems it may be necessary to input the full path to your forums directory
    //    for vBulletin to function normally. You can ignore this setting unless vBulletin
    //    tells you to fill this in. Do not include a trailing slash!
    //    Example Unix:
    //      $config['Misc']['forumpath'] = '/home/users/public_html/forums';
    //    Example Win32:
    //      $config['Misc']['forumpath'] = 'c:\program files\apache group\apache\htdocs\vb3';
$config['Misc']['forumpath'] = '';



    
//    ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ******
    //    The users specified here will be allowed to view the admin log in the control panel.
    //    Users must be specified by *ID number* here. To obtain a user's ID number,
    //    view their profile via the control panel. If this is a new installation, leave
    //    the first user created will have a user ID of 1. Seperate each userid with a comma.
$config['SpecialUsers']['canviewadminlog'] = '1';

    
//    ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ******
    //    The users specified here will be allowed to remove ("prune") entries from the admin
    //    log. See the above entry for more information on the format.
$config['SpecialUsers']['canpruneadminlog'] = '1';

    
//    ****** USERS WITH QUERY RUNNING PERMISSIONS ******
    //    The users specified here will be allowed to run queries from the control panel.
    //    See the above entries for more information on the format.
    //    Please note that the ability to run queries is quite powerful. You may wish
    //    to remove all user IDs from this list for security reasons.
$config['SpecialUsers']['canrunqueries'] = '';

    
//    ****** UNDELETABLE / UNALTERABLE USERS ******
    //    The users specified here will not be deletable or alterable from the control panel by any users.
    //    To specify more than one user, separate userids with commas.
$config['SpecialUsers']['undeletableusers'] = '';

    
//    ****** SUPER ADMINISTRATORS ******
    //    The users specified below will have permission to access the administrator permissions
    //    page, which controls the permissions of other administrators
$config['SpecialUsers']['superadministrators'] = '1';

    
// ****** DATASTORE CACHE CONFIGURATION *****
    // Here you can configure different methods for caching datastore items.
    // vB_Datastore_Filecache  - for using a cache file
// $config['Datastore']['class'] = 'vB_Datastore_Filecache';
    // vB_Datastore_Memcached - for using a Memcache server
    // It is also necessary to specify the hostname or IP address and the port the server is listening on
/*
$config['Datastore']['class'] = 'vB_Datastore_Memcached';
$i = 0;
// First Server
$i++;
$config['Misc']['memcacheserver'][$i]        = '127.0.0.1';
$config['Misc']['memcacheport'][$i]            = 11211;
$config['Misc']['memcachepersistent'][$i]    = true;
$config['Misc']['memcacheweight'][$i]        = 1;
$config['Misc']['memcachetimeout'][$i]        = 1;
$config['Misc']['memcacheretry_interval'][$i] = 15;
*/
// ****** The following options are only needed in special cases ******

    //    ****** MySQLI OPTIONS *****
    // When using MySQL 4.1+, MySQLi should be used to connect to the database.
    // If you need to set the default connection charset because your database
    // is using a charset other than latin1, you can set the charset here.
    // If you don't set the charset to be the same as your database, you
    // may receive collation errors.  Ignore this setting unless you
    // are sure you need to use it.
// $config['Mysqli']['charset'] = 'utf8';

    //    Optionally, PHP can be instructed to set connection parameters by reading from the
    //    file named in 'ini_file'. Please use a full path to the file.
    //    Example:
    //    $config['Mysqli']['ini_file'] = 'c:\program files\MySQL\MySQL Server 4.1\my.ini';
$config['Mysqli']['ini_file'] = '';

// Image Processing Options
    // Images that exceed either dimension below will not be resized by vBulletin. If you need to resize larger images, alter these settings.
$config['Misc']['maxwidth'] = 2592;
$config['Misc']['maxheight'] = 1944;

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:00, Sun Nov 26th 2007
|| # CVS: $RCSfile$ - $Revision$
|| ####################################################################
\*======================================================================*/

MySQLi

MySQLi is an improved database layer for PHP 5 and MySQL 4.1+. It is strongly recommended that MySQLi be used if your MySQL server is at version 4.1 or higher.

To enable MySQLi, view Editing the vBulletin Configuration File.

config.php contains two advanced settings that you may need when MySQLi is in use. These settings are to be ignored as long as you are not having issues of the following type:
MySQL Error  : Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation
Generally, this error only happens when your database's character set has been changed from the default of latin1. To begin to resolve this problem, you must first determine what character set is being used for your database.

From the Administrator Control Panel, go to Admin CP->Maintenance->Execute SQL Query. If you receive a no permissions message, please refer back to Editing the vBulletin Configuration File on how to grant the appropriate permissions so that you may execute queries.

Enter the following query in the Manual Query input box and press [Continue]

SHOW VARIABLES LIKE 'char%'

The results screen will show your current character set settings:

If the values character_set_database and character_set_connection are different then this can be resolved by continuing this solution.
Note:
If the values are the same, then your problem will not be solved by this solution. Please contact vBulletin Support in this case. You may have tables in your database that are configured to use a different character set than your database is. All of your tables will need to be updated to use the same character set. This condition can be caused by changing the character set of your database after vBulletin has been installed. Upgrades may create tables that are in your new character set, which will cause problems.
Your character_set_connection needs to be updated to be the same as your character_set_database.

Create a new file in your forums include directory named mysqli.ini. Inside of this file place:
[client]
default-character-set=utf8
The value utf8 will need to be the same value that appeared as your character_set_database in the previous step. Generally, this will be utf8 but you may have a special case that requires a different setting.

Edit the vBulletin Configuration File file by following the instructions in the previous section.

Uncomment the following line by removing the two slashes from the beginning
//    $config['Mysqli']['ini_file'] = 'c:\program files\MySQL\MySQL Server 4.1\my.ini';
Change the line to point to the location of the mysqli.ini file that you created in the previous step. Example:
$config['Mysqli']['ini_file'] = 'c:\program files\apache group\apache\htdocs\forums\includes\mysqli.ini';
If you have enabled MySQLi and entered the correct path to your new mysqli.ini file, then this problem should be resolved.

Uploading vBulletin Scripts to Your Web Server

After your config.php file has been edited and saved it is time to upload the vBulletin scripts to your web server ready for installation.

The uploading process should be familiar to anyone who has published pages to a web site before, but a brief description of the process is given here.

Although there are several methods available to transfer the vBulletin files from your computer to your web server, by far the most common method in use is transfer via FTP. Most operating systems have built-in tools for opening FTP connections although they are often limited in their usefulness and many people opt to use a third party FTP client application. For this example we will use Smart FTP.
Note:
We do not recommend using the built-in file transfer features in WYSIWYG editors such as Adobe Dreamweaver, Adobe GoLive!, Microsoft Frontpage, or Microsoft Expressions. These programs often add information to vBulletin's files or do not maintain their structure properly which will cause problems while installing or upgrading the software. We also do not recommend using any web-based file managers that your hosting service may provide as a solution. For best performance and reliability you are recommended to use a stand along FTP client like SmartFTP or Filezilla.
The easiest way to transfer the files is to upload the entire upload folder to the server. Using Smart FTP we do this by dragging the upload folder from its location on your computer's hard disk to the web publishing folder on the server.

Most FTP client applications will handle the file transfers automatically, but if for some reason your application does not, you should make a note of the following:
Note:
The web publishing folder is usually called public_html, www or htdocs and is located within your home directory. If you are unsure of where to find your own web publishing folder, your host will be able to help you.
Depending upon the speed of your internet connection, uploading all the files could take several minutes to complete. After completion, you should see that the web server now contains a folder called upload containing a perfect copy of the files in the upload folder on your computer's hard disk.

When all the files have been uploaded successfully you should rename the upload folder on the web server to the name you want to use for your forums directory. We will be calling it forums for the purposes of this manual.

If all has gone well, you are now ready to run the installation script to prepare your database to run vBulletin.

Running the vBulletin Install Script

Once all the vBulletin files have been successfully uploaded to your web server, you will need to run the vBulletin Installation Script in order to prepare your database.

The Installer runs as a PHP script using your web browser. To start the installation process, open your browser and type the HTTP address of your forums directory, followed by /install/install.php, then hit the <Enter> key or press the [Go] button to open the script.

The first thing you will see from the install script is a log in prompt, asking you to enter your customer number. This is done to prevent other users from accidentally stumbling across your install script and running it. Only you should know your customer number.
Note:
Your customer number is the string of numbers and letters used as the login user name for the vBulletin Members' Area. You should type your customer number carefully to avoid errors. Note that your customer number is not the same as your vBulletin license number.

When you have entered your customer number, hit the [Enter Installer] button and you should be taken to the first step of the install script. If after hitting the [Enter Installer] button you are brought back to the customer number entry dialog, there was an error verifying your customer number. Please check for mistakes and try again.

The first page of the installer script will greet you and give you some basic instructions relating to what will happen during the rest of the install process.

Having read the information on the welcome page of the installer, you can click the large [Next Step] button at the bottom right of the window to proceed to the next step of the installer.
Warning:
Certain browser plug-ins, most notably the popular Google Toolbar can have an adverse effect up the vBulletin installation and upgrade scripts. We recommend that all browser plugins be disabled while running install and upgrade scripts for vBulletin.
Clicking the [Next Step] button will take you to the first installation step, which tests that your config.php file exists and is readable by the system.

A further click will bring you to step 2, in which the installer attempts to connect to the database. If the connection is made successfully, the installer will ask you if you want to empty the database. If you click this link your database will be totally emptied. All data stored in that database (including any data not related to vBulletin) will be irreversibly erased.
Warning:
Don't click the 'empty database' link unless you are really sure that's what you want to do!
The next few steps offer no choices during the installation process, other than to click the [Next Step] button at the bottom of the page to proceed to the next step.

However, you will soon be present with a page entitled Obtain Some Default Settings. This page does not have a [Next Step] button, as it requires that you fill in a few details about how you are installing vBulletin.

The settings required here are:
BB TitleThis is the title you will give to your vBulletin forums. It appears in the title of every page, and items such as notification emails sent from vBulletin to your members will identify the sender using this name. (BB Title is short for bulletin board title).
Homepage TitleLess important than the BB Title, this setting is used for a link at the bottom of every page which points to the address specified in Home URL (see below). It represents the title of your web site.
BB URLThe BB URL setting is very important. It represents the URL that people should visit in order to find your vBulletin forums. The system will make a best-guess at filling-in this setting automatically, so you should only change it if the given value is definitely wrong. Note that this setting should not end with a slash (/) character.
Home URLThis is the web address of your main web site, and is used in conjunction with the Home Title setting to create a link to your web site from the bottom of each forum page.
Cookie PathWhen cookies are stored on visitors' computers, this setting will be used to define to what location on your server the cookies apply. Unless you have a reason to change this setting it's probably a good idea to leave it at the default value of '/' (meaning that the cookies can be read by the entire site).
Cookie DomainRather like the cookie path setting, this allows you to specify the domain to which cookies belong. Generally speaking this setting can be left empty.
After filling in these values and clicking through the next few screens you will be asked to set yourself up as the forum administrator.

You will need to provide a username with which you are going to log-in, together with a password and an email address. These will be the details with which you will log in to your installed vBulletin board.
Note:
When choosing a password, we would suggest a combination of letters, numbers and punctuation characters in both upper and lower case, and a length of at least eight characters.
Fill in the required boxes and hit the [Continue] button to proceed with the installation process.

After a few pages the installation process will complete, and you will be presented with a link to your Admin Control Panel. Before clicking this link, you should open up your FTP client application again and browse to the install folder inside your forums directory.

You should delete the install.php and upgrade*.php files now as a security precaution. It is safe to leave the other install directory files intact since they may prove useful in the future. Once you have deleted these files you can return to the installer script and click the link to enter the Administrator Control Panel of your freshly installed vBulletin!
Note:
You will not be able to enter the Admin Control Panel until you have deleted the install.php file.

Upgrading vBulletin

From time to time it will be necessary to upgrade your vBulletin installation to the latest version, either to gain new features or to fix newly discovered bugs in PHP, MySQL or vBulletin itself.

You can upgrade to the latest version of vBulletin 3 from the following vBulletin versions:The upgrade process differs depending upon the version of vBulletin currently installed on your web server. Sites running vBulletin 2 will need to follow slightly different instructions from sites already running vBulletin 3 and upgrading to the latest version.

When upgrading, the first step is always the same, in that you must log in to the vBulletin Members' Area and download the latest vBulletin package available, as described in the installation instructions.
Warning:
We strongly recommend that you back up your database prior to any upgrade.

A document detailing how to back up your database is available in the Technical Documents section of the vBulletin Manual's Appendices, here.

Preparing the vBulletin Files for Upload

After you have successfully downloaded the vBulletin package to your computer you will need to prepare the scripts to be uploaded to your web server.

The first thing to do is to decompress the package into its constituent files. If you downloaded the .zip package and your computer is running a recent version of Windows® all the tools you need to do this are available as part of Windows®. This section will assume that you have downloaded the .zip package and that your computer is running Windows XP.

To extract the files from the package, open the folder on your computer where you saved the vBulletin package and right-click on its icon, then choose Extract All from the pop-up menu.

This will open a wizard to guide you through the unzipping progress. Accept the default options suggested and the system will decompress the files from the zip package.

When the unzipping progress is complete, you will find that the process has created a new folder called upload and another called do_not_upload.

upload - This folder contains the vBulletin files that need to be uploaded to your web server.

You should now rename the 'upload' folder to match whatever name you gave to the directory containing your vBulletin files on your web server. In this example, the folder containing the vBulletin files is called 'forums'.

NOTE: If you have changed the names of the 'admincp' and 'modcp' directories in your config.php file, be sure to make the same change to these subdirectories prior to uploading.

The second folder is do_not_upload - This folder contains tools to perform various tasks on your board
Note:
As you already have a vBulletin installation running on your web server, you should delete the install.php file in the install directory before you proceed to upload the files.
Note:
These instructions are for 3.5.0 and higher. If you are upgrading from vBulletin 3.0.x to 3.5.0, you will also need to recreate your includes/config.php file based on the new version of includes/config.php.new. Please see this page in the installation section on how to edit the config file. This step is not necessary for individual upgrades within the 3.0.x or 3.5.x series.
If you are upgrading from vBulletin 3.5.x to vBulletin 3.6.x or newer you do not need to edit the config.php file.

Updating the vBulletin Scripts on Your Web Server

Having downloaded the latest vBulletin package and unzipped it to a folder, you must now prepare your web server to accept the updated files. Before you do this you should close your forums. This will help eliminate any potential db errors as people attempt to access your forums before the upgrade is complete.

For uploading there are two ways that this can be done.

The first method involves overwriting all the files that were previously uploaded to your web server, while the second method involves deleting all the old files and directories, and then uploading the new scripts. In this tutorial we will use the overwrite method.

Having renamed the upload folder as specified in the previous step, you should load up your FTP client of choice. In this example we will use Smart FTP.

Connect to your FTP server and with the new vBulletin files in the local pane and the existing old files in the remote pane, drag the forums directory into the parent directory of your remote vBulletin installation as shown here:

You will most likely be prompted by the FTP client at this point to ask if you want to overwrite the existing files. You should confirm this prompt, telling the FTP client that yes, you do want to overwrite the existing files. If the prompt gives you the option to overwrite all existing files without prompting again, use this option.

Most FTP client applications will handle the file transfers automatically, but if for some reason your application does not, you should make a note of the following:
Warning:
It is extremely important that you upload all the files from the latest vBulletin package, including the entire contents of the install directory.

Failure to upload all the files may result in the upgrade script being unable to successfully complete the upgrade process.

Running the vBulletin Upgrade Script

Warning:
Certain browser plug-ins, most notably the popular Google Toolbar can have an adverse effect up the vBulletin installation and upgrade scripts. We recommend that all browser plugins be disabled while running install and upgrade scripts for vBulletin.
With the newest vBulletin files uploaded to your web server, you can now proceed to run the upgrade script. To do this, point your web browser at http://www.example.com/forums/install/upgrade.php, replacing www.example.com/forums with the correct URL to your own vBulletin installation.

The first thing you will see from the install script is a log in prompt, asking you to enter your customer number. This is done to prevent other users from accidentally stumbling across your upgrade script and running it. Only you should know your customer number.
Note:
Your customer number is the string of numbers and letters used as the login user name for the vBulletin Members' Area. You should type your customer number carefully to avoid errors. Note that your customer number is not the same as your vBulletin license number.

When you have entered your customer number, hit the [Enter Upgrade System] button and you should be taken to the first step of the upgrade script. If after hitting the [Enter Upgrade System] button you are brought back to the customer number entry dialog, there was an error verifying your customer number. Please check for mistakes and try again.

The first page of the upgrade script will greet you and provide you with some details about the purpose of the current script.

Having read the information on the welcome page and confirmed that it is correct, click the [Next Step] button at the bottom right of the window to proceed to the next upgrade step.

As each step completes, a [Next Step] will appear at the bottom of the page. When the button appears, the step has completed successfully and clicking the button will advance you to the next step.
Warning:
Do not refresh/reload any page of the upgrade scripts. Doing so may cause database alterations to be applied twice, which can cause errors.
A separate upgrade script exists to upgrade between each version of vBulletin. For example, if you are running vBulletin 3.0.0 Release Candidate 3, the system will first upgrade your database to vBulletin 3.0.0 Release Candidate 4 before progressing to the upgrade script for vBulletin 3.0.0. At the end of each script, the system will search for any additional scripts it needs to run to bring you up-to-date.

When all the necessary upgrade scripts have been run, you will be automatically redirected to the Admin CP login page.

Checking for Updated Templates

If you have closed your forums for the upgrade you can now open them, or you can wait until you have gone through the next two steps checking for updated templates and phrases.

When a new version of vBulletin is released, it is common for some of the default templates to have been updated to accommodate new features or fix bugs.

If you have not customized any of your templates, this need not concern you, but if you have customized some of the default templates there are a few steps you will need to follow after you have finished running all the appropriate upgrade scripts.
Note:
When running vBulletin upgrade scripts, one of the final steps imports the newest version of the default style.

Any templates that you have not customized will automatically be updated to use the newest versions.

However, any templates that you have customized will not be altered or overwritten by importing the latest style, hence the need for the following steps.
1Firstly, you should visit the Styles & Templates > Find Updated Templates page to find out which (if any) of your customized templates may have updated default versions.

2If you find that some of your customized templates do have updated default versions, you have three choices. You can either
  • Do nothing and hope that your customized templates will still work properly with the new vBulletin version. This is often not a problem, but sometimes a variable may have been renamed or else some other change may have been made that will render your customized template dysfunctional.
  • Click the [Revert] link for each template, removing your customizations to ensure that your templates are fully compatible with the new vBulletin version.
  • Click on the [Edit Template] link for each template, and compare the contents of your customized template with the version available by clicking the [View Original] in order to manually update your customized templates to reflect the changes made in the default templates.
On the release of a new vBulletin version, the release announcement posted in the Announcements Forum at vBulletin.com will usually contain a list of updated templates.

This list will often tell you whether or not the changes made to each template were purely cosmetic, in which case you will have no need to perform the steps above for that template, or if the changes require you to revert or manually edit your customized templates to maintain full working order.

Checking for Updated Phrases

When a new version of vBulletin is released, it is common for some of the default phrases to have been updated to accommodate new features or fix bugs.

If you have not customized any of your phrases, this need not concern you, but if you have customized some of the default phrases, there are a few steps you will need to follow after you have finished running all the appropriate upgrade scripts.
Note:
When running vBulletin upgrade scripts, one of the final steps imports the newest version of the default phrases.

Any phrases that you have not customized will automatically be updated to use the newest versions.

However, any phrases that you have customized will not be altered or overwritten by importing the latest phrases, hence the need for the following steps.
1Firstly, you should visit the Languages & Phrases > Find Updated Phrases page to find out which (if any) of your customized phrases may have updated default versions.

2If you find that some of your customized phrases do have updated default versions, you can either:
  • Do nothing and hope that your customized phrases will still work properly with the new vBulletin version. This is often not a problem, but sometimes the phrase may have added text to describe new functionality or have made changes that break the values in the old version.
  • Click on the [Edit] link for each phrases, and compare the contents of your customized phrase with the version available. From this page, you may either update your customized version or revert to the default version by emptying the translation field.

Installing A Patch Level

What is a Patch Level? How does it differ from a full release?

A patch level release contains fixes for only the most critical issues in the previous release. In most cases, these are released to address a security issue. However they can be released for data integrity issues as well.

A patch level is designed to be installed directly over top of your existing installation, with no other action. You do not need to run any upgrade scripts.

How to Upgrade
This is not a full upgrade. You do not need to run any upgrade scripts to complete the upgrade.

Patch: Download a patch file discussed in this thread and upload them to your web server, overwriting the existing files. The patch is available from the Members' Area patch page.

Full Package: Alternatively you can download the full package in the vBulletin Members Area and again upload the affected files mentioned in the release thread.
Note:
Patch Level Releases are only supported for their targeted version. If you are using a previous version, you will need to perform a complete upgrade for full functionality and support. Patch Levels will only be released for the latest version in an active vBulletin series.

The Admin Control Panel

The Administrator Control Panel is the area of your board that only administrators and super moderators can access. From here you can control almost all factors of your board.

Logging-in to the Control Panel

The vBulletin Admin Control Panel can be accessed by pointing your browser at http://www.example.com/forums/admincp/.

The first thing you will see when you access the Control Panel is a prompt to log in. You will be presented with this login prompt even if you are already logged into the public area of the board. This is an additional level of security.

To log in, simply enter the username and password of a user account with administrator privileges, such as the one you created towards the end of the installation script process.

There are a couple of extra options that can be set on the login form. To see them, click the [Options] button to expand the form to its full size.

The two options you can set from the login form are:Clicking the [Log in] button will submit the login details and options you have set, and log you in to the board.
Note:
If you changed the value of $admincpdir in the config.php file and have renamed the admincp directory, the location at which you access the control panel will have changed accordingly.

Getting Around the Admin Control Panel

The first thing you will see when you log into the Admin Control Panel is the welcome page. This page contains a quick method to search for users, some useful links and the vBulletin credits.

You will notice that the Admin Control Panel is divided into three distinct areas. The first and most obvious of these is the main panel, which currently shows the welcome page. This area (the main panel) is where the majority of your attention will be focused when administering your board.

At the top of the page is a narrow strip that contains information about the vBulletin version you are currently running and the latest version available to download. To the right of the strip are links allowing you to click through to the Forum Home Page (the starting point of the public area of the board), and a link allowing you to log out of the control panel.

To the left of the page is the navigation panel. This long, thin area is the key to getting around the Admin CP. When you first visit the Admin CP, you will notice that all the sections of this panel are in a collapsed state.

You can click the gadget on each section to expand it and show its contents, and click the gadget again to collapse that section again. Double-clicking a section's title will also toggle its state and either expand or contract it.

You can expand and collapse any sections at any time. You are not limited to having just a single group expanded at any one time.

When you have a section or sections expanded, hovering your mouse over the included links will highlight that link. You can then click to open the corresponding page in the main panel.

You can use the expanding and contracting sections to build a customized control panel layout for yourself. For example, you may find that you regularly use the 'Styles & Templates' tools, but very infrequently use the FAQ manager.

When you have established a set of expanded and collapsed sections that suits your way of working, you can save the state of the sections by clicking the [Save Prefs] link.

When you reload the Admin CP, you will find that the sections in the left navigation panel will have automatically expanded and collapsed in the manner that they were when you clicked the [Save Prefs] link.

You can expand and collapse any section in your administration session, and at any time you can click the [Revert Prefs] link, which will revert the expanded/collapsed state of all the sections to how they were when you saved your preferences.
If at any time you want to return to the welcome page of the Admin CP, clicking the [Control Panel Home] link at the top of the navigation panel will do this.

vBulletin Options

One of vBulletin’s strengths is its enormous amount of user-configurable options. Most board-wide settings can be controlled through this section. To edit these options, go to vBulletin Options > vBulletin Options (the latter is a subgroup of the former).

When you first enter this section, you will be presented with a screen that allows you to select what settings you wish to display. The select box will look one of two ways:

Unexpanded option groups

Unexpanded
This is the default view. It will display each setting group. To display a group, double click its name or select it and click [Edit Settings]. If you wish to display all settings, select [Show All Settings].

Expanded option groups

Expanded
To use this view, click [Expand Setting Groups] on the left-hand side of the screen. This view will display each setting within a group. To display a setting, double click its name or select it and click [Edit Settings].
Once you have selected a setting or setting group, the individual options will be displayed:

Viewing individual options

On the left, you will see the name and a description of each setting. If you are still unsure what a setting does, click the question mark icon all the way on the right for more information. In the center you will be able to select the value for each option. The type of each option varies; some are yes/no options while others are text areas.

Once you have changed the all the options you wish to change, click [Save]. Changes will take effect immediately.

vBulletin Options

This part of the documentation will go over the individual options and settings in the vBulletin Options section by section.

Turn Your vBulletin On and Off

This setting group from the vBulletin options will allow the Administrator to close the forums to the public with a custom message or set it active. This is a usefull feature when performing serious forum or database maintenance, version updates or bug fixing.

Only users in the Administrator usergroup will be able to browse the site, visitors will be presented with a closed message which you can set in this setting group.

Site Name / URL / Contact Details

vBulletin Options > vBulletin Options > Site Name / URL / Contact Details

After a fresh installation or upgrade, server or site move it is advised to walk through these site details setting group to ensure they are up to date.

General Settings

Use the vBulletin Options > vBulletin Options > General Settings setting group to control several general aspects of your board.

This ranges from meta tags to the use of forumjump, enabling access masks to the display of IM icons.When you are done, click the [Save] button to apply the changes.

Image Settings

The vBulletin Options > vBulletin Options > Image Settings setting group allows you to control how vBulletin processes images for uploading and handles image verification.When you are done, click the [Save] button to apply the changes.

Human Verification Options

Use the vBulletin Options > vBulletin Options > Human Verification Options setting group to control where human verification is required on your forum in conjunction with the Human Verification configuration settings.When you are done, click the [Save] button to apply the changes.

Date and Time Options

The vBulletin Options > vBulletin Options > Date and Time Options setting group is used to define the way dates and times are displayed on certain sections of the board in what way and how they should behave.
Note:
Date and Time formats follow PHP formatting rules. You can find out more about these rules by visiting the PHP manual.
For information on date and time formats in PHP please visit the following page: http://www.php.net/manual-lookup.php?function=date
When you are done, click the [Save] button to apply the changes.

Cookies and HTTP Header Options

The vBulletin Options > vBulletin Options > Cookies and HTTP Header Options setting group allows you to control the cookie settings, gzip compression, HTTP headers and redirect messages options.When you are done, click the [Save] button to apply the changes.

Server Settings and Optimization Options

The vBulletin Options > vBulletin Options > Server Settings and Optimization Options setting group lets you control the server settings to optimize display of posts through post cache, your email sending options and several other options and settings that is definitely worth to walk through and setup.When you are done, click the [Save] button to apply the changes.

Style & Language Settings

The vBulletin Options > vBulletin Options > Style & Language Settings setting group lets you set the default style and language for your site.

Here you can setup the behaviours for the CSS file (store as file), Popup menus (hide or show) and postbit (new or legacy).

Email Options

Use the vBulletin Options > vBulletin Options > Email Options setting group to setup the behaviour of your email features throughout the board.

Here you can setup everything related to how your forum sends and handles email.
Warning:
To obtain your SMTP information, you will need to contact your SMTP provider. This is not information that can be obtained through vBulletin or from support staff.

Sending Email via SMTP

Relying on the PHP internal mail function has always caused problems with a few configurations. The PHP internal mail function is simply a wrapper for the systems own mail program such as sendmail or procmail. The problems occur when certain configurations have extra authentication settings or confusing with line endings. This has been resolved by the introduction of our mail class to correct any problems that may occur with the internal mail function and also to allow the use of SMTP which will completely bypass PHP's own internal mail function.

The SMTP server options can be edited via the Email Options in the vBulletin Options, this will be enabled via the SMTP Email switch and then the appropriate settings must be completed.

It should be noted that the majority of servers do not require a username and password to send SMTP as they are limited by IP address. Also the use of your ISP email is not recommended as this is usually limited to the network of the ISP and will result in a failure to send email.

Censorship Options

Use the vBulletin Options > vBulletin Options > Censorship Options setting group to manage the words you specify to be placed with characters.

All message titles and messages will be affected.
Note:
To use the censor feature on your site, don't forget to activate it!

User Registration Options

These options allow you to control how new user registrations are handled on your forums.

vBulletin Options > vBulletin Options > User Registration Options

User Infractions & Post Reporting Options

Use the vBulletin Options > vBulletin Options > User Infractions & Post Reporting Options setting group to manage user infraction and post reporting notifications.

User Profile Options

With these options you can control how the way your users edit their profile.

vBulletin Options > vBulletin Options > User Profile Options

Enabled User Profile Features
Use this option to globally enable or disable the various user profile-related features. Additional options are available for each feature in their respective sections.

Require Date of Birth
Require users to provide a valid date of birth (1902 to current year).
[note]When this is set to Yes users cannot edit their date of birth once it has been set.

User Title Maximum Characters
This is the maximum number of characters allowed for a user's custom title.


Censored Words for Usertitle
Type all words you want censored in the Usertitle in the field below. Do not use commas to separate words, just use spaces. For example, type "dog cat boy", rather than "dog, cat, boy."

If you type "dog", all words containing the string "dog" would be censored (dogma, for instance, would appear as "***ma"). To censor more accurately, you can require that censors occur only for exact words. You can do this by placing a censor word in curly braces, as in {dog}. Signifying "dog" in the curly braces would mean that dogma would appear as dogma, but dog would appear as "***". Thus your censor list may appear as: cat {dog} {barn} barn

Do not use quotation marks and make sure you use curly braces, not parentheses, when specifying exact words.


Exempt Moderators From Censor
Do you want to exempt your forum Moderators from the censor words? You will want to set this to yes if you censor anything that is part of a moderator's title like 'moderator' as they have custom titles by default and will get censored.

Number of friends to display in the small friends block
The Number of Friends to display in the Small Friends Block on the Users' Profile Pages

Friends Per Page on Full Friends List[b]
The Amount of Friends to show "per page" on the large friends list.

[b]Maximum Visitors to Show on Profile Page

Set an upper limit for the number of recent visitors to show. Recent visitor records are cleaned out on a regular basis, so keep this to a reasonably small number. Somewhere between 5 to 30 is ideal.

Show Last Post on Profile Page
Showing the last post on a member profile can cause large table scans which leads to table locking. This may increase load time on your forums as well as the load of your server. This option should only be enabled for smaller forums.

Signature Soft-Linebreak Character Limit
When counting the number of lines in a signature, this setting controls the number of characters that can be displayed before text wraps in the browser and is displayed as multiple lines. Once this value is surpassed, the run of text will be counted as multiple lines.

The value in this setting should be based on the number of normal-sized characters. Other sized characters will be scaled appropriately to this setting.

Allow Users to 'Ignore' Moderators
Allow users to add Moderators and Administrators to their ignore list?

User Profile: Album Options

With these options you can control the settings for User Albums.

vBulletin Options > vBulletin Options > User Profile: Album Options

Albums Per Page
When listing multiple albums on one page, this controls how many will be displayed before pagination occurs.

Number of Albums to display in the Users Profile
The Maximum Number of Albums to Display on the Users' Profile Pages

Pictures Per Page
When viewing an album, this controls how many pictures are displayed before pagination occurs.

Picture Moderation
When enabled, all new pictures are placed into moderation. This can also be enabled in usergroup permissions.

Album Thumbnail Size
The maximum height and width of thumbnails in the album system. Each picture's aspect ratio will be maintained when it is thumbnailed.

Caption Preview Length
The amount of characters from a picture's caption that will be shown when a user hovers over the picture.

Number of Pictures that can be Uploaded Simultaneously
This controls the number of pictures users can upload simultaneously. They will not be able to violate any album- or usergroup-implied size limits if you set this value too large.

Maximum Pictures per Album
You may choose to limit the number of pictures that a user can have in one album. This is primarily useful for encouraging your users to have albums for smaller topics, but it does have minor performance considerations as well. Setting this to 0 disables the limit.

Enable Picture Comments
Set this option to yes if you would like to enable commenting on album and group pictures. Comments are associated with the picture itself, so comments will be shown anywhere the picture is shown.

Moderate Picture Comments
When enabled, all new picture comments are placed into moderation. This can also be enabled in usergroup permissions.

Default Picture Comments Per-Page
This setting allows you to define the default number of picture comments displayed per-page with a picture.

Maximum Picture Comments Per-Page
This setting allows you to limit the number of picture comments users may display per page with a picture.

Allowed BB Code Tags in Picture Comments
This setting allows you to enable and disable the use of various BB codes in picture comments.

User Profile: Style Customization Options

With these options you can control the options for users customizing their profile page style.

vBulletin Options > vBulletin Options > User Profile: Style Customization Options

Allowed Fonts
The list of allowed fonts for profile style customizations. Each font must be on its own line.

Allowed Font Sizes
The list of allowed fonts size for profile style customizations. Put each font size on its own line. You may use any size that is valid in CSS.

Allowed Border Widths
The list of allowed border width sizes for profile style customizations. Put each border width size on its own line.

Allowed Padding
The list of allowed padding sizes for profile style customizations. Put each padding size on its own line.

User Profile: Visitor Messaging Options

With these options you can control visitor messages on users profiles.

vBulletin Options > vBulletin Options > User Profile: Visitor Messaging Options

Maximum Characters Per Visitor Message
Maximum characters to allow in a visitor message. Set this to 0 for no limit.

Default Visitor Messages Per-Page
This setting allows you to define the default number of messages displayed per-page in the user profiles.

Maximum Visitor Messages Per-Page
This setting allows you to limit the number of messages users may display per page in the user profiles.

Visitor Message Moderation
When enabled, all new visitor messages are placed into moderation. This can also be enabled in usergroup permissions.

Allowed BB Code Tags in Visitor Messages
This setting allows you to enable and disable the use of various BB codes in visitor messages.

Social Group Options

With these options you can control the use of social groups.

vBulletin Options > vBulletin Options > Social Group Options

Social Group Name Maximum Length
Enter the maximum number of characters allowed in social group names. Names longer than this limit will be rejected.

Social Group Message Moderation
When enabled, all new group messages are placed into moderation. This can also be enabled in usergroup permissions.

Enable Social Group Messages
If you select this options, members of each group will be able to post messages in the group. Users who are not part of the group will still be able to read the messages.

Allow Groups Owners to Force New Group Messages into Moderation Queue
This option allows a group owner (with the Manage Own Social Groups' Content Permission) to set the group so that all Group Messages are automatically sent to the moderation queue.

Enable Social Group Pictures
If this option is selected, any users with albums will be able to add pictures from an album to groups they belong to.

Allow Join-to-View Groups
When set, this allows the creator of a group the option to only show contents (messages, pictures) of the group to members of that group (or Administrators and Moderators).

Allowed BB Code Tags in Social Group Messages
This setting allows you to enable and disable the use of various BB codes in group messages.

Allow Owners to Delete Social Group if Empty
This option will allow any group owner to delete a Social Group if they are the only member of that group (even if they lack the "Can Delete Own Social Groups" permission)

User Picture Options

Use the vBulletin Options > vBulletin Options > User Picture Options setting group to manage the settings for the avatars and profile pictures.
Note:
This is the section for the global switch, use the usergroup permissions to setup the permissions on a usergroup basis.

When you are done, click the [Save] button to apply the changes.
Note:
To manage your pre-defined avatars, or to control the storage of avatars, go to the Avatars section.

User Reputation

This section contains many settings that dictate how users of your forum are able to affect each other's reputation score.

User Notes Options

Users with permission to read / write usernotes are now able to go to a profile of a member and leave usernotes about this person. This feature is intended to allow staff members to discuss members and keep the information organized rather then having a variety of threads in a staff forum.

The vBulletin Options > vBulletin Options > User Notes Options setting group allows you to set up the parsing for a usernote. You can turn on or off the use of BB Code, Smilies, [IMG] tags and usage of HTML.
Note:
The ability to use usernotes, read them, read your own, allow others to reply or manage them is a usergroup setting. Do not forget to walk through each usergroup to set the use and permissions of usernotes correctly.

Basically the usernotes are plain-text entries that hold comments from other (staff) members. Turn on these options to allow markup of text and insertion of smilies / images or even HTML

User Listing Options

vBulletin Options > vBulletin Options > User Listing Options

This section of the Admin Control Panel allows you to set options for the Member List including:

User Banning Options

vBulletin Options > vBulletin Options > User Banning Options

This section of the Admin Control Panel allows you to set the Banning Options for your forum along with IP bans.

BB Code Settings

vBulletin Options > vBulletin Options > BB Code Settings

Message Posting and Editing Options

vBulletin Options > vBulletin Options > Message Posting and Editing Options
Note:
This will increase the amount of disk space used by vBulletin for database storage.

Message Posting Interface Options

vBulletin Options > vBulletin Options > Message Posting Interface Options

Message Attachment Options

vBulletin Options > vBulletin Options > Message Attachment Options

Poll and Thread Rating Options

vBulletin Options > vBulletin Options > Poll and Thread Rating Options

Message Searching Options

vBulletin Options > vBulletin Options > Message Searching Options

Message Searching Options (vBulletin Internal Search)

vBulletin Options > vBulletin Options > Message Searching Options (vBulletin Internal Search)

Words to be Included Despite Character Limit

If there are special words that are important for your forum but are outside the word length limits you specified above, you may enter them here so that they will be included in the search index.

For example, a web-programming forum with a minimum word length of 4 characters might want to include 'PHP' in the search index, even though the word is only 3 characters long.

Separate each word with a space.

Search Index Maximum Word Length

Enter the maximum word length that the search engine is to index. The larger this number is, the larger your search index, and conversely your database is going to be.

Allow Search Wild Cards (yes/no)

Allow users to use a star (*) in searches to match partial words? (Eg: 'bu*' matches 'building' and '*bu*' matches 'vBulletin').

Message Searching Relevance Options (vBulletin Internal Search)

vBulletin Options > vBulletin Options > Message Searching Relevance Options (vBulletin Internal Search)
Note:
These settings only apply if you are using the vBulletin Search Engine. They do not apply if you are using Full Text Search.

Tagging Options

vBulletin Options > vBulletin Options > Tagging Options

Forums Home Page Options

vBulletin Options > vBulletin Options > Forums Home Page Options

Forum Listings Display Options

vBulletin Options > vBulletin Options > Forum Listings Display Options

Forum Display Options (forumdisplay)

vBulletin Options > vBulletin Options > Forum Display Options (forumdisplay)

Thread Display Options (showthread)

vBulletin Options > vBulletin Options > Thread Display Options (showthread)

Threaded / Hybrid Mode Options (showthread)

vBulletin Options > vBulletin Options > Threaded / Hybrid Mode Options (showthread)

Private Messaging Options

Admin Control Panel > vBulletin Options > vBulletin Options > Private Messaging Options

Private Messaging Enabled (yes/no)

Turns the entire private messaging system on and off.

Instant Messaging Support - Check for New Private Messages (yes/no)

Selecting 'Yes' for this option will cause the system to check the private message database every time a user loads a page, and will display a visible prompt if a new message has just been saved.

Maximum Characters Per Private Message (default: 5000)

Maximum characters to allow in a private message.

Set this to 0 for no limit.

Floodcheck - Minimum Time Between Messages (default: 60)

Private Message Flood Checking. Select the minimum time that must pass before a user can send another private message. This is to prevent a single user 'spamming' by sending lots of messages very quickly.

Set this to 0 to disable the option.

Default Messages Per-Page (default: 50)

This setting allows you to define the default number of messages displayed per-page on the private messages listings pages.

Maximum Messages Per-Page (default: 100)

This setting allows you to limit the number of messages users may display per page on the private messages folder view pages.

Allow Message Icons for Private Messages (yes/no)

Allow the use of the standard message icons for private messages.

Allow vB Code in Private Messages (yes/no)

Allow users to include vB Code in their Private Messages? (Such as [b], [i] etc.)

Allow Smilies in Private Messages (yes/no)

Allows users to include smilies in their Private Messages.

Allow [IMG] Code in Private Messages (yes/no)

Allows users to include [IMG] codes in their Private Messages.

Allow HTML in Private Messages (yes/no)

Allow users to include raw HTML code in their Private Messages?
(Strongly not recommended.)



Who's Online Options

The vBulletin Options > vBulletin Options > Who's Online Option allows you to control the display of http://www.example.com/forums/online.php.

Identifying Spiders on Who's Online

If you have set the "Enable Spider Display" to yes, the file includes/xml/spiders_vbulletin.xml is used to determine how a spider is identified.

The file looks similar to this:
<?xml version="1.0" encoding="ISO-8859-1"?>

<searchspiders>
    <spider ident="http://www.almaden.ibm.com/cs/crawler">
        <name>Almaden Crawler</name>
        <info>http://www.almaden.ibm.com/cs/crawler/</info>
        <email>crawler@us.ibm.com</email>
    </spider>
    <spider ident="Ask Jeeves">
        <name>AskJeeves</name>
    </spider>
    <spider ident="Googlebot">
        <name>Google</name>
    </spider>
    <spider ident="Mediapartners-Google">
        <name>Google AdSense</name>
        <info>https://www.google.com/adsense/faq</info>
        <email>adsense-support@google.com</email>
    </spider>
    Place additional spiders here!
</searchspiders>
If you want to add spiders to the list, you should add them in place of the red text (just before "</searchspiders>").

At the minimum, you should provide the ident attribute and the name tag. Other tags are simply for your information and not used. The ident attribute is used to distinguish a regular guest from a spider. The value of this attribute is looked up in the browsing user's user agent (what the user's browser identifies him/her as). If a match is found, the value of the name tag is displayed on Who's Online.

Search Engine Friendly Archive

Admin Control Panel > vBulletin Options > vBulletin Options > Search Engine Friendly Archive

Forum Archive Enabled (yes/no)

The Search-Friendly Archive works only under the Apache web server with PHP compiled as a module.

It provides a basic structure that search engines can spider to grab all the content on your site.

Display Simple View of Threads (yes/no)

By default, threads in the Archive are displayed in a simple manner. Set this to no to have the real threads linked from the archive.

Forum Archive Threads Per Page (default: 250)

The number of threads to display per page in the threads listing.
This is done on a per-forum basis.

Forum Archive Posts Per Page (default: 250)

The number of posts to display per page in the thread listing.
Note:
On your own forum you can find the Archive here: http://www.yourforum.com/forumdir/archive/
(live example: http://www.vBulletin.com/forum/archive/)

Admin Control Panel Options

Admin Control Panel > vBulletin Options > vBulletin Options > Admin Control Panel Options

Control Panel Style Folder

This setting allows you to specify an alternative style for the Admin / Moderator Control Panels, based on a folder contained within the 'cpstyles/' folder. The style you select here will be displayed to all Moderators, and any Administrators who have not expressed their own preference.

Comes default with 5 different Admin Control Panel Styles to choose from. You can set a default here, but upon login one could select the style they prefer.

Folders in the 'cpstyles' folder must contain at least the following:

- controlpanel.css
- cp_logo.gif
- cp_help.gif

Timeout Admin Login (yes/no)

After a period of inactivity, Administrators are logged out of the Admin Control Panel. If this option is set to yes, the inactivity period will be the same as the Cookie Timout setting found in vBulletin Options -> Help Cookies and HTTP Header Options (defaults to 15 minutes). If this option is disabled, then the period will be one hour.

Logins to the admincp are more secure with this enabled.

Control Panel Quick Statistics (yes/no)

Displays the 'Quick Stats' on the main index page of the Admin Control Panel.

Forum Manager Display

There are three options for the display of the Forum Manager:User Editor Columns

Number of columns to display in user editor. Smaller resolutions will probably want to set this to 1.

External Data Provider

Besides the main forums, the search friendly archive and the printable version of a thread, you can also choose to turn on the external data provider. (vBulletin Options > vBulletin Options > External Data Provider)

Here you can select which type can be turned on/off. You can choose between javascript, rss and/or xml.

When you are done, click the [Save] button to apply the changes.

Implementing the External Data Provider

The External Data Provider is used to syndicate this information to external websites. This feature uses the permissions for the Unregistered / Not Logged In usergroup. If that usergroup doesn't have permissions to view the forum, the feeds will not work.

Below are examples on how you can control what is shown on these websites.

To syndicate in a Javascript format you would call the following URL from your external site. This will require additional javascript on the external site (an example is listed below).
www.yourdomain.com/forumpath/external.php?type=js

Example Code:
<script src="http://www.yourdomain.com/forumpath/external.php?type=js" type="text/javascript"></script>
<script type="text/javascript">
<!--
for (i in threads)
{
document.writeln(threads[i].title + " (" + threads[i].poster + ")<br />");
}
//-->
</script>
The External Data Provider also gives alternative feeds in commonly used formats. These are useful if you have external readers or a script to read them already. These feeds are available in XML, RSS .91, RSS 1.0 and RSS 2.0 so it should fit a wide variety of readers. The system defaults to RSS 2.0 so if you leave off the type, that is what you get. RSS 1.0 and 2.0 feeds will include HTML markup and attachments unless &nohtml=1 is added to the feed url. Many aggregates support HTML markup and so posts will appear close to how they would appear when viewed on the forum.

The URLS to access these feeds are:
XML - www.yourdomain.com/forumpath/external.php?type=xml
RSS - www.yourdomain.com/forumpath/external.php?type=rss
RSS 1.0 - www.yourdomain.com/forumpath/external.php?type=rss1
RSS 2.0 - www.yourdomain.com/forumpath/external.php?type=rss2

You can refine the listings by specifying forumids in the path. For multiple forums separate them with a comma. This will limit the feed to the specified forums only. (Below example uses xml as type, but it works with rss, rss2, and js too)
http://www.vbulletin.com/forum/external.php?type=xml&forumids=1,2,3,4

Threads will be returned in descending order based on the date of their creation. Description information will be returned from the first post of the thread.

If &lastpost=1 is added to the feed URL, threads will be returned in descending order based on the date of the last post of the thread. Description information will be returned from the last post of the thread.

If vBulletin Options > External Data Provider > Enable Podcasting is enabled, the first attachment of the post will also be returned within an <enclosure> tag. The enclosure tag is used within iTunes and other RSS aggregates to allow files to be downloaded from the feed.

Error Handling & Logging

Admin Control Panel > vBulletin Options > vBulletin Options > Error Handling & Logging

Log Database Errors to a File

If you would like to log all database errors to a file, enter the path to the file here. The file will be saved as {filename}.log.
Note:
Please note that the directory in which this file is to be created must be writable by the web server.
Log Failed Admin Control Panel Logins to a File

If you would like to log all failed Admin Control Panel login attempts to a file, enter the path to the file here. The file will be saved as {filename}.log
Note:
Please note that the directory in which this file is to be created must be writable by the web server.
Log PHP Errors to a File

If you would like to log all PHP fatal errors to a file, enter the path to the file here. The file will be saved as {filename}.log.
Note:
Please note that the directory in which this file is to be created must be writable by the web server.
Log Emails to a File
If you would like to log all emails to a file, enter the path to the file here. The file will be saved as {filename}.log. You should only enable email logging if you suspect problems with the email system within vBulletin.
Note:
Please note that the directory in which this file is to be created must be writable by the web server.
Maximum File Size of Error Logs (default: 1048576)

If you would like your vBulletin error logs to be rotated when they reach a certain size, enter the maximum file size in bytes here.
1048576 bytes = 1 megabyte.

When a log file reaches this size, it will be renamed as {filename}{unix timestamp}.log and a new file will be created.

Set this value to 0 to disable log rotation.

Disable Database Error Email Sending (yes/no)

If you would like to prevent vBulletin from sending email to the $config['Database']['technicalemail'] address you specified in config.php, set this value to 'Yes'.

Paid Subscriptions

vBulletin Options > vBulletin Options > Paid Subscriptions

Paid Subscription Email Notification
An email will be sent to this email address when a paid subscription is purchased or reversed.
Note:
The main Paid Subscription settings are found at Paid Subscriptions > Paid Subscription Manager. The main manual section relating to Paid Subscriptions can be found here

Plugin/Hook System

Admin Control Panel > vBulletin Options > vBulletin Options > Plugin/Hook System

Enable Plugin/Hook System (yes/no)

This setting allows you to globally enable or disable the plugin/hook system.

The plugin/hook systems allows for insertion of arbitrary code into specific locations in the PHP files without having to edit the files (see Plugin Manager). This can be used to extend the functionality of vBulletin without hacking. When upgrading to future versions you do not have to re-apply these modifications to the original vBulletin files, making upgrading an easier task.

By switching the system off, only vBulletin-native code will be run, so it can be used to establish whether errors exist within vBulletin itself or in plugin code.
Note:
You can code these plugins yourself or download existing ones from the official resource community at http://www.vBulletin.org/. Please note that these plugins are unofficial and are not supported by Jelsoft.
Warning:
If you have attempted to import a product or a plugin and run into the problem of being unable to navigate/work with your forum or control panel you might require to update the config.php file with this variable, which will force-disable the hook system. Allowing you to restore your forum and uninstall the bad code/plugin.
define('DISABLE_HOOKS', true);
(Remove from the config.php file when done.)

Spam Management

vBulletin Options > vBulletin Options > Spam Management

vBulletin Anti-Spam Key Powered by Akismet
Enter a vBulletin Anti-Spam service key to enable scanning of user data where supported.

You can get an anti-spam key here: http://www.akismet.com

Spam Scanning Post Threshold
This setting controls how many of a user's posts will be scanned by the Anti-Spam Service. Once a user's post count exceeds this threshold, his or her posts will not be scanned for spam content. To always scan posts set this value to 0.

Download / Upload Options

vBulletin gives you the ability to download and upload options settings for installed products, including vBulletin itself.

To download options choose Download / Upload Options from the vBulletin Options section of the admin control panel.

From there you can choose the product you wish to download, vBulletin will export a XML file that you can use at a later date to upload.

To upload settings for a product, on the same Download / Upload Options page there is a section to Import Settings XML File, from there you can choose a file to upload.

Backup / Restore Options

From the main vBulletin Options section, there is the ability to backup the options of each product including vBulletin itself.

This is useful when backing up a board or moving an install from one site to another, or for replicating a board from a test environment to a live site, or visa versa for testing purposes.

To download and back the settings, choose the product you wish to download from the select list and click backup.

To restore either upload the XML file from your computer or restore the XML file from your server, do that by either locating the file to upload then clicking restore or giving the path to the XML settings file on your local server, then clicking restore.

Blacklisted settings by default are ignore, though you can override that with the option during restore.

Blacklisted options are ignore because they are specific to the server and local settings and will need to be changed when moved so its better to use the local setting of the server you are restoring to, by default the following are blacklisted :Settings can be added and removed from the blacklist in debug mode.

Search Type

vBulletin supports two types of search indexing. Fulltext searching uses a search index that is constructed by MySQL itself, whereas vBulletin's own search feature uses its own index.

You set the search type here:

Admin CP -> vBulletin Options -> Search Type

By default, vBulletin will use its internal indexing feature. The results of this indexing process is stored in two tables, word and postindex. This provides a fast search mechanism but can cause problems on larger forums due to the ever increasing size of these tables. Each unique word is indexed in the word table and each occurrence of the word is indexed in the postindex table. To get around the large amount of space these tables can occupy we implemented MySQL Fulltext Search. The search type screen allows you to switch between the two of these. It is a simple toggle so submitting the screen switches between the two modes.

When switching a forum to the fulltext search mode, you will want to consider emptying the indices that the default search engine built. These indices are not used by the fulltext search and consume a large portion of your database. You should be certain that you are going to permanently use the fulltext search before removing these indices since, generally, it takes a lot of time and server load to rebuild these indices. Another consideration is during any time that the fulltext option is enabled, these indices will not be updated by any new posts. Using fulltext search for an extended period of time will leave these indices stale and you may still wish to rebuild them.
Note:
The minimum and maximum length of words to be indexed is defined by the ft_min_word_len and ft_max_word_len system variables (available as of MySQL 4.0.0). The default minimum value is four characters. The default maximum depends on your version of MySQL. If you change either value, you must rebuild your FULLTEXT indexes. For example, if you want three-character words to be searchable, you can set the ft_min_word_len variable by putting the following lines in an option file:

[mysqld]
ft_min_word_len=3

Then restart the server and rebuild your FULLTEXT indexes. Also note particularly the remarks regarding myisamchk in the instructions following this list.

For more on Fulltext Search from MySQL please visit:
http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html
You can also empty these indices in the Update Counters section of Maintenance.

You may want to optimize the postindex and word tables afterwards by going to the Repair / Optimize Tables section of Maintenance.

Human Verification

The Human Verification system is designed to stop the spamming of forums by automated processes.

This system will not stop spammers who manually spam your forums as there is nothing that can prevent those users. The spammers who uses programs to mass spam are the larger issue and this system goes along way towards foiling them.

An Introduction to Human Verification

There are three Human Verification options provided as of vBulletin 3.7.The human verification option is selected in the Human Verification Manager. From here, you may choose the library to use and set options specific to the library.

Image Verification

Image Verification Options

The difficulty of the image verification image can be controlled with these settings. The more options that are enabled, the more difficult it will be for your users to identify the text. Enabling a setting will cause that option to be applied to each character.The fonts and the background images that are used for Image Verification can easily be changed. Making your image verification unique is key to making it successful. The fonts are located in the images/regimage/fonts directory of your forum. You may upload any .TTF (True Type Font) here. Image Verification will immediately begin to use your font. The background images are located in the images/regimage/backgrounds directory of your forum. You should use 201x61 pixel jpg images for backgrounds. Uploaded background images will immediately by used by your forum.

Image Verification Library

vBulletin provides two options for generating the dynamic image verification image.

The first is GD, which is bundled with PHP 4.3.0 and later. The GD v2+ library is required along with having PHP compiled with freetype2 support. Having PHP compiled with freetype1 will sometimes result in the font not displaying.

The second supported library is ImageMagick v6 by ImageMagick Studio LLC. ImageMagick is an executable binary that must be installed at the server level to be called by PHP. Only the identify and convert binaries from ImageMagick are required by vBulletin. Imagemagick must be compiled with Freetype support in order to display the proper image verification.

If you do not have ImageMagick available, then your Image Verification options will look like this instead of the image at the top of the page:

Question & Answer Verification

Question & Answer Options

An unlimited amount of questions may be specified and each question may have an unspecified amount of answers.

To add a new question, select the [Add New Question] button. Existing questions may be deleted, modified or have answers modified by selecting the controls on the right of the question.

Before adding any questions, the following screen will be shown:

New Questions

The following screen is presented to you after selecting to [Add New Question]

Question - This is the question that the user will be asked to solve.

Regular Expression - You may require the answer to match a PCRE-type regular expression. You are not required to provide answers to a question if you choose to define a regular expression as satisfying the answer. You may also offer both a regular expression and a list of answers if you wish.

(Do not start or end the expression with an escape character)

Examples:
^[A-Z]+$ - Characters from A-Z only
^[A-Z ]+$ - Characters from A-Z including space
^[A-Z0-9 ]+$- Alphanumeric characters including space
^[\x20-\x7E]+$ - ASCII characters from 32-127

See PHP.net for more information on regular expressions.

Answers may be added after the question is saved.

Adding Answers

Modifying Questions

The following screen is presented to you after selecting to edit an existing question

Question - This is the question that the user will be asked to solve. You may translate it into other languages by using the Translations link.

Regular Expression - You may require the answer to match a PCRE-type regular expression. You are not required to provide answers to a question if you choose to define a regular expression as satisfying the answer. You may also offer both a regular expression and a list of answers if you wish.

(Do not start or end the expression with an escape character)

Examples:
^[A-Z]+$ - Characters from A-Z only
^[A-Z ]+$ - Characters from A-Z including space
^[A-Z0-9 ]+$- Alphanumeric characters including space
^[\x20-\x7E]+$ - ASCII characters from 32-127

See PHP.net for more information on regular expressions.

You may add a new answer by selecting the [Add New Answer]. Existing answers can be modified or deleted by using the controls to the right of the answer.
Modifying Answers
The following screen is presented to you after selecting to modify an answer

The answer supplied by the user must match exactly, except for case. Lowercase uppercase will be treated the same when evaluating responses.

reCAPTCHA Verification

Before reCAPTCHA verification will function, you must acquire a public and private key from recaptcha.net. This key is free, you simply must provide the domain that your forum is running on. Once you've acquired the keys, they must be entered in the fields, as pictured above.

Private Key - Acquired from recaptcha.net
Public Key - Acquired from recaptcha.net
Theme - There are three themes, at the time of this writing, for which the recaptcha form will display.

You can also leave the Public and Private keys blank then the default keys will be used. However, this is not recommended if there are multiple vBulletin installations on the same server. If you are leaving the keys blank, the screen will appear as follows:

Social Bookmarking

Social bookmarking is a way for users to store and organise bookmarks of web pages. In a social bookmarking system, a user will save a link to web pages that they want to remember and/or share. There are a number of third party services offering social bookmarking facilities, vBulletin provides the ability to link directly to an add page and pre-populate the data.

When a user views a publicly accessible thread they will be presented with a set of links at the bottom which allow the addition of the page to admin defined social bookmarking sites.

The Social Bookmarking Manager

The social bookmarking manager is where you create new and edit bookmark sites. Bookmark sites are shown in the order they will actually display in; you can quickly change this order by clicking the arrows next to the text fields or changing the numbers in the fields and clicking "Save".

Adding or Editing a Social Bookmarking Site

When you are adding or editing a new social bookmark site you will be presented with the following editor, further explanation about each of these fields is listed below.

A list of additional social bookmarking sites and their icons and links can be found in the community managed listing found here:

Social Bookmarking Sites

Styles & Templates

The Styles & Templates section allows you to change the fonts, colors or the html of any section of the board to your preference.

The first part of this section of the vBulletin Manual deals with how the vBulletin 3 style system actually works, and includes a reference guide for various important elements.
vBulletin 3 Style Reference

The second part deals with using the tools provided to you in the Style & Templates area of the Admin CP.
The Style Manager
Note:
To modify the look and feel of your vBulletin forums, a knowledge of XHTML 1.0 and CSS 1.0 is required. To learn the basics of these markup languages please visit W3schools.com. If you have questions please visit our community forums.

vBulletin 3 Style Reference

The vBulletin Styles system is the interface through which you can configure the way that your visitors see your board.

A variety of controls are available for your use, allowing you to make both minor changes, such as the font used for the interface, right through to changing the underlying HTML used to generate the board's individual pages.

The look of your board can be altered to your own custom preferences through a simple-to-use interface that allows you to change fonts, colors and images etc. If you want to get down and dirty with the underlying HTML of the board, you can also do this by editing individual templates via the Style Manager.

A vBulletin 3 style comprises several elements that work together to create a complete look for your board.

Those components are as follows:

Templates

How do Templates Work?

The pages you see making up the user-side of vBulletin are generated using a number of templates. Templates are fragments of XHTML code interspersed with PHP variables. These combine together to form complete XHTML pages that are served up to visitors.

A simple example template might look like this:
<table class="tborder">
<tr>
    <td class="tcat" colspan="2">My Table</td>
</tr>
$tablebits
</table>
The $tablebits PHP variable represents an area of the template that will be replaced with either some data, or additional template contents.

For example, we may have another template that looks like this:
<tr>
    <td class="alt1">$username</td>
    <td class="alt2">$message</td>
</tr>
This template would have the $username and $message variables substituted with the appropriate username and message.
<tr>
    <td class="alt1">Mister User</td>
    <td class="alt2">This is my message</td>
</tr>
The template would then be repeated as many times as necessary, replacing the variables with the username and message for each repetition. Finally, this completed block of XHTML would be inserted into the first template, replacing the $tablebits variable, resulting in a complete block of code like this:
<table class="tborder">
<tr>
    <td class="tcat" colspan="2">My Table</td>
</tr>
<tr>
    <td class="alt1">Mister User</td>
    <td class="alt2">This is my message</td>
</tr>
<tr>
    <td class="alt1">Another Person</td>
    <td class="alt2">This message is in reply to that posted above.</td>
</tr>
<tr>
    <td class="alt1">Mister User</td>
    <td class="alt2">Hey, thanks for responding to my message!</td>
</tr>
</table>
This resulting code can then be passed on to the visitor's web browser for display.

Template Conditionals

Template Conditionals are a powerful tool for controlling the XHTML output from your templates. They allow you to create simple if/else branches within your templates, in order to display different content depending on the condition you specify.

For example you may want to show a different welcome message on the front page of your board to registered users and to guests. The way to know whether or not the person visiting a page is a guest, or a logged-in user is to check the value of $bbuserinfo[userid]. If the value is 0, the visitor is a guest (or not logged-in), otherwise the visitor is a registered member.

This is a simple conditional to show a welcome message to guests only.
<if condition="$bbuserinfo['userid'] == 0">
    <p>Welcome to the forum!<br />
    If this is your first visit, we hope you enjoy your stay!</p>
</if>
The previous example used a simple 'if' condition. We can extend that to include an 'else' condition, which will be used if the 'if' condition is not fulfilled.

This example extends the previous conditional to show a different message to registered members from that shown to guests.
<if condition="$bbuserinfo['userid'] == 0">
    <p>Welcome to the forum!<br />
    If this is your first visit, we hope you enjoy your stay!</p>
<else />
    <p>Welcome back, $bbuserinfo[username].<br />
    <a href="search.php?do=getnew">Click here to view new posts</a>.
</if>
The actual syntax of vBulletin template conditionals is fairly straight forward. To begin a conditional, you simply start an <if> tag. The <if> tag accepts a single attribute, that being 'condition'. The value of the condition attribute contains an expression written in PHP. After the opening <if> tag comes the HTML that should be expressed if the condition is met. The conditional terminates with a closing </if> tag.

Perhaps the easiest way to illustrate this is to demonstrate a simple example of PHP code being embedded as a template conditional.

Let us assume for the purposes of this example that we want to have the equivalent of this PHP code in our template:
if ($my_variable == 1)
{
    echo 
"<p>My variable is equal to one.</p>";

This could be expressed as a template conditional in the following way:
<if condition="$my_variable == 1">
    <p>My variable is equal to one.</p>
</if>
If we were to extend our PHP code to include an 'else' condition as follows...
if ($my_variable == 1)
{
    echo 
"<p>My variable is equal to one.</p>";
}
else
{
    echo 
"<p>My variable is not equal to one.</p>";

... then our template conditional would be extended thus:
<if condition="$my_variable == 1">
    <p>My variable is equal to one.</p>
<else />
    <p>My variable is not equal to one.</p>
</if>
Furthermore, we may want to extend our PHP with an 'else if' condition:
if ($my_variable == 1)
{
    echo 
"<p>My variable is equal to one.</p>";
}
else if (
$my_variable == 2)
{
    echo 
"<p>My variable is equal to two.</p>";
}
else
{
    echo 
"<p>My variable is equal to neither one nor two.</p>";

vBulletin template conditionals do not natively support 'else if', but you can easily replicate its behavior by nesting conditionals as follows:
<if condition="$my_variable == 1">
    <p>My variable is equal to one.</p>
<else />
    <if condition="$my_variable == 2">
        <p>My variable is equal to two.</p>
    <else />
        <p>My variable is equal to neither one nor two.</p>
    </if>
</if>
Using PHP Functions in Template Conditionals
As a security precaution, to prevent malicious damage to either your database or your server itself, most PHP functions are disallowed in template conditionals.

This, for example, would be disallowed by the vBulletin template system, as it contains a call to a 'forbidden' function: mysql_query.
<if condition="$my_variable = mysql_query('SELECT * FROM mytable')">
    <!-- naughty naughty... -->
</if>
At the time of writing, the list of allowed 'safe' functions is as follows:
Note:
Functions marked * are custom functions defined by vBulletin itself. Each function name is a link that will take you to the documentation for that function. Use of these functions requires knowledge of PHP
This is an example of 'safe' functions being used in a template conditional:
<if condition="isset($my_variable) AND is_browser('ie')">
    <!-- $my_variable is set and the browser is Internet Explorer -->
</if>

Collapsing Elements

The vBulletin styles system allows you to create elements within templates that can be collapsed (hidden) when a visitor clicks a button. The collapsed state of elements is saved to a cookie, so when the visitor returns to that page, the elements they have collapsed will remain collapsed until they click the button to expand them again.

A collapsible element, shown expanded and collapsed

To add collapsible elements to your own custom templates is fairly straight-forward, and requires that you follow a few simple rules.

Firstly, you need to decide on a unique identifying name for your collapsing element. The name can use numbers, letters (in upper or lower case) and underscores. Using any other characters in the identifier may cause problems.

Here, we'll call it MyELEMENT.

A collapsible element consists of two parts - a control (usually a button) to control the expanding and collapsing behavior, and the actual content to be expanded and collapsed.

A collapse control looks like this:
<a href="#top" onclick="return toggle_collapse('MyELEMENT')"><img
    id="collapseimg_MyELEMENT"
    src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_MyELEMENT].gif"
    alt="" border="0" /></a>
In this example, you can see that the MyELEMENT identifier crops up in several places in the XHTML code. This should be replaced with whatever word you choose for your own identifier.
Note:
In the example, the image being used for the collapse control has a prefix of collapse_thead. This is because the image is designed to blend into the background color of elements using the '.thead' CSS class.

There are also images to blend with the '.tcat' and '.alt1' / '.alt2' CSS classes, with prefixes of collapse_tcat and collapse_alt respectively.
The second part of a collapsible element is a container in which the collapsible content sits.

A very simple example of a collapsible element container for MyELEMENT looks like this:
<div id="collapseobj_MyELEMENT" style="$vbcollapse[collapseobj_MyELEMENT]">
    <!-- any HTML here will be hidden when the
    'MyELEMENT' collapse control is clicked -->
</div>
If you want to add additional styling to the 'style' attribute of the container, you can do so by adding a semi-colon after the $vbcollapse[collapseobj_MyELEMENT] code and continuing as normal.

The following example shows a complete collapsing element.
<div class="tborder">
    <div class="tcat" style="padding:4px">
        <a href="#top" style="float:$stylevar[right]"
            onclick="return toggle_collapse('MyELEMENT')"><img
            id="collapseimg_MyELEMENT"
            src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_MyELEMENT].gif"
            alt="" border="0" /></a>
        Click this button to show/hide the content below:
    </div>    
    <div id="collapseobj_MyELEMENT" style="$vbcollapse[collapseobj_MyELEMENT]">
        <div class="alt1" style="padding:8px">
            <p><strong>Hello!</strong> Welcome, $bbuserinfo[username].</p>
            <p>If you would like to check your private messages, 
            <a href="private.php?$session[sessionurl]">Click here</a>.</p>
        </div>
    </div>
</div>
When expanded, this example produces a layout like this:

And when collapsed, the same code produces this:

Collapsing <table> Rows
On the previous page, we discussed creating collapsible elements in your customized templates.

Sometimes you will want to allow your users to collapse individual rows (or groups of rows) within an HTML <table>. In order to be cross-browser compatible, and to ensure that your pages remain XHTML compliant, there are a few additional rules you need to follow.

It is not possible to arbitrarily collapse every tag in HTML. To collapse rows within a <table>, you must surround those rows with the little-known <tbody> tag.

The original idea of the <tbody> tag was to enable browsers to display the top (head) and bottom (foot) of a table, and then load the body of the table in between the head and foot. Unfortunately, very few browsers can actually make use of this system.

However, the <tbody> tag is very useful to us, as it allows us to define a container for one or more table rows, and we can expand and collapse that container using our collapsible elements system.

There is one caveat. In order to be legal XHTML, we can't just stuff <tbody> tags selectively around arbitrary groups of rows in a table, and leave the other rows without a container. We must include the <thead> tag, and ensure that all rows in the table are enclosed either by the <thead> or a <tbody> tag.

The following code is not XHTML compliant because it does not include the <thead> tag, and there are rows that are not enclosed by <thead>, <tbody> or <tfoot> tags:
<table class="tborder" cellpadding="$stylevar[cellpadding]" width="100%">
<tr><td class="tcat"><strong>Table title</strong></td></tr>
<tbody>
    <tr><td class="alt1">First row of collapsible element</td></tr>
    <tr><td class="alt2">Second row of collapsible element</td></tr>
</tbody>
<tr><td class="alt1">Another row</td></tr>
</table>
On the other hand, this next block of code is valid XHTML. Notice that the first row of the table is enclosed with <thead> tags, and all other rows in the table are enclosed by a <tbody> container.
<table class="tborder" cellpadding="$stylevar[cellpadding]" width="100%">
<thead>
    <tr><td class="tcat"><strong>Table title</strong></td></tr>
</thead>
<tbody>
    <tr><td class="alt1">First row of collapsible element</td></tr>
    <tr><td class="alt2">Second row of collapsible element</td></tr>
</tbody>
<tbody>
    <tr><td class="alt1">Another row</td></tr>
</tbody>
</table>
Here is that same block of code with the first two content rows set to allow collapsing:
<table class="tborder" cellpadding="$stylevar[cellpadding]" width="100%">
<thead>
    <tr><td class="tcat">    
    <a href="#top" style="float:$stylevar[right]"
        onclick="return toggle_collapse('MyELEMENT')"><img
        id="collapseimg_MyELEMENT"
        src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_MyELEMENT].gif"
        alt="" border="0" /></a>
    <strong>Table title</strong>
    </td></tr>
</thead>
<tbody id="collapseobj_MyELEMENT" style="$vbcollapse[collapseobj_MyELEMENT]">
    <tr><td class="alt1">First row of collapsible element</td></tr>
    <tr><td class="alt2">Second row of collapsible element</td></tr>
</tbody>
<tbody>
    <tr><td class="alt1">Another row</td></tr>
</tbody>
</table>
When expanded, this code will result in a table looking like this:

... and when collapsed, the same code produces this:

vBMenu Popup Menus

vBulletin 3 styles provide a mechanism for creating popup menus, called vBMenu. This system allows complex or less-frequently used functionality to be hidden from immediate view, which results in a less cluttered and intimidating user interface for novice users.

You can add new vBMenu popups to your custom templates by following a few simple rules.

A vBMenu popup consist of two elements: The popup control, and the popup itself. Any popup can have any number of controls, and clicking any one of the controls will open the popup immediately below the control.

Each vBMenu popup must have a unique identifying name, which will be used by the vBMenu system to distinguish popups from each other and allows popup controls to communicate with their associated popup elements.

For our example, we will call our vBMenu MyMENU.

The HTML code for a vBMenu popup control looks like this:
<td id="MyMENU" class="vbmenu_control">
    <a href="#">My vBMenu Example</a>
    <script type="text/javascript">
        vbmenu_register("MyMENU");
    </script>
</td>
The constituents of a vBMenu control, as seen in the code above are:If you would like to prevent the small menu image from appearing next to the text in the control, you can achieve this by adding a second argument of true to the vbmenu_register Javascript function, like this:
<script type="text/javascript">
    vbmenu_register("MyMENU", true);
</script>
The HTML code for the vBMenu popup element itself looks like this:
<div class="vbmenu_popup" id="MyMENU_menu" style="display:none">
    <!-- Any HTML here will be a part of the
    vBMenu popup identified as 'MyMENU' -->
</div>
The constituents of the vBMenu popup element itself are very simple, and are based around the attributes applied to a <div> tag, which will surround any content we want to be a part of the popup. This <div> tag must obey the following rules:Any HTML content can be placed between the opening and closing tags of this <div> element, and will act as the body of our popup.
vBMenu Popup Content
While any valid HTML can be inserted into the <div> element that defines the reaches of a vBMenu popup, there are a few systems and standards in place to help you achieve a consistent look and feel for your menus.

vBMenu popups usually take the form of a <table> with individual rows for separate options on the menu, with a single hyperlink inside each cell, which points to the desired page.

As you can see from the image above, each row switches its style when the mouse pointer hovers over it. This mouse-over effect is achieved automatically with the vBMenu system, and makes use of the Popup Menu Option Row (.vbmenu_option) CSS class and its partner, the Popup Menu Highlighted Option (.vbmenu_hilite) CSS class.

An example of content for a vBMenu popup element might look like this:
<table cellpadding="4" cellspacing="1" border="0">
<tr>
    <td class="thead">This is my example vBMenu</td>
</tr>
<tr>
    <td class="vbmenu_option"><a href="index.php">Home Page</a></td>
</tr>
<tr>
    <td class="vbmenu_option"><a href="usercp.php">User CP</a></td>
</tr>
</table>
If for whatever reason you want to prevent the style switching behavior of elements using the .vbmenu_option CSS class, you can do so by adding a title attribute with a value of nohilite to the appropriate element, like this:
<tr>
    <td class="vbmenu_option" title="nohilite">
        This row will not hilight on mouse-over.
    </td>
</tr>
Multiple Popup Controls, Single vBMenu Popup
As previously mentioned, any vBMenu popup can have any number of popup controls.

To achieve this, it is necessary to slightly alter the code for each popup control.

With a single control, the id attribute of the popup control uses the unique identifier for the vBMenu it controls, like this:
<td id="MyMENU" class="vbmenu_control">
    <a href="#">Single Popup Control</a>
    <script type="text/javascript">
        vbmenu_register("MyMENU");
    </script>
</td>
To allow multiple controls to operate the same menu, it is necessary to add a unique suffix to each control's identifier, which takes the form of a period followed by the unique suffix, as shown here:
<td id="MyMENU.first" class="vbmenu_control">
    <a href="#">First Multiple Popup Control</a>
    <script type="text/javascript">
        vbmenu_register("MyMENU.first");
    </script>
</td>
<td id="MyMENU.second" class="vbmenu_control">
    <a href="#">Second Multiple Popup Control</a>
    <script type="text/javascript">
        vbmenu_register("MyMENU.second");
    </script>
</td>
The $show['popups'] Conditional
Some web browsers lack the ability to use the vBMenu system.

In order to prevent these browsers from attempting to initialize menus that they can't use, a special template conditional is used.

$show['popups']

By surrounding all vBMenu controls and popups in a conditional that checks the value of $show['popups'], Javascript errors can be avoided, and alternative HTML can be shown to browsers that can't use popups.

For example:
<if condition="$show['popups']">

    <!-- content here is for browsers that
    are able to use the vBMenu system -->
    
<else />

    <!-- content here is shown to browsers
    that are unable to use vBMenu popups -->
    
</if>
Example vBMenu HTML Code
The following code will generate a complete vBMenu popup and a single associated control, and will also show an alternative HTML layout for incompatible web browsers.
<if condition="$show['popups']">

    <!-- start vBMenu control element -->
    <table class="tborder" cellpadding="4" cellspacing="1">
    <tr>
        <td id="MyMENU" class="vbmenu_control">
            <a href="#">Second Multiple Popup Control</a>
            <script type="text/javascript">
            <!--
            vbmenu_register("MyMENU");
            //-->
            </script>
        </td>
    </tr>
    </table>
    <!-- end vBMenu control element -->
    
    <!-- start vBMenu popup element -->
    <div class="vbmenu_popup" id="MyMENU_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
            <td class="thead">This is my example vBMenu</td>
        </tr>
        <tr>
            <td class="vbmenu_option"><a href="index.php">Home Page</a></td>
        </tr>
        <tr>
            <td class="vbmenu_option"><a href="usercp.php">User CP</a></td>
        </tr>
        </table>
    </div>
    <!-- end vBMenu popup element -->
    
<else />

    <!-- start alternative, non-vBMenu content -->
    <table class="tborder" cellpadding="4" cellspacing="1">
    <tr>
        <td class="vbmenu_control"><a href="index.php">Home Page</a></td>
        <td class="vbmenu_control"><a href="usercp.php">User CP</a></td>
    </tr>
    </table>
    <!-- end alternative content -->

</if>
Disabling the vBMenu System
Should you wish to disable the vBMenu system completely, displaying non-popup content to all visitors regardless of their web browser's capabilities, you can do this by going to vBulletin Options > Style & Language Options and setting the Use 'vBMenu' DHTML Menus? setting to No.

After clicking the [Save] button, the $show['popups'] will be set to false for all visitors, and anyone visiting the site will be shown the alternative, no-popups layout.

The Legacy Postbit Template

The template in which most messages are displayed is called postbit. With the release of vBulletin 3, the layout of the postbit template was altered radically, changing from a system of two columns with user information in the left column and the message in the right to a system of two rows, with user information displayed above the message.

New Postbit

Old (Legacy) Postbit

While most people prefer the new layout of the postbit template after using it for a short time, there are others who are less willing to make the change.

If you would like to run your board using the old-style postbit template, you can do so by going to vBulletin Options > Style & Template Options and switching the Use Legacy (Vertical) Postbit Template? setting to Yes.

After clicking the [Save] button, all your styles will use the Legacy (old style) Postbit.
Note:
If your board is set to use the Legacy Postbit template you should be aware that you will need to make any postbit-related template customizations to the postbit_legacy template instead of the postbit template.

Including External Files

Warning:
This is considered modifying the code. To get further help and support with including external files you will need to visit http://www.vbulletin.org/.
If you have a PHP or HTML file that you want to include in your vBulletin forum, create a plugin that references that file. Then add a variable to the template of your choice where that file's contents should appear.
Note:
The Plugin system must be enabled in vBulletin Options -> Plugin System for plugins to work. It is disabled by default.
Including an HTML file:
1. Create a Plugin for global_start with this code:
$includedhtml = implode('', file('path/to/this/file/myfile.html'));
Replace the path and filename with the correct path and filename of the HTML file you want to include. The contents of myfile.html will be copied to the variable $includedhtml.

2. Place $includedhtml in one of your templates, such as header, navbar, FORUMHOME, depending upon where you want the contents of your HTML file to appear.


Including a PHP file:
1. Create a Plug-in for global_start with these contents:
  ob_start();
  include('path/to/this/file/myfile.php');
  $includedphp = ob_get_contents();
  ob_end_clean();
Replace the path and filename with the correct path and filename of the PHP file you want to include. The code in myfile.php will execute and any output generated by this script will be stored in $includedphp.

2. Place $includedphp in one of your templates, such as header, navbar, FORUMHOME, depending upon where you want the contents of your PHP file to appear.
Warning:
Plugins that contain invalid or malicious code may cause your forum to stop functioning or even lead to data loss. Using Plugins is not supported and you'll be asked to disable them in the event that you request tech support. If a Plugin has made your forum inaccessible, please disable plugins. Troubleshooting errant plugins and products is handled at our sister site, http://www.vBulletin.org.
What is Output Buffering?

Most PHP files that you might wish to include in your forum contain echo or other output statements in your PHP file, it will break vBulletin because it is still in the process of initializing when it loads your PHP file. All echo and other output commands must be output buffered using ob_start, ob_clean, etc. commands. The output of your PHP script will be buffered for later use and inserted into a variable. All other statements in the PHP script will execute normally.

A word about variables.

It is very important that any variables initialized in your PHP script do not overlap built-in vBulletin variables or you will get unpredictable results. It may be advisable to create a PHP script just for inclusion in your forum rather than including a larger script used by another part of your website.

Variables are also subject to scope. You may need to access your variable out of the $global array like $global[variablename] instead of simply $variablename. You may also need work with a hook location that is more accessible to the template that you wish to alter.

Please see the PHP documentation for more information on variable scope:
http://www.php.net/manual/en/language.variables.scope.php

Placing braces around your variable can specify it explicitly in a template if it is part of a larger string. e.g. {$somevariable}

Which hook should I use?

The hook used above (global_start) makes your HTML or PHP file available in almost every template on your vBulletin forum. You may wish to include a PHP file or HTML file only on certain pages or parts of your forum. You'll need to select the correct hook where your code should be loaded. To determine which hook you should use, turn on Debug and then make this change to the appropriate functions php file.

How do I turn on debug mode?

Please note that you should not turn on debug mode in a live environment.

Open the config.php file.
At the top, on a new line below <?php
add: $config['Misc']['debug'] = true;
Note:
If you wish to include() multiple PHP files, make sure you use ob_clean() before each include() to reset the buffer.

CSS

Not to be confused with XSS, CSS stands for Cascading Style Sheets.

For the most part, vBulletin hides the nitty-gritty of editing CSS from you, instead presenting you with a user-friendly interface in the Style Manager in which to enter values to control the styling of your board. However, in the interest of a knowledge of what is going on behind the scenes in the vBulletin style system, we'll talk a little about CSS here.

CSS is a system designed to allow the style of a web site to be separated from the content itself.

Before CSS, web sites had to include HTML code defining how to display content along with the content itself. For example, to display a page of text using a bold, red, medium-sized font, it was necessary to include <font> tags in the actual content:
<p><font size="2" face="verdana, arial, helvetica, sans-serif" color="red">
    <b>This is my first paragraph.</b>
</font></p>

<p><font size="2" face="verdana, arial, helvetica, sans-serif" color="red">
    <b>This is my second paragraph.</b>
</font></p>

<p><font size="2" face="verdana, arial, helvetica, sans-serif" color="red">
    <b>This is my third paragraph.</b>
</font></p>
As is clearly demonstrated by the previous example, the HTML code has two problems. Firstly, the display code actually represents more HTML than the content itself, and secondly, it is necessary to repeat the same display code over and over.

The net result is HTML code that is bloated by display-related code. Worse still, if we decided at a later date that we wanted to change all the text on our site to use an italic, blue font rather than a bold, red font, we would have to edit the HTML code of every page on the site.

CSS allows us to get away from this far-from-ideal situation by allowing us to define style rules, known as classes.

We could set up a class wherein all content with the class applied would appear with our bold, red, medium-sized font. For now, we'll call this 'myclass'.
<p class="myclass">This is my first paragraph.</p>

<p class="myclass">This is my second paragraph.</p>

<p class="myclass">This is my third paragraph.</p>
You can see from this example that there is now significantly less HTML code needed, and that there is no inherent display-related code visible.

The CSS code that defines 'myclass' looks like this:
<style type="text/css">
<!--
.myclass
{
    font: bold 10pt verdana, arial, helvetica, sans-serif;
    color: red;
}
-->
</style>
With this system, were we to decide that we wanted to change all our text to use the italic, blue font, we would not need to edit our HTML content at all. Rather, we would simply change the style rules defined in 'myclass', and all the text with 'myclass' applied would automatically reflect the change.

Better still, the class definitions can be kept entirely separate from the HTML code by putting them into a .css file and linking to the file from each HTML page. Therefore, updating a single .css file can change the style of an entire web site, without having to edit a single HTML file.

To demonstrate the extent of use of CSS in vBulletin, here is a comparison of a page from the vBulletin.com web site shown with and without CSS.

A page from vbulletin.com shown with and without CSS applied

For a more complete discussion of exactly what CSS is, and how to use it, visit the following sites:The following sections list and explain all the CSS classes and definitions used by vBulletin, so you can edit them with confidence, knowing exactly what they control, where to use them, and how your edits will affect the look of the system.

Body

CSS Selector: body

Applied directly to the <body> tag of every vBulletin page, the Body class is arguably the most important of the CSS classes used by vBulletin.

Its main use is to control the background color of the outermost portion of pages.

Unless overridden by subsequent CSS classes, the Body class also sets the color of all text seen on vBulletin pages.

All links in the outermost portion of vBulletin pages, and for that matter, all links unless overridden by subsequent CSS classes, will be controlled by the Body class.

Example of element using this class:
<body>
<!-- The BODY tag uses this class -->
</body>

Page Background

CSS Selector: .page

The majority of content on vBulletin pages is contained within an inner-block that starts at the end of the header template and finishes at the beginning of the footer template.

In the default vBulletin style, this can be seen as the white surround of the main page content.

You may choose to have a blank value for the background color of this class. If you do so, the Page Background block will appear transparent, inheriting the background color of the Body class.

Leaving a blank value for the Page Background class results in a transparent block, inheriting the color defined by the Body class.

Example of element using this class:
<div class="page" style="width:100%; text-align:left">
<!-- The DIV tag above uses this class -->
</div>

<td>, <th>, <p>, <li>

CSS Selector: td, th, p, li

Some browsers will fail to fully or properly inherit the display settings for text specified in the Body class. The purpose of this class is to set in stone the desired display settings for text, so that less-than-cooperative browsers have no room for arbitrary interpretation of what you might have meant when you specified text display settings in the Body class.

For the best results, you should only specify values for font size and font family in this class.

Examples of elements using this class:
<p>This P tag uses the class in question</p>

<table>
<tr>
    <th>This TH tag uses the class in question</th>
    <td>This TD tag uses the class in question</td>
</tr>
</table>

<ul>
    <li>This LI tag uses the class in question</li>
</ul>

Table Border

CSS Selector: .tborder

The Table Border class is applied to the majority of table tags in vBulletin.

It controls the background color of tables, which is usually only seen in the margins between cells (the width of which is controlled by the Inner Border Width StyleVar).

The Table Border class is also often used to create a border around the outside of tables.

If the background color of the Table Border class is not specified (or is set as 'transparent'), the color of the borders between cells will appear the same as the background color of the Page Background class.

With a transparent background color, the margins between cells inherit the page background color.

Example of element using this class:
<table class="tborder" cellspacing="1" cellpadding="6">
<tr>
    <td>The TABLE tag above uses this class</td>
</tr>
</table>

Category Strips

CSS Selector: .tcat

The first use of the Category Strips CSS class is to provide the styling for the parts of forum listings that represent a no-posting forum (also known as a category).

Additionally, you will find that the top-most title bar of most tables in vBulletin uses the Category Strips class.

Generally you will use all the available fields when setting values for this class, including the main background color or image, the text color, size and style, and also specific values for any hyperlinks found inside elements using this class.

Example of element using this class:
<table class="tborder" cellspacing="1" cellpadding="6">
<tr>
    <td class="tcat">This TD tag uses this class</td>
</tr>
</table>

Table Header

CSS Selector: .thead

Like the Category Strips class, the Table Header class serves multiple purposes.

It primary use is to serve as a control mechanism for column headings in tables of data/results, acting as a label for each column.

The Table Header class can also be found acting as a sub-title for tables where a lot of information is displayed, in which case the Table Header class is used to style elements that act as a logical break between sections of the table.

Finally, you may also find the Table Header class used as the main title bar for certain small tables, such as the Posting Rules table seen on several pages in vBulletin.

Example of element using this class:
<table class="tborder" cellspacing="1" cellpadding="6">
<tr>
    <td class="thead">This TD tag uses this class</td>
</tr>
</table>

Table Footer

CSS Selector: .tfoot

Some tables in vBulletin include controls at the bottom of the table, or otherwise require some visual cues to show that the table finishes at a certain point. In these cases, the Table Footer class is used.

Like the Category Strips and Table Header classes, you will most likely want to use all the available fields for this class, including background color/image, text style and hyperlink options.

Example of element using this class:
<table class="tborder" cellspacing="1" cellpadding="6">
<tr>
    <td class="tfoot">This TD tag uses this class</td>
</tr>
</table>

First / Second Alternating Color

CSS Selectors: .alt1 and .alt2

When presenting data in a table, vBulletin will usually alternate the background color of cells to assist in readability.

The background colors used for these two alternating cells are controlled by the First and Second Alternating Color classes.

Generally, you will only want to control the background color field for these classes, although you are free to use all of the available fields to achieve any effect you desire.

Example of element using these classes:
<table class="tborder" cellspacing="1" cellpadding="6">
<tr>
    <td class="alt1">Tag using the First Alt. Color class</td>
    <td class="alt2">Tag using the Second Alt. Color class</td>
</tr>
</table>
The First / Second Alternating Color classes are extended by the Active First / Second Alternating Color classes, which we will look at next.

Active First / Second Alternating Color

CSS Selectors .alt1Active and .alt2Active

A special case applies to the Active First and Second Alternating Color classes, which use the CSS selectors .alt1Active and .alt2Active.

The actual styling of the Active classes is taken directly from the styling applied to the First and Second Alternating Color classes.

When enabled in the footer template, these classes respond to the mouse pointer being hovered over them by switching their background color to that of the opposite Alternating Color class. That is, when your mouse hovers over a cell using the Active First Alternating Color class, it will switch to use the Second Alternating Color class, and when your mouse leaves the cell again it will revert to its original class.

If the active element is clicked, vBulletin will read the id attribute of that element for special information that will tell it where to link to.

That special information will consist of a letter, followed by a string of digits. The letter indicates the type of the item to which the link will point, and the digits represent the item id of the item in question. For example id="t123" indicates that the item points to thread (t) id 123, so the browser will be redirected to [http://www.example.com/forums/showthread.php?t=123].

The various letters used by vBulletin are listed here:
LetterRepresentsRedirects to
u
User (userid)member.php?u=[userid]
t
Thread (threadid)showthread.php?t=[threadid]
p
Post (postid)showthread.php?p=[postid]
f
Forum (forumid)forumdisplay.php?f=[forumid]
m
Private Message (pmid)private.php?pmid=[pmid]
The active cells functionality is disabled by default.

To enable this functionality, you will need to edit the footer template and un-comment the call to the activecells_init() Javascript function by changing this code:
    // Initialize 'Active' Table Cells
    //activecells_init();
to this:
    // Initialize 'Active' Table Cells
    activecells_init();
Due to browser limitations, active cells are purposefully disabled for WebTV, MSNTV and Opera browsers.

Example of element using these classes:
<table class="tborder" cellspacing="1" cellpadding="6">
<tr>
    <td class="alt1Active" id="t1138">
        Click anywhere inside this cell to be
        taken to the thread with thread ID 1138.
    </td>
</tr>
</table>

WYSIWYG Editor

CSS Selector: .wysiwyg

The WYSIWYG class is applied to the text input area of the WYSIWYG version of the vBulletin message editor.

In order to achieve a fully what-you-see-is-what-you-get message editing system, it is desirable to use the same settings for this class as for the class that controls the area where posted messages appear. The class used in this case is the First Alternating Color class.

Therefore, for the best results, you should duplicate the settings used for the First Alternating Color class here in the WYSIWYG class.

Of course, you can use any settings you like for the WYSIWYG class, but you should bear in mind that using dramatically different settings for the WYSIWYG and First Alternating Color classes may result in confusion for you visitors, as colors that may look in the WYSIWYG editor may look very strange against a different background color as specified in the First Alternating Color class.

Example of element using this class:
<div id="htmlbox" class="wysiwyg">
    This DIV uses the WYSIWYG class.
</div>

Input Fields

CSS Selector: textarea, .bginput

The Input Fields class is applied to text box form elements, including <textarea>, <input type="text" /> and <input type="password" />.

It allows you to specify all manner of styling to these elements, including background color, text style, border style and element spacing amongst all other applicable CSS items.
Warning:
If values are omitted from the available fields in this class, the values that will appear on the page will be inherited from the visitor's own PC's system preferences.

This can cause problems if you have specified the background color for the class but not the text color if your visitor has a non-standard color scheme on their computer.

For example, if you specify only the background color, setting it as white, but leave the font color field empty, it may look fine to you, but a visitor using an inverted white-on-black type system color scheme such as the High Contrast Black color scheme available in Windows® will have black text on a black background!

Therefore, if you edit either the background color for this class, make sure you also edit the font color to a suitable value, and vice-versa.
Example of element using this class:
<div><input type="text" class="bginput" name="myinput" /></div>

<div><textarea name="mytextarea" rows="4" cols="60"></textarea></div>

<div>The INPUT and TEXTAREA tags above use the Input Fields class.</div>

Buttons

CSS Selector: .button

The Buttons class is used to style all button-type elements within forms in vBulletin. These include <input type="button" />, <input type="submit" /> and <input type="reset" />.

As with the Input Fields class, this class will inherit any unspecified settings from the system color scheme. You should read the warning note on the Input Fields class page for full details.
Note:
Under Windows® XP, form buttons will use the 'Luna' theme for their background and borders, unless a background color or a border style is applied. Specifying either one of these attributes will cause buttons to use the classic Windows® styling.

Example of element using this class:
<input type="submit" class="button" value="Save Changes" accesskey="s" />
<br />
The button above uses the 'Button' class.

<select> Menus

CSS Selector: select

This class is applied to every <select> menu seen in vBulletin.

Due to operating system limitations, only certain CSS attributes will be applied to <select> tags, as the majority of their display code is controlled directly by the operating system itself.

You should find that you can set values for background color, font size and font family successfully. However, certain operating systems; most notably Mac OS X on the Apple Macintosh, will completely ignore all CSS applied to <select> tags, choosing instead to use the system themes engine to display the menus.

Example of element using this class:
<select name="myselect">
    <option value="1">One</option>
    <option value="2">Two</option>
</select>
<div>The SELECT tag above has its style controlled by this class.</div>

Small Font

CSS Selector: .smallfont

The Small Font class is used liberally throughout vBulletin, and does 'exactly what it says on the tin', that being to specify a style for a smaller-than-normal font.

For best results, you should usually specify only a font size and a font family for this class.

Example of element using this class:
<p>This text does not use the Small Font class,
<span class="smallfont">but this text <strong>does</strong>
use the Small Font class!</span></p>

Time Color

CSS Selector: .time

The Time class is applied to (most) elements containing a time in vBulletin.

In the default vBulletin style, this class has only the font color specified, although of course you can apply any styles you like to it.

Example of element using this class:
<div>Tuesday, March 9th 2004, <span class="time">5:10pm</span>.</div>

NavBar Text

CSS Selector: .navbar

The NavBar Text class is applied to all text making up the navigation 'breadcrumb' in the navbar template.

The final element in the breadcrumb (in the example above, it is 'This is a new thread') uses the NavBar text class but has certain parts of the class overridden by an inline style definition contained within the navbar template itself.

Example of element using this class:
<span class="navbar">Example Forums</span>
<span class="navbar">&gt; Main Category</span>
<span class="navbar">&gt; Main Forum</span>

Highlighted Font

CSS Selector: .highlight

The Highlighted Font class is used primarily to highlight words in messages that match the conditions of a search. For example, if you searched for 'vBulletin' and then clicked to view the matching threads or posts, the word 'vBulletin' would be highlighted in matching posts.

This class is also used in the Buddy List to indicate a newly-logged-in buddy.

Example of element using this class:
<p>Only one word of this sentence uses the
<span class="highlight">highlight</span> class.</p>

Panel Surround

CSS Selector: .panelsurround

The majority of forms in vBulletin appear as a raised panel inside a table.

The Panel Surround class is used to define the style for the thick border that surrounds the panel and includes the submit and reset buttons.

Example of element using this class:
<table class="tborder" cellspacing="5" cellspacing="1">
<tr>
    <td class="panelsurround">
        This cell uses the Panel Surround class.
    </td>
</tr>
</table>

Panel (Forms)

CSS Selector: .panel

Used in conjunction with the Panel Surround class, the Panel class is used to control the style of the raised panel used to house controls on most vBulletin forms.

Both the background color of the panel background and the style of the border surrounding it are controlled by this class.

Example of element using this class:
<div class="panel">
    This DIV uses the Panel class.
</div>

<legend>

CSS Selector: legend

Elements within forms in vBulletin are often grouped inside a <fieldset> tag. The titles of these fieldsets are set inside <legend> tags, which take their styling from the <legend> class.

For best results you should usually only specify attributes relating to the text/font for this class, as specifying other attributes such as background color may produce unpredictable results.

Example of element using this class:
<form>
    <fieldset>
        <legend>This uses the Legend class</legend>
        <div>Some form elements here...</div>
    </fieldset>
</form>

Popup Menu Controls

CSS Selector: .vbmenu_control

vBulletin hides complex and infrequently used functionality from immediate view by placing it in vBMenu popup menus.

For the most part, vBMenu popups are controlled by clicking on an element that opens or closes the menu, and these elements' style is controlled with the Popup Menu Controls class.

You will most likely need to set attributes for every available field of this class in order to achieve a good result, including background color, font styling and hyperlink styles.

Example of element using this class:
<table class="tborder" cellpadding="6" cellspacing="1">
<tr>
    <td id="myMenu" class="vbmenu_control">
        <a href="#myMenu">The TD tag Uses This Class</a>
        <script type="text/javascript"> vbmenu_register("myMenu"); </script>
    </td>
</tr>
</table>

Popup Menu Body

CSS Selector: .vbmenu_popup

When a vBMenu popup menu is opened, its contents are usually bordered by a bounding box, and a color is visible through the margins between individual components of the menu itself.

This border and the color showing through the gaps is controlled by the Popup Menu Body class.

In the default vBulletin style, only the background color and foreground color are specified, along with a value for the border, as text and hyperlink styling is handled for the most part by the Popup Menu Option and Popup Menu Highlighted Option classes.

Example of element using this class:
<div class="vbmenu_popup" id="myMenu_menu" style="display:none">
    <table cellpadding="4" cellspacing="1" border="0">
    <tr>
        <td class="thead">
            The DIV surrounding this table
            uses the Popup Menu Body class
        </td>
    </tr>
    </table>
</div>

Popup Menu Option Row

CSS Selector: .vbmenu_option

Individual elements of a vBMenu popup menu will usually derive their styling from the Popup Menu Option class.

Elements within popup menus usually take the form of a <td> tag within a table.

When setting the values to be used for this class, you should bear in mind that when the user's mouse pointer hovers over an element using the class, it will switch its class to use the Popup Menu Highlighted Option class.

Example of element using this class:
<div class="vbmenu_popup" id="myMenu_menu" style="display:none">
    <table cellpadding="4" cellspacing="1" border="0">
    <tr>
        <td class="vbmenu_option">
            This element within a popup menu
            uses the Popup Menu Option class.
        </td>
    </tr>
    </table>
</div>

Popup Menu Highlighted Option

CSS Selector: .vbmenu_hilite

The Popup Menu Highlighted Option class is unusual in that it is not actually applied to any elements in the vBulletin templates. Instead, it is applied dynamically via Javascript when a user's mouse pointer hovers over an element with the Popup Menu Option Row class applied, making a rollover effect.

For more details about how this class is applied to elements, see the section on creating vBMenu popup menus.
Note:
For best results, you should apply similar settings to this class as you applied to the Popup Menu Option Row class, making only subtle changes such as the background color and the text color. Making extreme changes such as changing the font family or size will result in menus that appear to 'jump around' when rolling over options.
Example of element using this class:
<div class="vbmenu_popup" id="myMenu_menu" style="display:none">
    <table cellpadding="4" cellspacing="1" border="0">
    <tr>
        <td class="vbmenu_option">
            This element will have the Popup
            Menu Highlighted Option class applied
            when the user's mouse pointer hovers over it.
        </td>
    </tr>
    </table>
</div>

Forum Jump Menu Classes

CSS Selectors:
.fjselSelected Menu Item.fjdpth0Depth 0 Menu Item
.fjdpth1Depth 1 Menu Item.fjdpth2Depth 2 Menu Item
.fjdpth3Depth 3 Menu Item.fjdpth4Depth 4 Menu Item
The Forum Jump Menu Classes are six classes used to apply styling to the Forum Jump Menu.

Of the six classes, the first (.fjsel) is applied to whatever <option> tag is currently selected, thereby creating a cue for the user to see where they are in relation to the rest of the board.

The remaining five classes, .fjdpth0 to .fjdpth4 are applied to <option> tags containing forums in the menu, with the depth determined by the level of nesting of each forum.

The colors applied to Depth0 - Depth4 items here are for illustration purposes only, and do not appear in the default vBulletin style.

In the example above, you can see that the forum called 1st Depth Two Forum is a child of the 1st Depth One Forum forum, which is in turn a child of the 1st Depth Zero Forum forum. Counting back, this works out as a two-level nested forum, and hence it has the 'Depth 2 Item' forum jump class applied to it.
Note:
As with the <select> Menus class, the Forum Jump Menu classes are applied to <select> and <option> tags, which on non-Windows® operating systems (in particular Macintosh operating systems) can sometimes not be styled.

At most you will be able to style the background color and the text color for these classes, and all other styling will be inherited from the <select> Menus class, if indeed the operating system allows these elements to be styled at all.
Example of elements using these classes:
<select name="myselect">
    <option class="fjsel" selected="selected">Selected item</option>
    <option class="fjdpth0">Depth 0 item</option>
    <option class="fjdpth1">Depth 1 item</option>
    <option class="fjdpth2">Depth 2 item</option>
    <option class="fjdpth3">Depth 3 item</option>
    <option class="fjdpth4">Depth 4 item</option>
</select>

Additional CSS Definitions

There are two <textarea> fields provided in the vBulletin Style Manager for 'Additional CSS Definitions'.

These two boxes allow raw CSS code to be entered. The contents of these two boxes will be appended to the final CSS stylesheet generated automatically by vBulletin from the values entered for all the other classes.

The values in the first box as set by the default vBulletin style define a few small classes that do little jobs and as such don't really warrant getting a full CSS editor like the main classes previously described.

This page will summarize the contents of the first Additional CSS Definitions box and explain what the various classes and definitions do.
Big User Name
.bigusername
The 'Big User Name' class is used to control the size of the user name seen on the postbit template.

.bigusername { font-size: 14pt; }
Table Header Blocks
td.thead, div.thead
This definition extends the style of the Table Header class by instructing any <td> or <div> tags using the Table Header class to have a specific amount of padding around the content.

td.thead, div.thead { padding: 4px; }
Page Navigation Links
.pagenav a
The PageNav class is applied to a container around all multi-page navigation controls. This definition instructs all hyperlinks within the PageNav container to have no underline decoration.

.pagenav a { text-decoration: none; }
Page Navigation Cells
.pagenav td
Also related to the PageNav container, this definition causes all <td> tags within the container to have a smaller-than-normal amount of cell padding in order to keep the overall size of the multi-page navigation control bar to a minimum.

.pagenav td { padding: 2px 4px 2px 4px; }
Fieldset Spacing
.fieldset
This class is applied to all <fieldset> tags in vBulletin templates, and causes those tags to have a small amount of margin below themselves in order to aid in page spacing.

.fieldset { margin-bottom: 6px; }
Fieldset Text Size
.fieldset, .fieldset td, .fieldset p, .fieldset li
This group of definitions specifies the size of all text found within <fieldset> tags in vBulletin templates.

.fieldset, .fieldset td, .fieldset p, .fieldset li { font-size: 11px; }
Inline Forms
form
This simple definition instructs browsers that render <form> tags as block-level elements with a margin around them to treat <form> tags as inline elements, thereby preventing unwanted white space from being displayed on the page.

form { display: inline; }
Label Pointer
label
Another simple definition, this causes the mouse pointer for all <label> tags to be displayed as a pointer icon, rather than as a text cursor, indicating that the element can be clicked.

label { cursor: default; }
Normal Text
.normal
This class is used to place normally weighted text inside elements that would normally be displayed as bold.

.normal { font-weight: normal; }
Inline Images
.inlineimg
This class is applied to certain <img /> tags in vBulletin templates in order to have them appear to be vertically aligned to the middle of any text in which they are located. In some cases this makes for a more pleasing display.

.inlineimg { vertical-align: middle; }
Why are there two Additional CSS Definitions boxes?
The reason for there being two separate input areas is that the first is used by the default vBulletin style, so you are advised to leave the content of this field at its default value so that any subsequent updates made by the vBulletin developers are automatically reflected in your own styles. The second field is not and will never be used by the vBulletin default style, so you may enter any additional CSS you wish here safe in the knowledge that you will never have to revert this field to gain new CSS definitions provided in subsequent versions of vBulletin.

Should you wish to change the values of any of the CSS classes defined in the first Additional CSS Definitions box, you can do so by copying the class definition from the first box, pasting it into the second box and making the appropriate changes there.

As the contents of the second box appears after the contents of the first box in the final style sheet, any classes defined in the first box and redefined in the second will take their final values from the second box.

For example, the first box contains a definition for .bigusername, setting the font size to 14pt. By redefining the font size for .bigusername in the second box, the definition made in the first box is overridden.

Replacement Variables

Replacement Variables are chunks of text that will be replaced with alternative text by the system before being displayed on screen.

Their uses are many and when used correctly they can be very powerful. A common use for replacement variables is to correct annoying spelling mistakes. For example, on the vBulletin Community Forums a replacement variable exists to replace all instances of the incorrect abbreviation for vBulletin VBB with the correct abbreviation vB.

Another use for replacement variables is to insert commonly-used blocks of HTML. For example, a replacement variable could be set up to replace <tablestart> with <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">.

Therefore, your templates could have blocks of code like this:
<tablestart>
<tr>
    <td class="alt1">Cell contents...</td>
</tr>
</table>
And before being displayed in a visitor's browser, the replacement variable system would identify the <tablestart> replacement variable and replace it accordingly, resulting in this:
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
    <td class="alt1">Cell contents...</td>
</tr>
</table>
Replacement variables in vBulletin 3 are case insensitive meaning that a replacement variable set to search for word will also match Word, wOrD and WORD etc.

The replacement variable system is activated in the last stages of page processing before the HTML is delivered to a visitor's browser. The system searches for target text in the completed, parsed templates. In some ways this can be very useful, but there are caveats of which you should be aware.
Warning:
While powerful, replacement variables can also break the functionality of your board if used incorrectly.

For example, creating a replacement variable to search for 'html' and replace it with 'HTML', any hyperlinks pointing to files with a .html suffix will have those links replaced with .HTML, which is not the same file as far as Unix web servers are concerned.

Worse still, you might choose to use a replacement variable to turn every instance of the word home into a hyperlink pointing to your home page: <a href="home.html">home</a>.

While this will work, you will have the situation where the word 'home' is used in locations where creating a hyperlink would cause invalid HTML, such as this:
<img src="home.gif" alt="" />
...which would end up being delivered to the browser as
<img src="<a href="home.html">home</a>.gif" alt="" />
...which is obviously invalid HTML and will not function correctly.

Preventing Visitors from Activating Replacement Variables

In many cases you will want to prevent your users from being able to activate replacement variables by posting trigger text in their messages.

For this reason, it is recommended that you set any replacement variables that should be used in templates only to appear as HTML tags, such as <myreplacement>.

This is done because most forums do not allow visitors to post raw HTML in their messages (this is seen as a serious security risk). In forums where HTML posting is disallowed, any special HTML characters such as the < and > characters are replaced with their equivalent HTML character entities to prevent the HTML code from being interpreted as HTML rather than printed text.

For example, the < character is replaced with &lt; and the > character is replaced with &gt;. This replacing of special HTML characters makes it impossible for a user to post <myreplacement> in their messages, as it would be translated into &lt;myreplacement&gt;, which does not match the trigger text. It will therefore not be replaced with the replacement text for your <myreplacement> variable.

Where are the Replacement Vars from vB2?

If you have upgraded to vBulletin 3 from a previous installation of vBulletin 2, you will probably know that in vBulletin 2, replacement variables were used extensively in the default vBulletin style to control various facets of the style, such as colors and fonts. In vBulletin 3 however, there are no replacement variables used in the default style.

Where did they all go?

The answer is that all of the replacement variables from vBulletin 2 have been translated into CSS classes, or have been migrated to the new StyleVars system.

The new systems are less processor-intensive (easier on your server's resources) than using replacement variables, and offer a lot more flexibility in the way that they can be used.

The following table lists all the default vBulletin 2 replacement variables, and shows how they have been translated for use in vBulletin 3.
Item NameReplacement TextvBulletin 3 EquivalentDescription
HTML Doctype{htmldoctype}StyleVar:
HTML Doctype
The HTML Doctype replacement variable has been migrated directly to the HTML Doctype StyleVar.
Body Tag<body>CSS:
Body class
All attributes controlled by the <body> tag replacement variable in vBulletin 2 are now managed by the Body CSS class.
Main Table Width{tablewidth}StyleVar:
Main Table Width
The width of vBulletin tables; controlled by the {tablewidth} replacement variable in vBulletin 2, is now controlled by the Main Table Width StyleVar.
Content Table Width{contenttablewidth}StyleVar:
Spacer Size
The width of tables inside the main page body; previously controlled by the {contenttablewidth} replacement variable, is now handled in a different way by the Spacer Size StyleVar.
Outer Borders Width{tableouterborderwidth}CSS:
Table Border class
The width of the border around tables in vBulletin is now controlled via CSS as part of the Table Border class.
Inner Borders Width{tableinnerborderwidth}StyleVar:
Inner Border Width
Control of the amount of spacing between table cells has been transferred to the Inner Border Width StyleVar.
'Extra' Table Attributes{tableouterextra}
{tableinnerextra}
{tableinvisibleextra}
n/aIn vBulletin 2 these replacement variables were used to allow arbitrary code to be inserted into <table> tags. This functionality is no longer necessary, as any code that might have been inserted here can now be emulated using CSS.
Page Background / Text Colors{pagebgcolor}
{pagetextcolor}
CSS:
Page Background class
The background color and text color of the main page body is now controlled by the Page Background CSS class.
Table Border Color{tablebordercolor}CSS:
Table Border class
The {tablebordercolor} replacement variable was used to set the color of all borders around and inside <table> tags in vBulletin 2. This functionality is now managed by CSS in the Table Border class.
Category Strip Background / Text Colors{categorybackcolor}
{categoryfontcolor}
CSS:
Category Strips class
The background and text colors used in category strips and main table title bars is now controlled by the Category Strips CSS class.
Table Heading Background / Text Colors{tableheadbgcolor}
{tableheadtextcolor}
CSS:
Table Header class
Previously controlled by the {tableheadbgcolor} and {tableheadtextcolor} replacement variables, the style of column headings is now a part of the Table Header CSS class.
First Alternating Table Background Color{firstaltcolor}CSS:
First Alternating Color class
In vBulletin 2, only the background color of elements using the First Alternating Color could be specified. In vBulletin 3 the First Alternating Color CSS class allows significantly more control.
Second Alternating Table Background Color{secondaltcolor}CSS:
Second Alternating Color class
Partnering the First Alternating Color CSS class, the Second Alternating Color CSS class defines the style of elements previously colored with the {secondaltcolor} replacement variable.
Hyperlink Normal / Hover Colors{linkcolor}
{hovercolor}
CSS:
Body and Page Background classes
vBulletin 2 allowed administrators to control the color of standard hyperlinks, and to also specify a color for those links when a mouse pointer is hovered over them. In vBulletin 3, almost every individual CSS class can define its own settings for hyperlink styling, although it is often the case that only the Body CSS class will have link styles defined, in which case this class will control all hyperlinks.
Time Color{timecolor}CSS:
Time Color class
In order to control the color of times shown on vBulletin pages, it is now necessary to look at the Time Color class, which allows not only the color but a variety of other attributes to be controlled for the styling of time displays.
Calendar Colors{calbgcolor}
{calbirthdaycolor}
{caldaycolor}
{calprivatecolor}
{calpubliccolor}
{caltodaycolor}
n/aThe various colors defined by the calendar color replacement variables in vBulletin 2 have become redundant with the new calendar system in vBulletin 3.
Image Folder Path{imagesfolder}StyleVar:
Image Directory Paths
While vBulletin 2 defined a single images directory with the {imagesfolder} replacement variable, vBulletin 3 defines a variety of folders to serve different purposes. These are controlled by the Image Directory Paths StyleVars.
Title Image Path{titleimage}StyleVar:
Title Image
The path controlled by the Title Image Path replacement variable is now controlled by the Title Image StyleVar in vBulletin 3.
New Thread / Reply / Closed Image Paths{newthreadimage}
{replyimage}
{closedthreadimage}
n/aWhile vBulletin 2 specified replacement variables for three button images relating to posting new threads and replying to posts, all of these images are now found in the $stylevar[imgdir_button] StyleVar, one of the Image Directory Path StyleVars.
Main Font<normalfont>CSS:
Body and <td>, <th>, <p>, <li> classes
In vBulletin 2 it was necessary to surround all text with <normalfont> tags in order to have it use the fonts and sizes specified. In vBulletin 3 this is no longer the case, and text display is controlled by the Body and <td>, <th>, <p>, <li> CSS classes.
Small Font<smallfont>CSS:
Small Font class
When a smaller-than-normal font size is required in vBulletin 3, it is a simple matter of applying the Small Font CSS class to an HTML tag surrounding the text to be made small.
Large Font<largefont>n/aThe <largefont> replacement variable was used so infrequently in vBulletin 2 that it was decided not to waste resources on replicating it in vBulletin 3, so it is no longer available.
Highlighted Font<highlight>CSS:
Highlighted Font class
In vBulletin 2 the color of highlighted text was controlled by the <highlight> replacement variable, but much more control is afforded by the vBulletin 3 Highlighted Font CSS class that replaces it.
Textarea Column Settings{textareacols_IE}
{textareacols_NS4}
{textareacols_NS6}
n/aIn the bad old days before CSS was widely supported by browsers it was necessary to rely on the cols="x" attribute of <textarea> tags to specify the width of a <textarea>. Different browsers interpreted this value with a different resultant width, resulting in the need for a set of replacement variables in order to achieve roughly the same width for <textarea> tags in all browsers. With CSS the 'width' style attribute can be used to control the width more precisely, rendering these three replacement variables obsolete.
With the information in this table, your transtion from the vBulletin 2 styles system to the vBulletin 3 system should be as painless as possible.

StyleVars

StyleVars (short for Style Variables) are PHP variables that contain a single value used for controlling the appearance of some aspect of a vBulletin style that would be difficult or impossible to control via CSS.

For example, one StyleVar (called $stylevar[cellspacing]) controls the spacing between cells in all <table> tags used in vBulletin, as you can see from the following examples:

Firstly, with the $stylevar[cellspacing] StyleVar set at its default value of 1, you can see a single-pixel border between cells in the table.

Next, with $stylevar[cellspacing] set to equal 0, you can see that the border between cells has completely disappeared.

Finally, with $stylevar[cellspacing] set at 3, a much wider, 3 pixel border is produced between each cell.
Another example of a StyleVar in use is $stylevar[cellpadding], which controls the padding of each cell in a table.

At the default value of $stylevar[cellpadding]: 6, tables appear with a large amount of padding around the content of each cell.

After reducing $stylevar[cellpadding] to 3, the margin around cell content is halved from the default amount of padding.

And finally, with $stylevar[cellpadding] set at 0, all padding is removed, leaving a rather nasty, cluttered layout having no margin between cell content and cell border at all.
StyleVars are incorporated into templates in the same way as any other PHP variables. The following example shows a block of XHTML code from a template using several StyleVars:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]">
<tr>
    <td class="thead" align="$stylevar[left]">Welcome to vBulletin</td>
    <td class="thead" align="$stylevar[right]">$bbuserinfo[username]</td>
</tr>
<tr>
    <td class="alt1" colspan="2">
        <img src="$stylevar[titleimage]" alt="vBulletin Logo" />
    </td>
</tr>
</table>
The values of StyleVars are set in the StyleVars section of the Style Manager.

The following sections list and explain all the StyleVars used by vBulletin, so you can edit them with confidence, and incorporate them into any custom templates you might create.

HTML Doctype

$stylevar[htmldoctype]

The HTML doctype StyleVar controls the first line of the HTML code for every vBulletin page.

It is used to instruct the browser how to render the page, according to a particular type of HTML.

For example, the HTML doctype for XHTML 1.0 Transitional, which is the default for vBulletin 3 is this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Another popular doctype is that for HTML 4.0 Transtional. This doctype is less strict than XHTML, but getting consistent layout results with different browsers is more difficult using HTML 4.0 than it is with XHTML 1.0.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
The HTML Doctype is particularly important for visitors using Microsoft Internet Explorer 6, as the inclusion of a doctype declaration at the top of an HTML page switches Internet Explorer into 'Standards Compliant Rendering' mode, causing the browser to be far less tolerant of sloppy or incorrect HTML code, and generally to render pages in a manner more similar to that used by other browsers.
Note:
You may leave the HTML doctype completely blank, but if you do so, Internet Explorer 6 will use the 'Quirky Rendering' mode as used by previous versions of Internet Explorer.

When attempting to achieve a layout that will look the same between Internet Explorer, Mozilla, Opera and all the other browsers out there, 'Quirky Rendering' mode can be extremely unhelpful!

Main Table Width

$stylevar[outertablewidth] and $stylevar[outerdivwidth]

The main table width StyleVar is used to set the overall width of vBulletin pages.

It can accept values both as a percentage of the total page width for a 'liquid' layout, or an explicit value set in pixels to create a fixed layout.

Here you can see examples of the same board with different values for $stylevar[outertablewidth].

On the left, the main table width has been set to 760, creating a fixed-width layout that will not resize to become wider or narrower based on the width of the window. On the right is the same board with $stylevar[outertablewidth] set to 100%. As a result, the page content has stretched to fill the available space.
Note:
If you wish to enter a value in pixels, you should enter the number alone, do not add 'px' to the value.
For example: 640.

To set the value as a percentage, simply enter the percentage value, followed by the % symbol.
For example: 85%.
This StyleVar actually spawns a second StyleVar, called $stylevar[outerdivwidth]. While $stylevar[outertablewidth] is suitable for placing in the width attribute of a <table> tag, $stylevar[outerdivwidth] is suitable for use as the value for the CSS-defined width attribute of a <div> tag.

Example of $stylevar[outertablewidth] in use:
<table width="$stylevar[outertablewidth]" align="center">
<tr>
    <td>This table's width is set by $stylevar[outertablewidth].</td>
</tr>
</table>
Example of $stylevar[outerdivwidth] in use:
<div style="text-align: center">
    <div style="width: $stylevar[outerdivwidth]; text-align: left">
        This div's width is being set by $stylevar[outerdivwidth].
    </div>
</div>

Spacer Size

$stylevar[spacersize]

The spacer size StyleVar is used to define the width in pixels of the space between the edge of the vBulletin page and the content within it.

The red arrow on this image shows the distance controlled by $stylevar[spacersize].

This StyleVar accepts any numeric value, but will not accept a value specified as a percentage.
Note:
Do not add 'px' to the number you specify as the value for $stylevar[spacersize].

Inner Border Width

$stylevar[cellspacing]

The inner border width StyleVar is used as the value for the 'cellspacing' attribute of all tables in vBulletin. It controls the width of the border apparent between table cells.

By setting a value of 1 or greater, a margin will appear between table cells, showing the background color of the underlying table as defined in the .tborder CSS class.

At the default value of 1, a thin, one pixel border is seen between table cells:

By increasing the value to 3, the border between cells grows thicker:

Setting the value to 0 will result in no margin between cells, so no inner border will appear at all.

Example of $stylevar[cellspacing] in use:
<table class="tborder" cellspacing="$stylevar[cellspacing]" cellpadding="5">
<tr>
    <td class="alt1">First Cell</td>
    <td class="alt2">Second Cell</td>
</tr>
</table>
This StyleVar can take any numerical value from 0 to 100 and upwards, although you will find that only 0, 1 and possibly 2 are useful values. Values greater than 2 tend to look extremely ugly.
Note:
Do not add 'px' to the value of this StyleVar.

Table Cell Padding

$stylevar[cellpadding]

The table cell padding StyleVar is used as the value for the 'cellpadding' attribute of all tables in vBulletin. It controls the amount of margin shown between the content of a cell and its border.

At the default value of 6, a wide margin is apparent between the content of each cell and its surrounding border.

Dropping the value to 3, we can see that the amount of padding around the content of each cell is halved from its width at the default value.

By setting the cell padding value all the way down to 0, all padding is lost from cells, and we are left with a rather nasty-looking cluttered table where the cell borders actually touch the content within them.

Example of $stylevar[cellpadding] in use:
<table class="tborder" cellspacing="1" cellpadding="$stylevar[cellpadding]">
<tr>
    <td class="alt1">First Cell</td>
    <td class="alt2">Second Cell</td>
</tr>
</table>
This StyleVar will accept any numeric value from 0 upwards, although the best results will be had with values between 1 and 10.
Note:
Do not add 'px' to the value of this StyleVar.

Form Element Spacer Size

$stylevar[formspacer]

The form element spacer size StyleVar defines a distance in pixels between elements of a form in vBulletin. Its purpose is to allow a comfortable distance to be placed between form controls in order to provide a less cluttered appearance to forms.

At the default $stylevar[formspacer] value of 3, a small gap is placed between controls on a form.

Increasing the value to 10, a much wider margin is apparent between form elements.

This StyleVar will accept any numeric value from 0 upwards. Values between 2 and 10 are probably the most useful for most situations.
Note:
Do not add 'px' to the number you specify as the value for $stylevar[spacersize].

Form Width

$stylevar[formwidth]

The form width StyleVar is used to set the width of all forms in vBulletin. Its primary function is to restrict the way that forms can stretch to fill all the available space in a window, which can cause form elements and their descriptions to stretch to levels at which the form becomes difficult to manage.

Here, at the default value of 640px, the form elements do not expand with the rest of the page, resulting in an easy-to-manage set of controls located in the center of the page:

With the value of $stylevar[formwidth] set to auto, the form elements stretch to fill the entire available space. This results in large empty gaps to the right of the form controls, with the controls themselves stuck to the left side of the window.

This StyleVar will accept any value that is a valid entry for CSS width. Examples of valid values include the following:Example of $stylevar[formwidth] in use:
<div style="width:$stylevar[formwidth]">
  <form method="index.php" method="post">
    <fieldset>
      <legend>My Form Example</legend>
      <input type="text" name="mytextfield" value="Hello" />
      This is my text field.
    </fieldset>
  </form>
</div>
Note:
This StyleVar is used as a CSS value. If you enter a width in pixels, you must add 'px' after the number of pixels desired, for example: '500px'.

User CP Form Width

$stylevar[formwidth_usercp]

The user control panel form width StyleVar does exactly the same job as the form width StyleVar $stylevar[formwidth], except that it allows the width of the navigation panel in the User Control Panel to be taken into account.

The red arrow shows the width controlled by $stylevar[formwidth_usercp].

For a discussion of the values this StyleVar will accept, see the page relating to the Form Width StyleVar $stylevar[formwidth].

Message Area Width

$stylevar[messagewidth]

The message area with StyleVar controls with width of the text input area used for posting messages etc. in vBulletin.

The red arrow indicates the width controlled by this StyleVar.

This StyleVar will accept any value that is a valid entry for CSS width. Examples of valid values include the following:
Warning:
While it is possible to use values of 'auto' or a percentage width, testing has shown that many browsers produce unpredictable results when using these methods for the message width StyleVar.

It is therefore recommended that a fixed pixel value such as '540px' be used in this case.

User CP Message Width

$stylevar[messagewidth_usercp]

This StyleVar is used to control the width of message input text boxes within the User Control Panel (such as the input area for the Private Message posting page).

Its functionality is identical to that of $stylevar[messagewidth], but it allows the width of the navigation panel in the User Control Panel to be taken into account.

The red arrow indicates the width controlled by this StyleVar:

For a discussion of the values this StyleVar will accept, see the page relating to the Message Area Width StyleVar $stylevar[messagewidth].

Code Block Width

$stylevar[codeblockwidth]

The code block width StyleVar is used to set the width of blocks of code in messages, as defined by the [CODE], [PHP] and [HTML] tags.

The red arrow indicates the width controlled by the $stylevar[codeblockwidth] StyleVar.

This StyleVar will accept any value that is a valid entry for CSS width. Examples of valid values include the following:
Note:
This StyleVar is used as a CSS value. If you enter a width in pixels, you must add 'px' after the number of pixels desired, for example: '500px'.

Title Image

$stylevar[titleimage]

The title image StyleVar stores the URL of the main logo image that usually appears in the header template of vBulletin.

Rather than being bunched in with all the other images, the title image is given its own StyleVar in order to make it as easy as possible to make simple customizations to your board, such as changing the colors and the logo image.

The red border indicates the position of the title image at the top-left of a vBulletin page:

The value given to this StyleVar can be one of either:Example of $stylevar[titleimage] in use:
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
You can find this particular StyleVar here: Admin Control Panel > Styles & Templates > Style Manager > dropdown: StyleVars > Image Paths > Title Image

Image Directory Paths

$stylevar[imgdir_button]Button Images Folder
$stylevar[imgdir_status]Item Status Icon Folder
$stylevar[imgdir_attach]Attachment Icons Folder
$stylevar[imgdir_misc]Miscellaneous Images Folder
$stylevar[imgdir_editor]Text Editor Controls Folder
$stylevar[imgdir_poll]Poll Images Folder
$stylevar[imgdir_rating]Ratings Images Folder
$stylevar[imgdir_reputation]Reputation Images Folder
The image directory path StyleVars point to directories containing groups of images on your web server.

The purpose of having several different StyleVars pointing to different image directories is to allow the administrator to choose which images are shared between styles, and which images are unique to each style.

For example, if a board has three different styles called 'Red', 'Green' and 'Blue', where the only difference between the three styles is the color scheme, the administrator may decide that each style will share all of its images, except for the button images, where he has created specially colored versions of the buttons to match the color schemes of the three styles.

In this case, all the image directory StyleVars could point to the same group of directories, with the exception of the $stylevar[imgdir_button] StyleVar, which would have a unique value for each style to point to the appropriate directory containing the colored buttons for each style.

In use, you will find the image directory StyleVars throughout the templates whenever an image is referenced. For example:
<img src="$stylevar[imgdir_button]/newthread.gif" alt="Post New Thread" />
This example shows the 'Button Images Folder' StyleVar being used to point the browser at the directory containing the button images for a style.

If our 'Red', 'Green' and 'Blue' styles have unique values for the button images folder, we might see that StyleVar being evaluated in the templates in this sort of manner:

'Red' Style
<img src="images/red_buttons/newthread.gif" alt="Post New Thread" />
'Green' Style
<img src="images/greenButtons/newthread.gif" alt="Post New Thread" />
'Blue' Style
<img src="images/buttons_for_blue/newthread.gif" alt="Post New Thread" />
The image directory StyleVars can take a URL of any of the following types:
Warning:
Do not include a trailing slash at the end of your image directory paths.

This is correct:
images/buttons

This is incorrect:
images/buttons/

Style Inheritance

Like so many other systems in vBulletin, the vBulletin Styles system works around the concept of inheritance.

In essence, this means that you can create an unlimited number of styles in which your board can be viewed, and customizations made in one style will be inherited by all of its 'child' styles.

Inheritance Example

The concept of inheritance as used by vBulletin 3 styles is best illustrated with an example of a common use for the system.

Many site owners will want to customize the look of their vBulletin installation so that it fits in with the style of the rest of the site. This is normally done by editing the colors used by vBulletin, and by editing the header and footer templates.

Let us imagine that we want to customize your header and footer templates, but we also want to offer three different color schemes for our visitors to choose between. For argument's sake, we'll call these the 'Red', 'Green' and 'Blue' styles.

We could create three new styles, calling one 'Blue', one 'Green' and one 'Red', then customize the header and footer templates in each style. That would be a perfectly valid solution, but has one serious disadvantage, in that should we decide that we want to alter the HTML in the customized header template, we would need to go through and edit the template in each of our three styles individually.

A much more manageable solution would be to create a single new style, which we will call 'Custom Header / Footer' and customize the header and footer templates within this style.

Now in order to offer site visitors the three color variants we want, we create the 'Red', 'Green' and 'Blue' styles as child styles of the 'Custom Header / Footer' style.

Each of these child styles will inherit the customized header and footer templates from the 'Custom Header / Footer' parent style, so we will not need to edit that template in the child styles, and if we choose to change the HTML of either the header or footer templates at some point in the future, we need only edit those templates in the parent style, and the changes will be automatically inherited by the three child styles.

While this is a very simple example, involving only the site color scheme and the header and footer templates, the vBulletin styles system allows you to individually customize every template and every CSS attribute of a style, and each of those customized attributes can be inherited by all child styles.

In the next section we will look into the mechanics behind this system in order to gain a good understanding of how to use vBulletin styles most effectively.

Inheritance Mechanics

In the vBulletin styles system, each element of a style can be customized from the vBulletin default value, and each customization will be inherited by any child styles of the style in which the customization was made, unless the value is further customized in the child style.

In order to explain this in simple terms, let us assume that a vBulletin style consists of [x] individual elements, those being a background color, a text color, a font style and a few templates. For the purposes of this example, we will represent the contents of a style like this:
 Background ColorText ColorFont StyleHeader TemplateFooter Template
vBulletin Default#FFFFFF#00000010pt verdana, arial, helvetica, sans-serif<p>This is the default 'header' template!</p><div>This is the default 'footer' template!</div>
Using the example of the customized header and footer templates we used in our first look at style inheritance, we can imagine that we could represent the 'Custom Header / Footer' style like this:
 Background ColorText ColorFont StyleHeader TemplateFooter Template
vBulletin Default#FFFFFF#00000010pt verdana, arial, helvetica, sans-serif<p>This is the default 'header' template!</p><div>This is the default 'footer' template!</div>
Custom Header / Footer#FFFFFF#00000010pt verdana, arial, helvetica, sans-serif<p>This is my custom 'header' template!</p><div>This is my custom 'footer' template!</div>
In this example, items that have been customized in a style are shown in red. You can see that the background color, text color and font style values are all shown in black, meaning that they are unchanged from the default values, while both the header and footer templates are shown in red, meaning that they have been customized, and therefore override their default contents.

We will now add the final branch of the style tree from our previous example, namely the 'Blue' style.
 Background ColorText ColorFont StyleHeader TemplateFooter Template
vBulletin Default#FFFFFF#00000010pt verdana, arial, helvetica, sans-serif<p>This is the default 'header' template!</p><div>This is the default 'footer' template!</div>
Custom Header / Footer#FFFFFF#00000010pt verdana, arial, helvetica, sans-serif<p>This is my custom 'header' template!</p><div>This is my custom 'footer' template!</div>
Blue#0000FF#FFFFFF10pt verdana, arial, helvetica, sans-serif<p>This is my custom 'header' template!</p><div>This is my custom 'footer' template!</div>
Here we can see that both the background and text color values have been customized, and are therefore shown in red, while the font style value has not been changed and therefore is being inherited from the vBulletin default values. However, both the header and footer templates have been customized in the parent 'Custom Header / Footer' style, and so those custom versions are inherited by the 'Blue' style. This inheritance is shown as an orange value.

Furthermore, if we now decided to customize the header template in the 'Blue' style, we would have something like this:
 Background ColorText ColorFont StyleHeader TemplateFooter Template
vBulletin Default#FFFFFF#00000010pt verdana, arial, helvetica, sans-serif<p>This is the default 'header' template!</p><div>This is the default 'footer' template!</div>
Custom Header / Footer#FFFFFF#00000010pt verdana, arial, helvetica, sans-serif<p>This is my custom 'header' template!</p><div>This is my custom 'footer' template!</div>
Blue#0000FF#FFFF0010pt verdana, arial, helvetica, sans-serif<p>This is my special BLUE 'header' template!</p><div>This is my custom 'footer' template!</div>
Here we can see that the customized (red) header template in the 'Blue' style overrides not only the default vBulletin header template, but also the customized header template from its parent 'Custom Header / Footer' style, while the Footer template is still inherited from its parent.

To illustrate the ability of vBulletin's style system to allow a theoretically infinte level of parent/child relationships between styles, we will now add a child style to the 'Blue' style, in which we will set the font size to be extra large. We will call this style 'Big Font Blue'.

In this style, we will customize the font size attribute to be larger than normal, which will result in a style inheritance diagram like this:
 Background ColorText ColorFont StyleHeader TemplateFooter Template
vBulletin Default#FFFFFF#00000010pt verdana, arial, helvetica, sans-serif<p>This is the default 'header' template!</p><div>This is the default 'footer' template!</div>
Custom Header / Footer#FFFFFF#00000010pt verdana, arial, helvetica, sans-serif<p>This is my custom 'header' template!</p><div>This is my custom 'footer' template!</div>
Blue#0000FF#FFFF0010pt verdana, arial, helvetica, sans-serif<p>This is my special BLUE 'header' template!</p><div>This is my custom 'footer' template!</div>
Big Font Blue#0000FF#FFFF0014pt verdana, arial, helvetica, sans-serif<p>This is my special BLUE 'header' template!</p><div>This is my custom 'footer' template!</div>
Here you can see that the vBulletin default font style is inherited by the 'Custom Header / Footer' style and the 'Blue' style, but is overridden by the customized version in the 'Big Font Blue' style.

Were we to now customize the font style in the 'Custom Header / Footer' style, the change would automatically be inherited by the 'Blue' style, but would not be inherited by the 'Big Font Blue' style, as it has its own customized version.
 Background ColorText ColorFont StyleHeader TemplateFooter Template
vBulletin Default#FFFFFF#00000010pt verdana, arial, helvetica, sans-serif<p>This is the default 'header' template!</p><div>This is the default 'footer' template!</div>
Custom Header / Footer#FFFFFF#00000012pt verdana, arial, helvetica, sans-serif<p>This is my custom 'header' template!</p><div>This is my custom 'footer' template!</div>
Blue#0000FF#FFFF0012pt verdana, arial, helvetica, sans-serif<p>This is my special BLUE 'header' template!</p><div>This is my custom 'footer' template!</div>
Big Font Blue#0000FF#FFFF0014pt verdana, arial, helvetica, sans-serif<p&g