How to create a BBCode

Tutorials for phpBB3. Try the Tutorials here and share Your own Tutorials
There is no support here! Only Read Access!
Locked
User avatar
Post Bot
BBCoder II
BBCoder II
Posts: 44
Joined: 04 Mar 2010, 20:53

How to create a BBCode

Post by Post Bot »

How to create a BBCode
Written by Stoker

A little guide to the people who doesn't know how to create a BBCode on their phpBB3 board.

This explanation of the BBCode is found in the FAQ:
BBCode is a special implementation of HTML, offering great formatting control on particular objects in a post. The use of BBCode is granted by the administrator, but it can also be disabled on a per post basis from the posting form. BBCode itself is similar in style to HTML, but tags are enclosed in square brackets [ and ] rather than < and >. For more information on BBCode see the guide which can be accessed from the posting page.

Tutorial:
To create a BBCode You have to go to the Administration Control Panel
Choose the Postings tab.
Now click the Add a new BBCode button down in the rigth corner.

You will get this screen:
Image

To make it easier I will use an example.
We will create a BBCode that makes a textarea with black borders and a white background.

In the BBCode usage area You put this code:

Code: Select all

[textarea]{TEXT}[/textarea]
In the HTML replacement area You put this code:

Code: Select all

<div style="border: 1px solid black; padding: 10px; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);">{TEXT}</div>
In the Helpline area You put this code:

Code: Select all

Textarea: [textarea]Your text here[/textarea]
Under Settings, Display on posting page You can choose if You want the BBCode to appear on the posting page. If so just check it. If not, do nothing.

The result will be this:

[textarea]Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur blandit, massa a posuere aliquam, lectus lectus hendrerit velit, ac vestibulum augue neque a est. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur metus. Curabitur quis libero. Morbi mollis, lacus porttitor tristique blandit, mauris mi congue sapien, a hendrerit dui felis suscipit elit. Etiam quis mauris hendrerit orci tincidunt egestas. Nam lobortis, leo id bibendum scelerisque, pede massa mollis neque, eu placerat risus diam ut tellus. Pellentesque auctor. Morbi sit amet augue. Nam purus felis, lacinia nec, aliquet sit amet, placerat id, eros. Proin eget augue. Ut aliquet. Nullam ut eros id odio iaculis varius.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus convallis ante bibendum est. Pellentesque mi mi, ultrices vel, dapibus sed, cursus laoreet, pede. Aenean gravida. Proin ut elit. Ut non erat pharetra erat placerat commodo. Curabitur at ligula. In hac habitasse platea dictumst. Proin vitae pede vitae metus consequat hendrerit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed elementum sapien in turpis. Fusce malesuada dapibus quam. Quisque venenatis turpis luctus massa. Nam tristique porta mauris. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut mauris enim, fringilla nec, consectetuer sed, dapibus nec, augue. Aliquam ligula diam, feugiat sit amet, adipiscing sit amet, venenatis sit amet, erat. Sed sed mi vitae nisi porttitor facilisis. Sed erat.[/textarea]

Edit 23. september 2008:
I have made a small video tutorial (no sound) that illustrates how to install a bbcode.
You can view it here:
BBCode Video Tutorial
Locked