Template Editor

From PokéFarm Q Official Wiki
Jump to: navigation, search

The Template Editor is used to create templates that can be inserted in the Public Forums, Personal Messages and when editing the personal About Me.

Template List

The Template list lists all created templates in alphabetical order. The first item on the list is to "Create new Template". Existing templates and their titles can be edited by clicking the template's name.

Template Editor

The Template Editor gives an input field for the template name and the template body that is inserted. The template body can contain any kind of content to be inserted into a post. This can include a full post template with BBCode, plain text phrases or just snippets of a code. The BBCode in the template does not have to work for it to be saved, but a preview is only possible if there are no errors.

Input for parameters.

Parameters can be used to enter different values when using a template. The parameter name has to be enclosed in angle brackets (< >) at the position where the entered value needs to be input. Parameters can be within BBCode and can include BBCode themselves, however it is not possible to enter a line break through a parameter. An example for a parameter usage is the following:

[highlight=black][colour=<Text Colour>]Current status: <Status>[/colour][/highlight]

Which gives the a prompt for the "Text Colour" value and the "Status" value each time the template is inserted or previewed.

A special parameter is the <|> parameter. It does not request an input value and instead determines where the cursor is placed when the template is inserted. If multiple <|> are within a template, then the first will function as the cursor marker while the second will be displayed as a plain text "<|>".

Note: This parameter may fail to properly position the cursor if the Full Editor is turned on.

Underneath the editor, the template can be saved, previewed and deleted. The option to delete a template is only available after it has been saved and a deleted template can't be retrieved.

Insert Template

Template selection.

A template can be inserted when creating or editing a Forum post, writing a PM, or editing the About Me. The "Insert..." button gives the option to either select pre-defined BBCodes or to select a template. If the template or BBCode requires parameters, then a parameter prompt is given before the content is inserted into the text box. If there was already content in the text box, then the template will be added in addition to it at the location of the text cursor.