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

Chapter 4

Undoing the Changes

If you scroll down to the location where you made the changes in the All Style Options page, you will notice that the attributes you changed are highlighted in red as shown below:

This allows you to find the changes easily so that you can re-tweak the settings you made. If, however, you don't like the changes and want to reverse the changes you made to a section, then there is a quick way to do this. At the bottom of each section that's been changed, there is a checkbox as shown below.

Reversing the changes made to a section is done by checking the box and clicking the Save button at the bottom of the page.

Phrase Modifications

There is very little built-in text in the forum. By "built-in text" we mean text that is hard-coded into pages and can only be changed by making changes to the source files. In fact, almost all the text that you see (apart from forum text and titles and such) is stored as phrases, and there is a great deal of logic behind separating the code of the forum from the text.

To begin with, it makes it easy to create language packs for the forum that customize the base language of the forum. There are in fact a number of language packs that have been created for vBulletin, including French, Spanish, Arabic, and Hebrew. Links to a number of these can be found on the official vBulletin site at http://www.vbulletin.com/forum/

showthread.php?t=99151.

Another major advantage is that, in order to make a change to the text in the forum, an administrator does not need to change critical files containing PHP code, where a single error could bring down the forum. It is far safer and easier to have the text separated from the code (just as the code is separated from the CSS styling information as we saw above).

Making changes to phrases is easy—there's an interface that handles the searching for the right phrase to change, making the change, and also reverting any changes back to the original phrase.

91

Customizing Your vBulletin Board

Let's examine how to make changes to phrases by looking at how to change the forum rules page (shown below) that is shown to all new members who sign up for registered status on the forum.

Follow along with us as we show you how to make changes to the forum rules phrase in vBulletin. Feel free to make different changes to those we make—it's not the change that you make that's important, but the concept.

Searching for Phrases

Begin again in the AdminCP, and choose Languages & Phrases in the left-hand menu to expand it. From there you can click on Phrase Manager and look for the phrase you want to change, but there are a lot of phrases, so you may prefer to search for a phrase using Search in Phrases (shown below). As you get more experience with vBulletin, you will eventually get a feel for where phrases are, but for now use the search feature.

This will bring up the search interface, which contains a number of options.

92

Chapter 4

This interface gives us the option to search for:

Text in the phrases

Variable names (we'll come to these in a moment)

Text and variable names

We can now take a small portion of the text from the rules and use this as a search parameter, and then click on Find. We will use "Registration to this forum is free" and search for phrase text only (detailed in the image below).

vBulletin then searches through all the phrases for the appropriate string and displays all phrases that contain it. In this case there is only the one, as you can see in the image below. To aid you in spotting the search string, it is underlined and displayed in yellow.

93

Customizing Your vBulletin Board

94