
- •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

Programmer's Reference
Moving Servers in Six Easy Steps
If your discussion board grows beyond the capabilities offered by your current host, then you can migrate the whole vBulletin installation from one server to another with the minimum of fuss and effort. In this section we will look at how to do this.
We can break down the server move into six easy steps.
•Cookie check
•Back up database
•Download the vBulletin installation
•Transfer to new server
•Restore database
•Back online!
Cookie Check
The first thing to do is check on the current cookie settings. Setting a specific cookie domain and cookie paths can cause problems for you when moving servers or even changing the URL of the discussion board. To prevent these problems, reset your cookie path to / and remove any cookie domain value that might be present before carrying out the server move.
A warning about cookies!
An incorrectly set cookie domain or path can prevent you from accessing your control panel!
Back up Database
The next step is to back up the database. Refer to Chapter 5 for full details on how to do this. Make sure that you use an up-to-date backup and that you've locked the forum prior to carrying out the backup so that there can be no changes made to the data.
Download the vBulletin Files
Using an FTP program, download your current vBulletin installation to your PC. You could reinstall vBulletin onto the new server, but you will lose any changes you made.
Transfer to New Server
The quickest and easiest way to transfer the database to a new server is using SSH or Telnet.
198

Chapter 9
New Host Tips
Make sure that your new host allows you to have such shell access. (They might not allow it as standard, but check to see if they will allow it temporarily to allow you to carry out the move.)
Follow this simple transfer process.
1.Telnet into your existing server.
2.Type the following:
ftp NEWSERVER
Where NEWSERVER is the hostname or IP address of your new server. You will be prompted for a username and password to login.
3.Next, type:
bin
cd /PATH/TO/NEW/DIRECTORY
put /PATH/TO/DATABASE/DUMP.SQL
replacing /PATH/TO/NEW/DIRECTORY by the path to the directory where you want to place the database backup and /PATH/TO/DATABASE/DUMP.SQL by the path to the database dump. If you omit this step, the backup will be put into the root of the server.
4.This process will now transfer the database.
5.When completed, type:
close quit
6.Verify that the database has been transferred.
Database Restoration
1.On the new server, create the database in which your vBulletin data will be installed.
2.Telnet/SSH into the new server.
3.Type:
mysql -USERNAME -p NEWDATABASENAME < PATH/TO/DUMP.SQL
replacing USERNAME by the username to access the database, NEWDATABASENAME by the name of the new database, and /PATH/TO/DUMP.SQL by the path to the database backup file.
Back Online
Upload your vBulletin files (the ones you downloaded earlier) remembering first to edit the
includes/config.php file. Edit $servername, $dbusername, $dbpassword, and $dbname with the
values that correspond with the new server.
199