
- •Table of Contents
- •Preface
- •What This Book Covers
- •Conventions
- •Reader Feedback
- •Customer Support
- •Downloading the Example Code for the Book
- •Errata
- •Questions
- •What is vBulletin?
- •Why Have a Discussion Board?
- •Benefits of a Discussion Board
- •Why vBulletin?
- •History
- •Development
- •The vBulletin Advantage
- •Versatile
- •Performance
- •Customizable
- •Easy to Maintain
- •Other Features
- •vBulletin Licensing Options
- •Leased License
- •Owned License
- •Choosing a License
- •Example vBulletin Sites
- •Summary
- •Requirements
- •Disk Space
- •Bandwidth
- •System Resources
- •Shared Hosting
- •Semi-Dedicated Hosting
- •Dedicated Hosting
- •Other Options
- •Installing vBulletin
- •Tools
- •Downloading the Installation Files
- •File Extraction
- •Upload Preparation
- •Creating the Database
- •Command-Line Database Creation
- •cPanel Database Creation
- •File Editing
- •Uploading the vBulletin Files
- •Running the vBulletin Installation Script
- •Troubleshooting
- •Database Access Issues
- •Images/Styling Not Showing
- •PHP Errors
- •The vBulletin Control Panel
- •Importing Data into vBulletin
- •Downloading the ImpEx Script
- •Compatibility
- •Preparing for Upload
- •Editing the Configuration File
- •Upload the ImpEx Script
- •Running the ImpEx Script
- •Default Usergroups
- •Securing vBulletin
- •Help & Support
- •Summary
- •The vBulletin User Experience
- •How to Get to the Board?
- •What the End Users See
- •Site Logo
- •Forum Title, Login Box, and Navbar
- •Welcome Banner
- •Main Body of the Forum
- •What's Going On
- •Footer
- •Touring the Main Forum—Unregistered Users
- •No "New Threads" for Unregistered Users
- •Registering on a vBulletin Board
- •Touring the Forum—Members
- •New Threads
- •Replying
- •Editing a Message
- •Private Messages
- •BB Code
- •User Tools
- •Display Modes
- •Navbar Changes for Members
- •The vBulletin Administrator Experience
- •Forum and Thread Tools
- •The AdminCP
- •Control Panel Home
- •Latest Version Information
- •vBulletin Options
- •Forum Management
- •Editing and Adding Forums
- •Editing Existing Forums
- •Moderation Options
- •Forum Styling
- •Access Control Options
- •Forum Posting Options
- •Enable/Disable Features
- •Branding
- •Changing the Logo
- •Undoing the Change
- •Summary
- •Types of Customization
- •CSS Modifications
- •Changing the Table Title Text
- •Viewing Changes
- •Undoing the Changes
- •Phrase Modifications
- •Searching for Phrases
- •Making Changes
- •Viewing the Changes
- •Undoing Changes
- •Template Modifications
- •Accessing Templates
- •Exploring a Template
- •Template Structure
- •Adding a FORUMHOME Sidebar
- •Two Changes
- •PHP Code Modifications
- •PayPal Modification
- •File Modification
- •Hacks
- •Pros and Cons of Hacking a vBulletin Board
- •Finding a Hack
- •Installing a Hack
- •Backing Up a Hack
- •Commercial Hacks
- •Summary
- •Setting Up a Forum
- •Creating the Forum
- •Forum Permissions
- •Viewing Permissions
- •Opening the Forum
- •Super Administrators
- •Creating a Super Administrator
- •Other Changes to the config.php File
- •Admin Log Viewing Permission
- •Admin Log Pruning Permission
- •Query Running Permission
- •Undeletable and Unalterable Users
- •Maintaining the Database
- •Backing Up the Database
- •Repairing and Optimizing the Database
- •Some Maintenance Issues
- •Smilies
- •Editing a Smilie
- •Adding a New Smilie
- •Uploading a Smilie
- •Creating Your Own Smilies
- •Avatars
- •Adding Avatars
- •Storing Avatars
- •Summary
- •When to Upgrade
- •Preparing for Upgrade
- •Migrating Changes
- •File Compare Utilities
- •Uploading the Files
- •Running the Upgrade Script
- •Testing the Upgrade
- •Unveiling the Upgrade
- •Summary
- •Styling vBulletin
- •Template Lifecycles
- •Lifecycle 1—Constant Change
- •Lifecycle 2—Working Behind the Scenes
- •Editing the Default Style
- •Changing Image Paths
- •Other Editable Elements
- •Some Tips about Editing Styles
- •Adding a New Style
- •Editing the Style
- •Saving the Style
- •Downloading the Style
- •Making the New Style into the Default
- •Distributing a Style
- •Installing a New Style
- •Summary
- •Hacking vBulletin
- •Making the Changes
- •Locating the Template
- •Hacking the pm_newpm Template
- •Testing the Hack
- •Hack Distribution
- •Tips for Hack Distribution
- •Plugins and Products
- •Getting Plugins and Products
- •Adding a Product
- •Adding a Plugin
- •What If Things Go Wrong?
- •Summary
- •Default Usergroup Settings
- •(COPPA) Users Awaiting Moderation
- •Administrators
- •Moderators
- •Registered Users
- •Super Moderators
- •Unregistered / Not Logged In
- •Users Awaiting Email Confirmation
- •Banned Users
- •Default vBulletin Database Tables
- •Moving Servers in Six Easy Steps
- •Cookie Check
- •Back up Database
- •Download the vBulletin Files
- •Transfer to New Server
- •Database Restoration
- •Back Online
- •Graphics
- •Global Post Text Find and Replace
- •Programming Standards
- •Braces
- •Indenting
- •Give Operators Space
- •String Quoting
- •Return Values
- •SQL Queries
- •Naming Conventions for Functions
- •Summary
- •vBulletin Directory Structure
- •Notes
- •Official vBulletin Sites
- •Main vBulletin Hack Site
- •vBulletin Styles and Templates
- •vBulletin Add-Ons
- •Index

