Line 134 | Line 134 |
---|
{ $this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']); $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/bbcode.html';
|
{ $this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']); $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/bbcode.html';
|
| if (empty($user->theme['template_inherits_id']) && !empty($template->orig_tpl_inherits_id)) { $user->theme['template_inherits_id'] = $template->orig_tpl_inherits_id; }
|
if (!@file_exists($this->template_filename)) {
| if (!@file_exists($this->template_filename)) {
|
Line 376 | Line 381 |
---|
}
// Replace {L_*} lang strings
|
}
// Replace {L_*} lang strings
|
$bbcode_tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $bbcode_tpl);
| $bbcode_tpl = preg_replace('/{L_([A-Z0-9_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $bbcode_tpl);
|
if (!empty($rowset[$bbcode_id]['second_pass_replace'])) {
| if (!empty($rowset[$bbcode_id]['second_pass_replace'])) {
|
Line 480 | Line 485 |
---|
'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2') );
|
'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2') );
|
$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
| $tpl = preg_replace('/{L_([A-Z0-9_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
|
if (!empty($replacements[$tpl_name])) {
| if (!empty($replacements[$tpl_name])) {
|
Line 584 | Line 589 |
---|
$code = str_replace("\t", ' ', $code); $code = str_replace(' ', ' ', $code); $code = str_replace(' ', ' ', $code);
|
$code = str_replace("\t", ' ', $code); $code = str_replace(' ', ' ', $code); $code = str_replace(' ', ' ', $code);
|
| $code = str_replace("\n ", "\n ", $code);
// keep space at the beginning if (!empty($code) && $code[0] == ' ') { $code = ' ' . substr($code, 1); }
|
// remove newline at the beginning if (!empty($code) && $code[0] == "\n")
| // remove newline at the beginning if (!empty($code) && $code[0] == "\n")
|