• No se han encontrado resultados

Historia de la razón

In document Revista de Abogacía (página 72-75)

Note:

To learn more about Replacement Variables, please read the Replacement Variables Introduction

The Replacement Variable Manager lists all of your styles, together with any replacement variables defined within them. This allows you to see at a glance the way in which any replacement variables you have defined are being inherited by child styles.

Refer to the Color Key at the top of the Replacement Variable Manager page to see how colors are used to indicate whether a replacement variable is customized in a particular style, or inherited from a parent style.

To add a new replacement variable, click the [Add New Replacement Variable] link next to any style listed on the Replacement Variable Manager main page.

On the Add New Replacement Variable page, you will find a form in which you can specify the style to which you want to add a new replacement variable, along with two text fields.

The first text field is for the text you want the replacement variable to find, and the second field should contain the text with which to replace the find text.

Note:

The find text is not case sensitive, meaning that dog will match DOG, DoG, dOG etc.

When you click the [Save] button, any child styles of the style to which you added the new replacement variable will automatically inherit the new variable, while parent styles will be unaffected. This is the principle of inheritance in action.

When a replacement variable is inherited by a style, you may customize it in that style and have the changes automatically appear in any of its child styles.

To customize a replacement variable, simply click the [Customize] link next to any replacement variable on the

Add New Replacement Variable

Back to Top

Customizing a Replacement Variable

Back to Top

main page.

This will load the Replacement Variable Customization form, which looks almost identical to the Add New Replacement Variable interface, and works in exactly the same way.

After making your changes, the new value will be automatically inherited by any child styles.

This section covers how to download and upload styles.

Downloading styles is handy when you want to make a backup of your templates and options, or share your work with other forum administrators.

Uploading styles is handy to revert to a backup or applying the same style to several boards. You can use this option to import a style that someone has given you.

Make sure you read and understand all the options to avoid incomplete style downloads / uploads.

Note:

When you upload or download a style, the process will not transfer any image files. Your image files should be managed with an FTP client.

If you have created a style of which you are proud, you may want to share it with other vBulletin

administrators. Alternatively, you may simply want to back up all your templates and style settings to a file on your computer.

Both of these actions are catered for by the Style Download system, which allows you to download all the customized StyleVars, CSS, Replacement Variables and Templates into a single XML file.

The Style Download form is relatively simple, with only a few controls to manipulate.

Clicking the [Download] button will instruct vBulletin to package your style up into an XML file and start downloading it to your web browser.

Note:

The XML file you download can not contain any image files. If your style includes custom images, you should download these separately using an FTP client.

If you have downloaded a vBulletin 3 XML style file from another vBulletin installation, or if you want to restore a style backup that you made yourself, you will have need of the vBulletin 3 Style Importer.

This system will read an XML file, convert the data inside it into StyleVars, CSS, Replacement Variables and Templates and write the data into your database.

Download / Upload Styles

Back to Top

Downloading a Style

Back to Top

Style Use this menu to pick the style you want to download

Title By default, the downloaded XML file will contain the title of the style as it exists on your web server. If you would like the XML file to store a different name for the style you are downloading, enter it here.

Filename This field allows you to specify the name of the XML file vBulletin will send to your web browser when you click the [Download] button. However, most browsers allow you to rename a file as you download it, so this field may be irrelevant to you.

Options The options give you a choice of two types of style download.

If you choose to Get customizations made only in this style, then the style XML file you download will contain only items that are customized specifically in the style you are downloading.

Items that are inherited from parent styles will not be included.

On the other hand, if you choose to Get customizations made in this style and all parent styles, the style XML file will contain not only items customized specifically in the style you are downloading, but also any items that have been customized in a parent style.

Uploading a Style

Back to Top

Note:

XML style files can not contain image files, so no images will be imported when using this system. If the style you are importing requires special images, you will need to upload them to your web server using an FTP client.

vBulletin's default templates are often updated during upgrades. This page shows you what customized templates may need to be reverted and recustomized as a result of the default templates changing.

If the page displays no modified templates then all your templates are up to date.

