Overview

Packages

  • Text
    • Filter

Classes

  • Horde_Text_Filter
  • Horde_Text_Filter_Base
  • Horde_Text_Filter_Bbcode
  • Horde_Text_Filter_Cleanascii
  • Horde_Text_Filter_Cleanhtml
  • Horde_Text_Filter_Dimsignature
  • Horde_Text_Filter_Emails
  • Horde_Text_Filter_Emoticons
  • Horde_Text_Filter_Environment
  • Horde_Text_Filter_Exception
  • Horde_Text_Filter_Highlightquotes
  • Horde_Text_Filter_Html2text
  • Horde_Text_Filter_JavascriptMinify
  • Horde_Text_Filter_JavascriptMinify_JsMin
  • Horde_Text_Filter_Linkurls
  • Horde_Text_Filter_Simplemarkup
  • Horde_Text_Filter_Space2html
  • Horde_Text_Filter_Tabs2spaces
  • Horde_Text_Filter_Text2html
  • Horde_Text_Filter_Translation
  • Horde_Text_Filter_Words
  • Horde_Text_Filter_Xss
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Text_Filter_Bbcode

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

Parameters:

entities - (boolean) Before replacing bbcode with HTML tags, replace HTML
           entities?
           DEFAULT: false

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

Copyright 2003-2012 Horde LLC (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.horde.org/licenses/lgpl21.

Horde_Text_Filter_Base
Extended by Horde_Text_Filter_Bbcode
Package: Text\Filter
Category: Horde
License: LGPL 2.1
Author: Carlos Pedrinaci cpedrinaci@yahoo.es
Located at Horde/Text/Filter/Bbcode.php
Methods summary
public string
# preProcess( string $text )

Executes any code necessary before applying the filter patterns.

Executes any code necessary before applying the filter patterns.

Parameters

$text
The text before the filtering.

Returns

string
The modified text.

Overrides

Horde_Text_Filter_Base::preProcess()
public array
# getPatterns( )

Returns a hash with replace patterns.

Returns a hash with replace patterns.

Returns

array
Patterns hash.

Overrides

Horde_Text_Filter_Base::getPatterns()
Methods inherited from Horde_Text_Filter_Base
__construct(), postProcess()
API documentation generated by ApiGen