Ok, so I already put this in bb_codes.php under encode:
$pattern[]="/[color=black](.+?)[/color]/i"; $replacement[]='<font color="#000000">\1</font>';
$pattern[]="/[color=white](.+?)[/color]/i"; $replacement[]='<font color="#FFFFFF">\1</font>';
$pattern[]="/[color=red](.+?)[/color]/i"; $replacement[]='<font color="#FF0000">\1</font>';
$pattern[]="/[color=blue](.+?)[/color]/i"; $replacement[]='<font color="#0000FF">\1</font>';
$pattern[]="/[color=brown](.+?)[/color]/i"; $replacement[]='<font color="#993300">\1</font>';
$pattern[]="/[color=cyan](.+?)[/color]/i"; $replacement[]='<font color="#00FFFF">\1</font>';
$pattern[]="/[color=darkblue](.+?)[/color]/i"; $replacement[]='<font color="#000099">\1</font>';
$pattern[]="/[color=darkred](.+?)[/color]/i"; $replacement[]='<font color="#990000">\1</font>';
$pattern[]="/[color=green](.+?)[/color]/i"; $replacement[]='<font color="#009900">\1</font>';
$pattern[]="/[color=grey](.+?)[/color]/i"; $replacement[]='<font color="#999999">\1</font>';
$pattern[]="/[color=olive](.+?)[/color]/i"; $replacement[]='<font color="#999900">\1</font>';
$pattern[]="/[color=orange] (.+?)[/color]/i"; $replacement[]='<font color="#FF9900">\1</font>';
$pattern[]="/[color=pink](.+?)[/color]/i"; $replacement[]='<font color="#FF33FF">\1</font>';
$pattern[]="/[color=purple] (.+?)[/color]/i"; $replacement[]='<font color="#9900FF">\1</font>';
$pattern[]="/[color=yellow] (.+?)[/color]/i"; $replacement[]='<font color="#FFFF00">\1</font>';
And it works ok, but what I don't get is why does it work without corresponding DEcode definitions? Is this invisibly damaging in some way or should it be fine? |