Adding bbcode to your e107 plugin is as simple as including a .bb file in your plugin folder. eg. mycode.bb (See
for sample files). If you want to include a single tag bb code (ie [hr]) then you need to add a _ before the bbcode name (ie _hr.bb).
Any bbcodes added in a plugin are available system-wide.
There are two parameters passed to a bbcode:
is any text appearing after the '=' within the opening tag.
is the text appearing between the opening and closing bbcode tags.
The bbcode must return the HTML required to execute the task - this may take anything from a line or two up to tens or even hundreds of lines of code.
All the normal coding features, such as global variables, including files and the like, are available in the normal way.
To add a bbcode button to your textarea you need to create an
file in your plugin folder. Here is an example of such a file:
: unique name. (if a .bb file is used it should match.)
: defaults to the 'addhelp' function. leave blank for simple text insertion or use 'expandit' for popups.
: var sent to onclick function. eg. you could send the container ID of the div to expand if expandit is used for the $bb['onclick'] parameter.
$bb['icon']: path to the button.
: the help text to display on mouseover.
: optional function to be called at time of loading.
: optional vars to be sent to the function. eg. for the example above the following would be executed:
To be sure that your bbcode is registered in e107, check the Preference Viewer in admin -> database and look for your file in the pref bbcode_list.
If it is not shown, run the Plugin Scan & View in admin -> database.
e_bb.php extension is not listed in supported extension for version 2 - reason for red checkbox
New 13.7.2018 :
e_bb.php is now supported addon in scan plugin directory