bbcode_firstpass
class bbcode_firstpass extends bbcode
BBCODE FIRSTPASS BBCODE first pass class (functions for parsing messages for db storage)
Properties
$bbcode_uid | from bbcode | ||
$bbcode_bitfield | from bbcode | ||
$bbcode_cache | from bbcode | ||
$bbcode_template | from bbcode | ||
$bbcodes | from bbcode | ||
$template_bitfield | from bbcode | ||
$message | |||
$warn_msg | |||
$parsed_items | |||
$mode |
Methods
Init bbcode cache entries if bitfield is specified
Second pass bbcodes
Return bbcode template
Function to perform custom bbcode second pass by extensions can be used to assign bbcode pattern replacement Example: '#[list=([^[]+):$uid]#e' => "\$this->bbcode_second_pass_by_extension('\$1')"
Parse BBCode
Prepare some bbcodes for better parsing
Init bbcode data for later parsing
Making some pre-checks for bbcodes as well as increasing the number of parsed items
Transform some characters in valid bbcodes
Parse size tag
Parse color tag
Parse u tag
Parse b tag
Parse i tag
Parse img tag
Parse flash tag
Parse inline attachments [ia]
Parse code tag Expects the argument to start right after the opening [code] tag and to end with [/code]
Parse list bbcode Expects the argument to start with a tag
Parse quote bbcode Expects the argument to start with a tag
Validate email
Validate url
Details
in
bbcode at line 39
__construct($bitfield = '')
Constructor
in
bbcode at line 49
bbcode_set_bitfield(string $bitfield = '')
Init bbcode cache entries if bitfield is specified
in
bbcode at line 61
bbcode_second_pass($message, $bbcode_uid = '', $bbcode_bitfield = false)
Second pass bbcodes
in
bbcode at line 150
bbcode_cache_init()
Init bbcode cache
requires: $this->bbcode_bitfield sets: $this->bbcode_cache with bbcode templates needed for bbcode_bitfield
in
bbcode at line 468
bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false)
Return bbcode template
in
bbcode at line 533
bbcode_tpl_replace($tpl_name, $tpl)
Return bbcode template replacement
in
bbcode at line 562
bbcode_list($type)
Second parse list bbcode
in
bbcode at line 611
bbcode_second_pass_quote($username, $quote)
Second parse quote tag
in
bbcode at line 632
bbcode_second_pass_code($type, $code)
Second parse code tag
in
bbcode at line 685
mixed
bbcode_second_pass_by_extension()
deprecated
deprecated
Function to perform custom bbcode second pass by extensions can be used to assign bbcode pattern replacement Example: '#[list=([^[]+):$uid]#e' => "\$this->bbcode_second_pass_by_extension('\$1')"
Accepts variable number of parameters
at line 54
parse_bbcode()
Parse BBCode
at line 107
prepare_bbcodes()
Prepare some bbcodes for better parsing
at line 128
bbcode_init($allow_custom_bbcode = true)
Init bbcode data for later parsing
at line 268
check_bbcode($bbcode, $in)
Making some pre-checks for bbcodes as well as increasing the number of parsed items
at line 288
bbcode_specialchars($text)
Transform some characters in valid bbcodes
at line 299
bbcode_size($stx, $in)
Parse size tag
at line 327
bbcode_color($stx, $in)
Parse color tag
at line 340
bbcode_underline($in)
Parse u tag
at line 353
bbcode_strong($in)
Parse b tag
at line 366
bbcode_italic($in)
Parse i tag
at line 379
bbcode_img($in)
Parse img tag
at line 416
bbcode_flash($width, $height, $in)
Parse flash tag
at line 470
bbcode_attachment($stx, $in)
Parse inline attachments [ia]
at line 553
bbcode_code($stx, $in)
Parse code tag Expects the argument to start right after the opening [code] tag and to end with [/code]
at line 646
bbcode_parse_list($in)
Parse list bbcode Expects the argument to start with a tag
at line 774
bbcode_quote($in)
Parse quote bbcode Expects the argument to start with a tag
at line 943
validate_email($var1, $var2)
Validate email
at line 983
validate_url(string $var1, string $var2)
Validate url