class bbcode_firstpass extends bbcode
BBCODE FIRSTPASS BBCODE first pass class (functions for parsing messages for db storage)
Properties
$bbcode_uid | ||
$bbcode_bitfield | ||
$bbcode_cache | ||
$bbcode_template | ||
$bbcodes | ||
$template_bitfield | ||
$message | ||
$warn_msg | ||
$parsed_items |
Methods
bbcode($bitfield = '')
Constructor Init bbcode cache entries if bitfield is specified |
from bbcode | |
bbcode_second_pass($message, $bbcode_uid = '', $bbcode_bitfield = false)
Second pass bbcodes |
from bbcode | |
bbcode_cache_init()
Init bbcode cache |
from bbcode | |
bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false)
Return bbcode template |
from bbcode | |
bbcode_tpl_replace($tpl_name, $tpl)
Return bbcode template replacement |
from bbcode | |
bbcode_list($type)
Second parse list bbcode |
from bbcode | |
bbcode_second_pass_quote($username, $quote)
Second parse quote tag |
from bbcode | |
bbcode_second_pass_code($type, $code)
Second parse code tag |
from bbcode | |
mixed |
bbcode_second_pass_by_extension()
Function to perform custom bbcode second pass by extensions can be used to assign bbcode pattern replacement Example: '#[list=([^[]+):$uid]#e' => "\$this->bbcodesecondpassbyextension('\$1')" |
from bbcode |
parse_bbcode()
Parse BBCode |
||
prepare_bbcodes()
Prepare some bbcodes for better parsing |
||
bbcode_init($allow_custom_bbcode = true)
Init bbcode data for later parsing |
||
check_bbcode($bbcode, $in)
Making some pre-checks for bbcodes as well as increasing the number of parsed items |
||
bbcode_specialchars($text)
Transform some characters in valid bbcodes |
||
bbcode_size($stx, $in)
Parse size tag |
||
bbcode_color($stx, $in)
Parse color tag |
||
bbcode_underline($in)
Parse u tag |
||
bbcode_strong($in)
Parse b tag |
||
bbcode_italic($in)
Parse i tag |
||
bbcode_img($in)
Parse img tag |
||
bbcode_flash($width, $height, $in)
Parse flash tag |
||
bbcode_attachment($stx, $in)
Parse inline attachments [ia] |
||
bbcode_parse_code($stx, $code)
Parse code text from code tag |
||
bbcode_code($stx, $in)
Parse code tag Expects the argument to start right after the opening [code] tag and to end with [/code] |
||
bbcode_parse_list($in)
Parse list bbcode Expects the argument to start with a tag |
||
bbcode_quote($in)
Parse quote bbcode Expects the argument to start with a tag |
||
validate_email($var1, $var2)
Validate email |
||
validate_url(string $var1, string $var2)
Validate url |
||
true |
path_in_domain(string $url)
Check if url is pointing to this domain/script_path/php-file |
Details
in bbcode at line 40
public
bbcode($bitfield = '')
Constructor Init bbcode cache entries if bitfield is specified
in bbcode at line 52
public
bbcode_second_pass($message, $bbcode_uid = '', $bbcode_bitfield = false)
Second pass bbcodes
in bbcode at line 141
public
bbcode_cache_init()
Init bbcode cache
requires: $this->bbcodebitfield sets: $this->bbcodecache with bbcode templates needed for bbcode_bitfield
in bbcode at line 461
public
bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false)
Return bbcode template
in bbcode at line 523
public
bbcode_tpl_replace($tpl_name, $tpl)
Return bbcode template replacement
in bbcode at line 552
public
bbcode_list($type)
Second parse list bbcode
in bbcode at line 601
public
bbcode_second_pass_quote($username, $quote)
Second parse quote tag
in bbcode at line 622
public
bbcode_second_pass_code($type, $code)
Second parse code tag
in bbcode at line 673
public mixed
bbcode_second_pass_by_extension()
Function to perform custom bbcode second pass by extensions can be used to assign bbcode pattern replacement Example: '#[list=([^[]+):$uid]#e' => "\$this->bbcodesecondpassbyextension('\$1')"
Accepts variable number of parameters
at line 53
public
parse_bbcode()
Parse BBCode
at line 106
public
prepare_bbcodes()
Prepare some bbcodes for better parsing
at line 127
public
bbcode_init($allow_custom_bbcode = true)
Init bbcode data for later parsing
at line 267
public
check_bbcode($bbcode, $in)
Making some pre-checks for bbcodes as well as increasing the number of parsed items
at line 287
public
bbcode_specialchars($text)
Transform some characters in valid bbcodes
at line 298
public
bbcode_size($stx, $in)
Parse size tag
at line 326
public
bbcode_color($stx, $in)
Parse color tag
at line 339
public
bbcode_underline($in)
Parse u tag
at line 352
public
bbcode_strong($in)
Parse b tag
at line 365
public
bbcode_italic($in)
Parse i tag
at line 378
public
bbcode_img($in)
Parse img tag
at line 441
public
bbcode_flash($width, $height, $in)
Parse flash tag
at line 495
public
bbcode_attachment($stx, $in)
Parse inline attachments [ia]
at line 509
public
bbcode_parse_code($stx, $code)
Parse code text from code tag
at line 578
public
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 671
public
bbcode_parse_list($in)
Parse list bbcode Expects the argument to start with a tag
at line 799
public
bbcode_quote($in)
Parse quote bbcode Expects the argument to start with a tag
at line 968
public
validate_email($var1, $var2)
Validate email
at line 1008
public
validate_url(string $var1, string $var2)
Validate url
at line 1069
public true
path_in_domain(string $url)
Check if url is pointing to this domain/script_path/php-file