BBCodeHandler
extends StringParser_BBCode
in package
BBCodeHandler class
This code comes from the forum module library and is now used by WYSIWYG class
Tags
Table of Contents
Methods
- __construct() : mixed
- Construct the BBCodeHandler
- bbcode_stripcontents() : string
- remove everything but newlines
- convertlinebreaks() : string
- convert different linebreaks to \n
- convertlinks() : mixed
- Convert links
- do_bbcode_code() : mixed
- convert [code] tags
- do_bbcode_img() : mixed
- for embedding images
- do_bbcode_quote() : mixed
- convert [quote] tags
- do_bbcode_url() : mixed
- embed URLs
- removeDoubleEscapes() : string
- Remove double escapes
- stripBBtags() : unknown
- strip BB tags
- is_valid_url() : bool
- dummy function which returns true (causes problems otherwise, since it's already been 'regexed' in convertlinks())
- setDefaultSettings() : mixed
- Set default settings for the BBCode Handler
Methods
__construct()
Construct the BBCodeHandler
public
__construct() : mixed
bbcode_stripcontents()
remove everything but newlines
public
bbcode_stripcontents(string $text) : string
Parameters
- $text : string
Return values
string —$text with newlines
convertlinebreaks()
convert different linebreaks to \n
public
convertlinebreaks(string $text) : string
Parameters
- $text : string
Return values
string —$text with unified newlines (\n)
convertlinks()
Convert links
public
convertlinks(string $text) : mixed
Parameters
- $text : string
do_bbcode_code()
convert [code] tags
public
do_bbcode_code(mixed $action, mixed $attributes, mixed $content, mixed $params, mixed $node_object) : mixed
Parameters
- $action : mixed
- $attributes : mixed
- $content : mixed
- $params : mixed
- $node_object : mixed
Tags
do_bbcode_img()
for embedding images
public
do_bbcode_img(mixed $action, mixed $attributes, mixed $content, mixed $params, mixed $node_object) : mixed
Parameters
- $action : mixed
- $attributes : mixed
- $content : mixed
- $params : mixed
- $node_object : mixed
Tags
do_bbcode_quote()
convert [quote] tags
public
do_bbcode_quote(mixed $action, mixed $attributes, mixed $content, mixed $params, mixed $node_object) : mixed
Parameters
- $action : mixed
- $attributes : mixed
- $content : mixed
- $params : mixed
- $node_object : mixed
Tags
do_bbcode_url()
embed URLs
public
do_bbcode_url(mixed $action, mixed $attributes, mixed $content, mixed $params, mixed $node_object) : mixed
Parameters
- $action : mixed
- $attributes : mixed
- $content : mixed
- $params : mixed
- $node_object : mixed
Tags
removeDoubleEscapes()
Remove double escapes
public
removeDoubleEscapes(string $text) : string
Parameters
- $text : string
Return values
stringstripBBtags()
strip BB tags
public
stripBBtags(string $text) : unknown
Parameters
- $text : string
Return values
unknownis_valid_url()
dummy function which returns true (causes problems otherwise, since it's already been 'regexed' in convertlinks())
protected
is_valid_url(string $url) : bool
Parameters
- $url : string
Return values
bool —true
setDefaultSettings()
Set default settings for the BBCode Handler
protected
setDefaultSettings() : mixed