- •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
Chapter 4
Search tips
You might not always find the phrase you are looking for on your first search. The main reason for this is that the phrases can contain HTML formatting tags (such as <p> and <p/>) which form part of the phrase but you might not notice them otherwise. For example, if we had searched for the string "Forum Rules Registration to this forum is free" we wouldn't have had a match because the actual HTML is "Forum Rules</strong></p> <p>Registration to this forum is free" (as you can see in the image opposite).
The old saying is as relevant today as ever—if at first you don't succeed, try, try, and try again!
Making Changes
Now that you've found the phrase that you want, you can go about editing it. To get the ball rolling, click on the Edit button that appears next to the phrase.
95
Customizing Your vBulletin Board
This will bring up the phrase editing page allowing you to make changes to the text (shown below).
This screen contains a lot of information and features, so let's take a moment to familiarize ourselves with the information.
At the top, is the phrase description and title (shown below). This is a standard phrase (that is, it appears in the standard phrase category), and has the title forum_rules_description.
96
Chapter 4
Below that, is the variable name assigned to the phrase (see below). Here this is $vbphrase[forum_rules_description]. Knowing the variable name for a particular phrase is really useful, because it allows you to have control over which phrases are displayed. If this is placed into a vBulletin template then the text of the phrase will be shown in that location. Don't worry if this doesn't make any sense right now—it will shortly! Similarly, if you remove the phrase variable from the code, then the text is removed from the displayed page.
Finding phrases
Navigating the code by phrases can be a good way to work through the vBulletin code. If you can find a bit of text in the code, you can then search for the phrase that contains that text. Later we'll show you how to search through the templates for phrase variables.
Below this, appears the existing phrase text, as you can see in the image below. This is there as a safeguard so that you know for sure what you are editing as well as the current wording of the phrase.
Below this, comes the box that does the work—this is where we enter new text. This can be confusing for newcomers to vBulletin, because the edit box is labeled as Translations. However, this is the right way to go about editing the phrases.
You can also choose to copy the existing text into the edit box by clicking on the Copy Default Text button, which means that you don't have to bother retyping it or messing around with cut and paste.
We just want to make some small changes to the rules, so we'll copy the existing phrase by using the Copy Default Text button. The existing text is then placed in the edit box ready for editing as shown below:
Let's just make the small change to the text shown in the image below:
We can customize this a little further if you want. Take a look through the text of the phrase, and you will find the following lines:
If you would like to cancel the registration, click <a href="{1}">here</a>
97
Customizing Your vBulletin Board
and
<p>Although the administrators and moderators of {2} will attempt to
and
All messages express the views of the author, and neither the owners of {2},
and
<p>The owners of {2} reserve the right to remove,
See the instances of {1} and {2} in the phrase. If you take a look at the rules page, you will see that {1} corresponds to the URL of the forum, while {2} is the forum name, both of which are shown below:
Using these variables we can customize the addition we made to the rules.
<p>The decisions of the admin or moderators of {2} are final!</p>
We're now done making the changes to the phrase, so we click on the button marked Save at the bottom.
Viewing the Changes
Now view the change. Go to the front page of the forum as an unregistered/unsigned in member (clicking on Log Out at the top of the AdminCP screen or on the navbar will allow you to do this), and you can start the registration process and take a look at the updated phrase, which is shown below:
Undoing Changes
Be careful when making changes to phrases, as there is no automatic undo or revert feature available. The best thing to do is to keep a backup of any of the text that you change in case you change your mind and want to go back to the original wording.
98