phpBB API Documentation
Class

bbcode

class bbcode

BBCode class

Properties

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

Methods

__construct($bitfield = '')

Constructor

bbcode_set_bitfield($bitfield = '')

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 39
public __construct($bitfield = '')

Constructor

Parameters

$bitfield

at line 49
public bbcode_set_bitfield($bitfield = '')

Init bbcode cache entries if bitfield is specified

Parameters

$bitfield

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

Second pass bbcodes

Parameters

$message
$bbcode_uid
$bbcode_bitfield

at line 150
public bbcode_cache_init()

Init bbcode cache

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

at line 470
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 535
public bbcode_tpl_replace($tpl_name, $tpl)

Return bbcode template replacement

Parameters

$tpl_name
$tpl

at line 564
public bbcode_list($type)

Second parse list bbcode

Parameters

$type

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

Second parse quote tag

Parameters

$username
$quote

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

Second parse code tag

Parameters

$type
$code

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