highlight
This commit is contained in:
@@ -787,6 +787,12 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
|
||||
if (strpos($Text,'[/color]') !== false) {
|
||||
$Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])ism", "<span style=\"color: $1;\">$2</span>", $Text);
|
||||
}
|
||||
// Check for colored text
|
||||
if (strpos($Text,'[/hl]') !== false) {
|
||||
$Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "<span style=\"background-color: yellow;\">$1</span>", $Text);
|
||||
$Text = preg_replace("(\[hl=(.*?)\](.*?)\[\/hl\])ism", "<span style=\"background-color: $1;\">$2</span>", $Text);
|
||||
}
|
||||
|
||||
// Check for sized text
|
||||
// [size=50] --> font-size: 50px (with the unit).
|
||||
if (strpos($Text,'[/size]') !== false) {
|
||||
|
Reference in New Issue
Block a user