Hi a little update in the bb-cod engine codes
they do it in a custom ts to bbcode.php
PHP Code:
$text = preg_replace("/\[question\]\s*((\s|.)+?)\s*\[\/question\]\s*/i","<hr color=\"#00CCFF\"><b><font color=black>Question: </font> <font color=blue>\\1</font><hr color=\"#00CCFF\">", $text);
$text = preg_replace("/\[winner\]\s*((\s|.)+?)\s*\[\/winner\]\s*/i","<hr color=\"#00CCFF\"><b><font color=yellow>Winner: </font> <font color=blue>\\1</font><hr color=\"#00CCFF\">", $text);
$text = preg_replace(
"/(http:\/\/www.google.hu[^<>\s]+)/i",
"<a class=\"bblink\" target=\"_new\" href=\"\\1\"><font style=\"color:blue;\">g</font><font style=\"color:red;\">o</font><font style=\"color:yellow;\">o</font><font style=\"color:blue;\">g</font><font style=\"color:green;\">l</font><font style=\"color:red;\">e</font></a>", $text);
$text = preg_replace(
"/(http:\/\/www.facebook.com[^<>\s]+)/i",
"<a class=\"bblink\" target=\"_new\" href=\"\\1\"><font style=\"color:white;background-color:#3b5998;\">facebook</font></a>", $text);
$text = preg_replace(
"/(https:\/\/www.facebook.com[^<>\s]+)/i",
"<a class=\"bblink\" target=\"_new\" href=\"\\1\"><font style=\"padding:2px;color:white;background-color:#3b5998;\">facebook</font></a>", $text);