tags:

views:

25

answers:

0

Has anyone used the PEAR HTML BBcode Package?

I don't really understand why hyperlink target _blank does not open a new tab in firefox.

SQL INSERT Snippet (string)

[url=http://site.com t=_blank]Link[/url]

PHP Require PEAR

require_once 'HTML/BBCodeParser.php';
$options = @parse_ini_file('BBCodeParser.ini');  
$parser = new HTML_BBCodeParser($options);
$parser->setText($text);
$parser->parse();
echo $parser->getParsed();

BBCodeParser.ini

[HTML_BBCodeParser]
; http://articles.sitepoint.com/article/bb-code-php-application/
; possible values: single|double
; use single or double quotes for attributes
quotestyle  = double

; possible values: all|nothing|strings
; quote all attribute values, none, or only the strings
quotewhat   = all

; the opening tag character
open        = "["

; the closing tag character
close       = "]"

; possible values: true|false
; use xml style closing tags for single html tags (<img> or <img />)
xmlclose    = true

; possible values: a comma seperated list of filters
; comma seperated list of filters to use
filters     = Basic,Extended,Links,Images,Lists
; filters     = Basic,Extended,Links,Images,Lists,Email,MyBB