Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Building Forums With vBulletin (2006).pdf
Скачиваний:
42
Добавлен:
17.08.2013
Размер:
6.3 Mб
Скачать

Chapter 4

Recovering phrases

If you didn't keep a backup of the phrases that you changed, all is not lost. They are all stored in the file \install\vbulletin-language.xml. If you search this file, you'll find all the phrases that vBulletin uses.

Template Modifications

So far we've looked at how to modify CSS stylesheet information, which controls how vBulletin looks, and the phrases, which control the text. Both of these modifications allow you to radically change how your vBulletin board looks and feels. Template modifications allow you to do a lot more and to make much more radical changes to your vBulletin installation. In fact, templates control nearly every aspect of a vBulletin board. Each page that the end user sees is the result of one or more templates coming together and displaying information.

Let's take a closer look at templates in vBulletin.

Templates are powerful yet complicated

Just a note about templates though, before we go further. Templates are quite complicated, and you need a good knowledge of how HTML works to make small changes. To make bigger changes you need to have an understanding of how the templates work. Work methodically and make notes of the changes you make. That way, if something goes wrong, you can undo it. If things go drastically wrong, you can always reverse all the changes made.

Accessing Templates

To access the templates, first click on Styles & Templates in the left-hand navigation pane to expand the menu. From there, click on Style Manager as shown below.

It's the next stage that many people find confusing—finding the templates! The way to get the right-hand frame to display the templates is to click on the 'expand templates' button on the right of the screen. It looks like << >> (shown below).

This now displays some of the templates used by vBulletin, some of which are shown below. Most of the pages that you see when using a vBulletin board are made up of one or more of these templates. (Generally, a page is made of three: a header, a footer, and the main body.)

99

Customizing Your vBulletin Board

Here, templates are grouped. Headings are in blue, and template names are in white. As you will see later, edited templates appear in red text to make finding them easier.

To display all the templates, you have to click on another button, again marked << >>, to expand all the template groups.

100

Chapter 4

You will now see a full listing of the vBulletin templates available. There are a significant number, and they are grouped into 34 categories:

BB Code Layout Templates

Buddy List Templates

Calendar Templates

Editor Templates

FAQ Templates

Forum Display Templates

Forum Home Templates

Help Templates

Instant Messaging Templates

Member Info Templates

Modify User Option Templates

Navigation / Breadcrumb Templates

New Posting Templates

Page Navigation Templates

PHP Include Code Templates

Private Message Templates

Poll Templates

Postbit Templates

Post Icon Templates

Printable Thread Templates

Registration Templates

User Reputation Templates

Search Templates

Show Groups Templates

Show Thread Templates

Smilie Popup Templates

Subscribed Thread Templates

Paid Subscriptions Templates

Thread Administration Templates

User Control Panel Templates

User Profile Field Templates

User Note Templates

Who Posted? Templates

Who's Online Templates

101

Customizing Your vBulletin Board

Exploring a Template

Let's take a close-up look at a template. We're going to examine the FORUMHOME template, which is the main template that controls the look and operation of the forum homepage. To find this template, scroll down the Forum Home Templates section and double-click on FORUMHOME to open it. The template opens in vBulletin's template editor as shown below:

In-built template editing

By now you're probably noticing how little you have to use any external editors when working with vBulletin—most features can be edited through vBulletin's own editing interface. This saves the administrator a lot of time and effort, as well as reducing the time it take to make changes—the changes are done directly to the data on the server, and no FTP program is required!

You might not believe it, but the code shown is the code that underlies the main vBulletin forum page that you see when viewing the forum.

102