+HTML;
+
+ $bbcode_tpl['box_open_color_single'] = <<
+HTML;
+
+ $bbcode_tpl['box_close'] = <<
+HTML;
+
array_deep($bbcode_tpl, 'bbcode_tpl_compact');
return $bbcode_tpl;
}
diff --git a/library/language/source/main.php b/library/language/source/main.php
index 179e8d1f2..6c103c30d 100644
--- a/library/language/source/main.php
+++ b/library/language/source/main.php
@@ -1842,7 +1842,7 @@ $lang['BOLD'] = 'Bold text: [b]text[/b] (Ctrl+B)';
$lang['ITALIC'] = 'Italic text: [i]text[/i] (Ctrl+I)';
$lang['UNDERLINE'] = 'Underline text: [u]text[/u] (Ctrl+U)';
$lang['STRIKEOUT'] = 'Strikeout text: [s]text[/s] (Ctrl+S)';
-$lang['BOX_TAG'] = 'Frame around text: [box]text[/box]';
+$lang['BOX_TAG'] = 'Frame around text: [box]text[/box] or [box=#333,#888]text[/box]';
$lang['INDENT_TAG'] = 'Insert indent: [indent]text[/indent]';
$lang['SUPERSCRIPT'] = 'Superscript text: [sup]text[/sup]';
$lang['SUBSCRIPT'] = 'Subscript text: [sub]text[/sub]';
diff --git a/src/Legacy/BBCode.php b/src/Legacy/BBCode.php
index 1bd517c47..6c12d7602 100644
--- a/src/Legacy/BBCode.php
+++ b/src/Legacy/BBCode.php
@@ -97,6 +97,8 @@ class BBCode
"#\[img=(left|right|center)\]($img_exp)\[/img\]\s*#isu" => $tpl['img_aligned'],
"#\[email\]($email_exp)\[/email\]#isu" => '
$1',
"#\[qpost=([0-9]*)\]#isu" => '
$1',
+ '#\[box=(?:\s*[\'"])?([\#0-9a-zA-Z]+)(?:[\'"]\s*)?\]#isu' => $tpl['box_open_color_single'],
+ '#\[box=(?:\s*[\'"])?([\#0-9a-zA-Z]+)(?:[\'"]\s*)?,\s*[\'"]?([\#0-9a-zA-Z]+)[\'"]?\]#isu' => $tpl['box_open_color'],
];
$this->str = [
@@ -127,8 +129,8 @@ class BBCode
'[/sup]' => '',
'[sub]' => '
',
'[/sub]' => '',
- '[box]' => '
',
+ '[box]' => $tpl['box_open'],
+ '[/box]' => $tpl['box_close'],
'[indent]' => '
',
'[/indent]' => '
',
'[del]' => '
',