Page 1 of 1

How to add BBcodes in phpBB

Posted: Tue Dec 26, 2017 9:55 am
by steven
phpBB is a very versatile program allowing you to easily add BBcodes. BBcodes are a tool that allows you to use HTML formatting to perform many functions when creating topics and replies. BBcodes are considered custom codes because they are not part of the original phpBB package.

To add a BBcode you must have administrator privileges.

To begin you must first log in to phpBB. Once you log in, select ACP from the top of the phpBB page.

Image

After you log in the ACP or Administration Control Panel page appears. The ACP panel is the primary configuration tool for your website.

Select the Posting tab located at the top of the ACP page.

Image

The posting page opens and displays all the BBcodes you have entered. If you have not created any BBcodes the information area will be blank.

Select Add a new BBcode from the lower right of the BBcode page

Image

The add a new BBcode page opens.

Image

On this page enter your custom BBcode.

Image

BBcode usage consists of three parts. The first part is the opening tag containing the BBcode name enclosed in brackets. The middle part may contain variables enclosed in braces. Variables may contain a combination of numbers and/or text. Variables are applied inside each BBcode so the same variable name can be reused in other BBcodes. The last part is the closing tag which must enclosed in brackets and contain a forward slash followed by the BBcode name. You must use opening and closing tags so phpBB knows where to start and stop applying the code. If you do not format BBcode usage correctly the BBcode will not work.

HTML replacement uses information from BBcode usage with HTML code to perform a function on your page. The HTML code may or may not contain variable names from BBcode usage. For example, codes for line breaks or adding HTMl character spaces do not require variables. If variables are used, the names in BBcode usage and HTML replacement must be identical and enclosed in braces. HTML replacement determines how phpBB applies HTML code using variables and/or text specified in BBcode usage.

Help line displays text that appears when you hover, or place your mouse over, the BBcode command at the top of the edit screen. Construct the help line so users can easily determine how to use the BBcode. If this line is blank no help line will appear.

The last option is Display on posting page. If you check this box, your BBcode name will appear as a selection at the top of the post edit window. If you do not not check the box the BBcode will be hidden. If hidden, you can still use the code by entering it manually in a post. This is useful if you want to hide a special BBcode for administrators and/or moderators.

So for this example, entering the code below in body of your post:

Code: Select all

This is some [highlight=yellow]highlighted[/highlight] text.
Would look like the line below after posting your page:
This is some highlighted text.

Changes to the HTML standard may prevent use of some formatting codes which are controlled by CSS.