Extension:BBCode

What can this extension do?
In addition to normal wiki markup, you can use BBcode markup as well. Additional features have been added to the BBcode markup while [img] has not been implemented.

Usage
supported tags:
 * [b] - bold
 * [i] - italics
 * [o] - overline
 * [u] - underline
 * [tt] - typewriter text
 * [sup] - superscript
 * [sub] - subscripts
 * [pre] - same as &lt;pre&gt;
 * [code] - same as &lt;pre&gt; but ignores wiki/bbcode markup
 * [color=color name|#hexcode] - sets text color
 * [bgcolor=color name|#hexcode] - sets text background color
 * [font=font family, font name] - sets font name/family
 * [font=normal] (use font inherited from DOM parent object)
 * [font=cursive] (cursive font)
 * [mono] and [font=mono|monospace|monospaced] (monospaced font)
 * [hr] and [line] - horizontal rule
 * [hr=PERCENT%|PIXELSpx] and [line=PERCENT%|PIXELSpx] - horizontal rule with restrictions
 * [float=left|right|top|bottom] - floats text to the left, right, top or bottom of the DOM parent object

examples:
 * &#91;b&#93; bold &#91;&#47;b&#93;
 * &#91;i&#93; italics &#91;&#47;i&#93;
 * &#91;o&#93; overline &#91;&#47;o&#93; (cannot show in wiki markup)
 * &#91;u&#93; underline &#91;&#47;u&#93;
 * &#91;s&#93; strikethrough ] &#91;&#47;s&#93;
 * &#91;sup&#93; superscript &#91;&#47;sup&#93;
 * &#91;sub&#93; subscript &#91;&#47;sub&#93;
 * &#91;tt&#93; typewriter text &#91;&#47;tt&#93;
 * &#91;color=red&#93; red text &#91;&#47;color&#93;
 * &#91;color=#FF0000&#93; red text &#91;&#47;color&#93;
 * &#91;bgcolor=yellow&#93; &#91;&#47;bgcolor&#93;
 * &#91;bgcolor=#FFFF00&#93; &#91;&#47;bgcolor&#93;
 * (cannot show in wiki markup) &#91;h1&#93; through &#91;h6&#93; uses headers just like &lt;h1&gt; through &lt;h6&gt;
 * &#91;br&#93; make a line break just like &lt;br /&gt; does


 * &#91;hr&#93; and &#91;line&#93; make a horizontal rule just like &lt;hr /&gt; does


 * (cannot show in wiki markup) &#91;hr=300px&#93; and &#91;line=300px&#93; make a 300 pixel wide horizontal rule just like &lt;hr width="300px" /&gt; does
 * (cannot show in wiki markup) &#91;hr=50%&#93; and &#91;line=50%&#93; make a horizontal rule that is 50% the width of the window just like &lt;hr width="50%" /&gt; does
 * (cannot show in wiki markup) float text in an html direction like that &rarr; &#91;float=right&#93; float text right &#91;&#47;float&#93;
 * (cannot show in wiki markup) &#91;font=Courier, monospace&#93; custom font family &#91;&#47;font&#93; please use fonts that work on all platforms or one of the shortcuts below.
 * (cannot show in wiki markup) &#91;font=mono&#93; monospaced font shortcut &#91;&#47;font&#93;
 * (cannot show in wiki markup) &#91;font=cursive&#93; cursive font shortcut &#91;&#47;font&#93;
 * (cannot show in wiki markup) &#91;font=normal&#93; normal font shortcut &#91;&#47;font&#93; is useful inside &#91;pre&#93; tags
 * the &#91;pre&#93; tag allows you    to      have        preformatted      text    in  a spiffy box
 * the &#91;code&#93; tag is like &#91;pre&#93; but all wiki markup is disabled and most bbcode is hidden. not bold

Download instructions
download the zip here and extract it into the $IP/extensions directory.

Installation
To install this extension, add the following to LocalSettings.php:

Configuration parameters

 * $allow_headers (bool) will enable or disable the [h1] through [h6] tags
 * default value: false


 * $allow_float (bool) will enable or disable the [float=left|right|top|bottom] tag
 * default value: false


 * $allow_complex_fonts (bool) will enable or disable the [font=font family, font name] tag
 * NOTE: regardless of the setting, [font=mono|cursive|normal] will still be usable
 * default value: false


 * $allow_cursive (bool) will enable or disable the [font=cursive] tag
 * NOTE: this is only honored if complex fonts are disabled
 * default value: false


 * $fixed_width_fonts (string) and $cursive_fonts (string) are the list of fonts to (try) use for monospace and cursive
 * NOTE: standard/multi-platform fonts: http://www.w3.org/TR/CSS2/fonts.html#generic-font-families
 * $fixed_width_fonts default value: Courier,'Lucida Console','DejaVu Sans Mono',monospace
 * $cursive_fonts default value:  'URW Chancery L','Apple Chancery','Monotype Corsiva','Lucida Calligraphy', cursive