Pear HTML BBcode Hyperlink
Posted
by rrrfusco
on Stack Overflow
See other posts from Stack Overflow
or by rrrfusco
Published on 2010-06-13T02:38:19Z
Indexed on
2010/06/13
2:42 UTC
Read the original article
Hit count: 324
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.
INSERT Snippet
[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
© Stack Overflow or respective owner