function bbparsing($text) {
$text = preg_replace("#\[img\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img\]#sie", "''", $text);
$text = preg_replace("#\[url\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/url\]#sie", "'\\1\\3'", $text);
$text = preg_replace("/\[url=(.+?)\](.+?)\[\/url\]/", "$2", $text);
$text = preg_replace("/\[b\]/", "", $text);
$text = preg_replace("/\[\/b\]/", "", $text);
$text = preg_replace("/\[u\]/", "", $text);
$text = preg_replace("/\[\/u\]/", "", $text);
$text = preg_replace("/\[i\]/", "", $text);
$text = preg_replace("/\[\/i\]/", "", $text);
$text = preg_replace("/\[code\]/", "code : ", $text);
$text = preg_replace("/\[\/code\]/", " ", $text);
$text = preg_replace("/\[quote\]/", "citation :", $text);
$text = preg_replace("/\[\/quote\]/", " ", $text);
$text = preg_replace("/\[quote=(.+?)\](.+?)\[\/quote\]/", "", $text);
$text = preg_replace("/\[font=(.+?)\]/", "", $text);
$text = preg_replace("/\[\/font\]/", "", $text);
$text = preg_replace("/\[color=(.+?)\]/", "", $text);
$text = preg_replace("/\[\/color\]/", "", $text);
$text = preg_replace("/\[size=(.+?)\]/", "", $text);
$text = preg_replace("/\[\/size]/", "", $text);
$text = preg_replace("/\[titre1\]/", "", $text);
$text = preg_replace("/\[\/titre1\]/", " ", $text);
$text = preg_replace("/\[titre2\]/", "", $text);
$text = preg_replace("/\[\/titre2\]/", "", $text);
$text = preg_replace("/\[titre3\]/", "", $text);
$text = preg_replace("/\[\/titre3\]/", "", $text);
$text = preg_replace("/\[titre4\]/", "", $text);
$text = preg_replace("/\[\/titre4\]/", "", $text);
$text = preg_replace("/\[titre5\]/", "", $text);
$text = preg_replace("/\[\/titre5\]/", "", $text);
$text = preg_replace("/\[\+\]/", "", $text);
$text = preg_replace("/\[\/\+\]/", "", $text);
$text = preg_replace("/\[\+\+\]/", "", $text);
$text = preg_replace("/\[\/\+\+\]/", "", $text);
return $text;
}
?>
|