Installing and Configuring vBulletin
The next thing you need to do is to find a file called config.php.new that resides inside the includes folder inside the upload folder (the folder we just renamed vb). Rename this file
config.php.
Renaming config.php.new as config.php
Before you upload the vBulletin files to the web server, you will need to make some changes to the vBulletin configuration file includes/config.php.
File paths
From now on we will define the names and locations of vBulletin files relative to the vBulletin root folder, so includes/config.php means config.php in the includes folder.
Open this file up in a text editor. (We are using UltraEdit.)
If you plan on keeping your installation of vBulletin as close to 'out of the box' as possible and don't plan on making many customizations, then editing the config.php file is one of the few times where you will need to edit raw PHP code. Don't worry if you are unfamiliar with PHP as this file is heavily commented in order to help you fill in the necessary information.
Of the many settings in this file, only the first few need concern you, and very little of the file needs to be edited in order to create a working vBulletin configuration file.
Creating the Database
Before you move to this stage, you need either to have a database already created on your web server or to create a new one. vBulletin can safely share a database with other software you might be running on your server, so if your host only allows you to have one database and you're already using that, you're still in luck!
Two of the easiest ways of creating a database are either via cPanel or using the command-line via SSH (Alternatively, you may be able to use Telnet access to your server—but not all hosts allow this.)
20

Chapter 2
Command-Line Database Creation
If your web host allows you to have root access to your web server, you can set up a new database for vBulletin to use via the MySQL command line.
1.Begin by logging in to your server via SSH or Telnet as the root user (or some other user with permission to control MySQL at the root level). Not all web hosts allow this, so check before trying.
2.Next, you need to start the MySQL command-line utility. This is done by typing the following (although the path you use might differ; again, if your host allows you to have access like this, then they will be able to provide you with the necessary details):
/usr/local/mysql/bin/mysql -uroot –p
You will now be asked for the MySQL root password (usually your web server logon password).
3.Once logged in you should see the following prompt:
mysql>
4.To see the list of databases that already exist, type the following command:
SHOW DATABASES;
5.If you want to add a new database then the name you give that one must be different from all existing databases.
To create a database called vb_database type the following:
CREATE DATABASE vb_database
6.Once you have created the database, you need to create a MySQL user account with permission to access the new database. Doing this is a security precaution as you should never have PHP scripts communicating to MySQL with root privileges. In this example, we will name our new user vb_user and give the account a password of password. Replace those values as appropriate when you type the following:
GRANT ALL ON vb_database.* TO vb_user@localhost IDENTIFIED BY 'password';
7.Job done!
cPanel Database Creation
The interface you are presented with in cPanel will vary a lot from host to host, so the following should only be used as a guide.
1.First, click on the MySQL Databases icon.
2.From here you can create a new MySQL database. Here we are creating one called
vb_database.
Creating a new MySQL database
21

Installing and Configuring vBulletin
3.Next, you need to create a new user for the database and assign a password for them.
Creating a new user
Prefixes
Some hosts have configured cPanel and phpMyAdmin to add a prefix to the database name and username.
4.Now you have to add the user to the database so they can have access and control. Give the user ALL permission privileges. (Not doing this is a common source of errors when installing vBulletin.)
User permissions
5.Job done!
Using phpMyAdmin
For information on using phpMyAdmin consult your web host or visit the phpMyAdmin site at http://www.phpmyadmin.net. Different hosts use different methods, but if the above methods don't seem to be available, then you can also create new databases through phpMyAdmin by accessing the main screen and clicking Create new database, and then filling in the name of the database, username, and password text boxes.
22