Classe: Text_Filter_bbcode - X-Ref
The Text_Filter_bbcode:: class finds bbcode-style markup (see below) in a
block of text and turns it into HTML.
Parameters:
<pre>
entities -- If true before replacing bbcode with HTML tags, any HTML
entities will be replaced.
</pre>
Supported bbcode:
<pre>
[b]Bold Text[/b]
[i]Italics Text[/i]
[u]Underlined Text[/u]
[quote]Quoted Text[/quote]
[center]Centered Text[/center]
List of items
[list]
[*] Item one
[*] Item two
[/list]
Numbered list
[numlist]
[*] Item one
[*] Item two
[/numlist]
[url]http://www.horde.org[/url] -> Link to the address using the
address itself for the text. You can specify the protocol: http or
https and the port.
[url]www.horde.org[/url] -> Link to the address using the address
itself for the text. You can specify the port. The protocol is by
default http.
[url=http://www.horde.org]Link to Horde[/url] -> Link to the address
using "Link to Horde" for the text. You can specify the protocol:
http or https and the port.
[url=www.horde.org]Link to Horde[/url] -> Link to the address using
"Link to Horde" for the text. You can specify the port. The
protocol is by default http
[email]cpedrinaci@yahoo.es[/email] -> sets a mailto link.
[email=cpedrinaci@yahoo.es]Mail to Carlos[/email] -> Sets a mailto link
and the text is "Mail to Carlos".
</pre>
$Horde: framework/Text_Filter/Filter/bbcode.php,v 1.8.10.5 2006/01/01 21:28:38 jan Exp $
Copyright 2003-2006 Carlos Pedrinaci <cpedrinaci@yahoo.es>
Email validation based on Chuck Hagenbuch's
Mail_RFC822::isValidInetAddress.
See the enclosed file COPYING for license information (LGPL). If you did
not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
preProcess($text)
X-Ref
|
Executes any code necessary before applying the filter patterns.
param: string $text The text before the filtering.
return: string The modified text.
|
getPatterns()
X-Ref
|
Returns a hash with replace patterns.
return: array Patterns hash.
|