BBCode or Bulletin Board Code tags are a lightweight markup language used to format the posts in the forums.
To write text as Bold in the post, we use the Bold BBCode to make it bold. Example:
[b]bolded text[/b] - to make the text bold
It will be parsed as bolded text when posted.
[i]italic text[/i] - to make the text italic
It will be parsed as italic text when posted.
Below is a Nice preview of BB Codes usage in the Forum while posting replies to a Thread :
Below is the Preview, How this Text will be parsed :
Similarly, we use some other BBCodes too for formatting the Post. [img], [u] and [url] are some common examples.
Enable/Disable BB Codes
There are many BB Codes embedded in PHP-Fusion which can be Enabled/Disabled anytime easily. To manage BB Codes, just Login as Administrator and go to Admin Panel → System Admin → BB Codes
Below is a Preview that How BB Codes Administration Panel will look like :
The section titled Enabled BB Codes shows the list of BB Codes which are enabled on your Website and the section titled Disabled BB Codes shows the list of additional BB Codes which can be enabled to use in your Website.
As you can see in the Preview above, there are some Details given with the BB Codes, i.e, Name, Icon, Description, Usage and Order.
Name is the name given to the BB Code by its Author.
Icon is the Icon image which will be shown as the BB Code button while posting.
Description is the detail about the BB Code explaining its features.
Usage is the pattern/syntax for using the BB Code in the post.
Order is the arrangement order of the BB Codes. BB Codes buttons are shown one after another by this order.
The BB Codes can be Enabled/Disabled anytime by clicking the Enable or Disable Link given on the Right of the BB Code.
Uploading Custom BB Code Addons
There are many custom BB Code Addons made by Developers which are available at PHP-Fusion Addon Database for free to install on your Website.
To Install a Custom BB Code, follow the given steps :
Extract the files from the archive and the folder structure will look like this :
You can also read the extracted file readme-en.txt for quick reference.
Use a FTP Program or File Manager to connect to your website's root folder. Upload the files mybbcode_include.php and mybbcode_include_var.php to the folder /includes/bbcodes/. Upload the file mybbcode.php into /locale/English/bbcodes/. Remember, if you are using any other locale, say German, then you have to upload the file mybbcode.php into /locale/German/bbcodes/
Now Login as Administrator and go to Admin Panel → System Admin → BB Codes
Now you can see the new custom BB Code in the Disabled BB Codes List as shown below :
Click the Enable link on the Right of this BB Code to enable it.
Test BB Codes
This is the place where you can Test out your installed BB Codes. You can find the Link for Test BB Codes on the same BB Codes Administration page. Below is the image highlighting the Link :
After going to Test BB Codes, you can write some Text in the Box, apply some BB Codes to the text and Test them to see How it looks. Below is a Preview testing BB Codes :
Below is the Preview that How the BB Codes Test Output will look like :
Order of BB Codes
Order of BB Codes is the arrangement order by which they will be shown on a page.
For Example, by default, Smiley BB Code is above all BB Codes. See the image below :
So, let us Move the Bold BB Code above the Smiley BB Code. See the image below :
Now, after moving, let us see that How the BB Codes will be shown as. See the image below to see :
That is it. This was all about using BB Codes in PHP-Fusion.