Bei mir funktioniert dann keine einzige Seite mehr wenn ich das so einbaue. Wo kann der Fehler sein? Bei mir sieht dann die bbcode.php so aus:
Code: Alles auswählen
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
// Remove long url
$ret = preg_replace("/<a href=(.*?)>((http:\/\/|https:\/\/|ftp:\/\/|www\.).*?)<\/a>/ie", "(strlen(\"\\2\") > 65 && !eregi(\"<\", \"\\2\") ) ? '<a href='.stripslashes(\"\\1\").'>'.substr(\"\\2\", 0, 35) . '....' . substr(\"\\2\", -25).'</a>' : '<a href='.stripslashes(\"\\1\").'>'.\"\\2\".'</a>'", $ret);
// remove long url in quotes
$ret = preg_replace("/<td class=\"quote\">(.*?)((http:\/\/|https:\/\/|ftp:\/\/|www\.).*?)<\/td>/ie", "(strlen(\"\\2\") > 65 && !eregi(\"<\", \"\\2\") ) ? '<td class=\"quote\">'.substr(\"\\2\", 0, 35) . '....' . substr(\"\\2\", -25).'</td>' : '<td class=\"quote\">'.\"\\2\".'</td>'", $ret);
// Remove our padding..
$ret = substr($ret, 1);
return($ret);
}