You can choose to modify or revert a template if it is listed.

Note:

The Find Updated Templates system is primarily of use to check for modified templates after running an upgrade script.

Either Upload XML File from your computer

If the XML style file you want to import is located on your own computer, use this control to find the file and upload it.

Or Import XML file from your server

If the XML style file you want to import is located on your web server, enter the file path to the file here.

Merge Into

Style If you are restoring a style backup, you will probably want to import the XML file over the top of the style of which it is a backup. To do this, select the style you want to merge into from the list provided. If no style is chosen from the list, a new style will be created and the data in the XML file will be imported into this style.

Ignore Style

Version When a style file is downloaded from vBulletin, the version number of the vBulletin exporting the file is included. If the version number included in the style file you are importing does not match the version number of the vBulletin doing the import a warning will be shown to alert you to possible incompatabilities. If you are confident that no errors will occur as a result of importing a style from a different version of vBulletin, use this control to force vBulletin to accept the file regardless of the stored version number.

Title for

Uploaded Style If you chose to create a new style rather than overwrite an existing style, vBulletin will use the style title included in the XML file as the title for the new style unless you specify an alternative title using this control.

Parent Style / Display Order / Allow User Selection

These controls are only applicable when creating a new style rather than overwriting an existing style. Their function is identical to that described in the section dealing with adding a new style.

Find Updated Templates

Back to Top

In vBulletin 3, any language-dependent text is kept separately from the HTML layout code.

This enables you the administrator to create (or download) versions of the user interface translated into multiple languages other than US English, making your board truly multinational and language-independent.

vBulletin 3 has introduced the ability to translate your board or modify the text displayed via the control panel, all without having to delve into the templates and HTML. This section will cover everything you need to know to translate your board, edit existing phrases, and add new phrases

A language contains a collection of phrases. Specifically, a language contains all the phrases that vBulletin has, broken down into various groups of phrases. For example, there is a Polls group that only contains phrases dealing with polls. You can specify the default language that guests will see; once a user is registered, he or she may change the language the board is displayed in.

Note:

Language settings apply to both the front-end and the control panels.

A phrase represents a single string containing text that could be translated. This may vary from a single word used on a button to an entire error message or email. Significant effort has been made to make phrases as gender-independent as possible, but there are still some problem areas. If you are trying to translate a phrase and having problems because of a language difference (such as a gender conflict), you may report it to us.

Note:

Some gender issues may not be addressable because vBulletin does not include a method to determine if a user is male or female. We recommend working around this by including both translations simultaneously.

This is similar to saying ‘him or her’ or ‘forum(s)’ in English.

Beyond any user-created languages, there are 2 that always exist. These are master languages and are generally hidden from being directly edited.

The Master Language is where all of vBulletin’s untranslated, default phrases exist. This allows an original copy of a phrase to exist at all times for reference purposes. You will never be able to edit this language directly.

The Custom Master Language is similar to the Master Language. However, the only phrases that will be inserted here are any custom phrases that you have created. This allows every language to have access to the phrase as if it were in the Master Language.

When editing phrases, you will notice strings such as {1} or {2}. These represent variables, and will be replaced with specific examples at runtime.

Let’s consider an example. Suppose you are working with phrase showing_avatars_x_to_y_of_z. By default, its text is:

At run time, this may take on a value such as:

Notice that {1}, {2}, and {3} have been replaced with specific values.

Now, suppose you wanted the output to look like this:

You could accomplish this by changing the phrase text to:

The order of the numbers does not matter. All that matters is that you reference the correct number for what you want.

Phrases are generally straightforward to use in templates. Simple phrases (without any variable portions) can be referenced like regular $variables; complex phrases are referenced similarly to template conditionals.

When referencing a phrase in a template, there are two things you have to know.

1. The variable name (varname) – this is what uniquely identifies a phrase and how phrases are referenced. Generally, the variable name reflects the phrase text directly; for example, the phrase with variable name poll_timeout has the text of Poll Timeout.

2. The phrase group – if the phrase is in a group, you will only be able to access it on pages that load

In document Revista de Abogacía (página 72-75)