The sfBBCodeParserPlugin allows you to parse BBCode and get the corresponding html
output. There are 6 available filters who provide the following tags:

Basic

b

i

u

s

sub

sup

Extended:

color

size

font

align

quote

code

h1

h2

h3

h4

h5

h6

Images

img

Links:

url

Lists

list

ulist

li

Email

Email

You can activate the filters you want, for each filter you can also tell witch tags
can be use. And finally you can make your own filters with your own tags.
Almost everything can be configured in the plugin, filters, tags, attributes, opening
and closing character...

The plugin is based on the library HTML_BBCodeParser(http://pear.php.net/package/HTML_BBCodeParser)
but the PEAR dependencies were removed so you don't have to install it in order
to use the plugin.

The sfBBCodeParserPlugin allows you to parse BBCode and get the corresponding html output. There are 6 available filters with many tags.

You can activate the filters you want, for each filter you can also tell witch tags can be use. And finally you can make your own filters with your own tags. Almost everything can be configured in the plugin, filters, tags, attributes, opening and closing character...

The plugin is based on the PEAR library HTML_BBCodeParser (http://pear.php.net/package/HTML_BBCodeParser) but the PEAR dependencies were removed so you don't have to install it in order to use the plugin.

Developers

License

Original PEAR library (http://pear.php.net/package/HTML_BBCodeParser) by Seth Price and Stijn de Reede.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release 0.2.2 - 05/08/2007

Release 0.2.0 - 21/05/2007

Release 0.1.0 - 24/10/2006

sfBBCodeParserPlugin

The sfBBCodeParserPlugin allows you to parse BBCode and get the corresponding html
output. There are 6 available filters who provide the following tags:

Basic

b

i

u

s

sub

sup

Extended:

color

size

font

align

quote

code

h1

h2

h3

h4

h5

h6

Images

img

Links:

url

Lists

list

ulist

li

Email

Email

You can activate the filters you want, for each filter you can also tell witch tags
can be use. And finally you can make your own filters with your own tags.
Almost everything can be configured in the plugin, filters, tags, attributes, opening
and closing character...

The plugin is based on the PEAR library HTML_BBCodeParser
but the PEAR dependencies were removed so you don't have to install it in order
to use the plugin.

Installation

Install the plugin

$ symfony plugin:install sfBBCodeParserPlugin

(or download and unzip in your /plugins directory or make a SVN:externals)

Clear you cache

$ symfony cc

Configuration

The plugins comes with 2 configurations files:

config/bb_code_parser_config.yml: witch contains the main configuration.

To customize these configurations, just copy this 2 files in the config folder
of your project or your application. They will automatically override the ones
provided by the plugin. Then, feel free to add filters, tags...

To know how to implement your filter class, look at the standard filter classes
like sfBBCodeParser_Filter_Email provided by the plugin and check
the library API on the PEAR website.

Demo

If you want to see the demo, enable the sfBBCodeParser module in your settings.yml
file, then call the /sfBBCodeParser URL. (If you have desactivated the default symfony routes,
a routing.yml file is included in the config folder of the plugin. (copy paste it
in the routing.yml of your application.

If the demo doesn't work, check the note above about the escaping strategy of your
application.