Class Text_Filter_bbcode

Description

The Text_Filter_bbcode:: class finds bbcode-style markup (see below) in a block of text and turns it into HTML.

Parameters:

 entities -- If true before replacing bbcode with HTML tags, any HTML
             entities will be replaced.

Supported bbcode:

     [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".

$Horde: framework/Text_Filter/Filter/bbcode.php,v 1.8.10.9 2009/01/06 15:23:42 jan Exp $

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

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.

Located in /Text_Filter/Filter/bbcode.php (line 65)

Text_Filter
   |
   --Text_Filter_bbcode
Variable Summary
 array $_params
Method Summary
 array getPatterns ()
 string preProcess (string $text)
Variables
array $_params = array('entities' => false) (line 72)

Filter parameters.


Redefinition of:
Text_Filter::$_params
Filter parameters.
Methods
getPatterns (line 95)

Returns a hash with replace patterns.

  • return: Patterns hash.
array getPatterns ()

Redefinition of:
Text_Filter::getPatterns()
Returns a hash with replace patterns.
preProcess (line 81)

Executes any code necessary before applying the filter patterns.

  • return: The modified text.
string preProcess (string $text)
  • string $text: The text before the filtering.

Redefinition of:
Text_Filter::preProcess()
Executes any code necessaray before applying the filter patterns.

Inherited Methods

Inherited From Text_Filter

 Text_Filter::Text_Filter()
 Text_Filter::factory()
 Text_Filter::filter()
 Text_Filter::getPatterns()
 Text_Filter::postProcess()
 Text_Filter::preProcess()

Documentation generated on Sun, 30 Jan 2011 05:15:31 +0000 by phpDocumentor 1.4.3