phpBB API Documentation
Class

bbcode

class bbcode

BBCode class

Properties

$bbcode_uid
$bbcode_bitfield
$bbcode_cache
$bbcode_template
$bbcodes
$template_bitfield

Methods

bbcode($bitfield = '')

Constructor Init bbcode cache entries if bitfield is specified

bbcode_second_pass($message, $bbcode_uid = '', $bbcode_bitfield = false)

Second pass bbcodes

bbcode_cache_init()

Init bbcode cache

bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false)

Return bbcode template

bbcode_tpl_replace($tpl_name, $tpl)

Return bbcode template replacement

bbcode_list($type)

Second parse list bbcode

bbcode_second_pass_quote($username, $quote)

Second parse quote tag

bbcode_second_pass_code($type, $code)

Second parse code tag

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')"

Details

at line 40
public bbcode($bitfield = '')

Constructor Init bbcode cache entries if bitfield is specified

Parameters

$bitfield

at line 52
public bbcode_second_pass($message, $bbcode_uid = '', $bbcode_bitfield = false)

Second pass bbcodes

Parameters

$message
$bbcode_uid
$bbcode_bitfield

at line 141
public bbcode_cache_init()

Init bbcode cache

requires: $this->bbcodebitfield sets: $this->bbcodecache with bbcode templates needed for bbcode_bitfield

at line 461
public bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false)

Return bbcode template

Parameters

$tpl_name
$bbcode_id
$skip_bitfield_check

at line 526
public bbcode_tpl_replace($tpl_name, $tpl)

Return bbcode template replacement

Parameters

$tpl_name
$tpl

at line 555
public bbcode_list($type)

Second parse list bbcode

Parameters

$type

at line 604
public bbcode_second_pass_quote($username, $quote)

Second parse quote tag

Parameters

$username
$quote

at line 625
public bbcode_second_pass_code($type, $code)

Second parse code tag

Parameters

$type
$code

at line 676
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

Return Value

mixed Second pass result