// The following lines are for extensions which include message_parser.php // while $phpbb_root_path and $phpEx are out of the script scope // which may lead to the 'Undefined variable' and 'failed to open stream' errors if (!isset($phpbb_root_path)) { global $phpbb_root_path; }

if (!isset($phpEx)) { global $phpEx; }

include($phpbb_root_path . 'includes/bbcode.' . $phpEx);}

include($phpbb_root_path . 'includes/bbcode.' . $phpEx);}

Line 69

Line 82

// The pattern gets compiled and cached by the PCRE extension, // it should not demand recompilation if (preg_match($regexp, $this->message))

// The pattern gets compiled and cached by the PCRE extension, // it should not demand recompilation if (preg_match($regexp, $this->message))

// This array holds all bbcode data. BBCodes will be processed in this // order, so it is important to keep [code] in first position and // [quote] in second position. // To parse multiline URL we enable dotall option setting only for URL text // but not for link itself, thus [url][/url] is not affected.

// This array holds all bbcode data. BBCodes will be processed in this // order, so it is important to keep [code] in first position and // [quote] in second position. // To parse multiline URL we enable dotall option setting only for URL text // but not for link itself, thus [url][/url] is not affected.

// // To perform custom validation in extension, use $this->validate_bbcode_by_extension() // method which accepts variable number of parameters

// There's a bug when previewing a topic with no poll, because the empty title of the poll // gets parsed but $this->message still ends up empty. This fixes it, until a proper fix is // devised if ($this->message === '')

{

{

$this->bbcode_cache_init();

// We are giving those parameters to be able to use the bbcode class on its own $this->bbcode_second_pass($this->message, $this->bbcode_uid);