Hallo Leute^^ Hab wieder ein Problem^^ Ich ersetzte den bbcode tag [quote] mit <blockquote>.. Aber wenn ich ein [quote] in einem [quote] mache, steht der text nur da.. Hoffe ihr könnt mir helfen!
CODE:
Und wie das aussieht:

Hoffe ihr könnt mir helfen!
Ich denke mal der code weis nicht welchen tag er zuerst schliessen muss oder sowas.. Keine ahnung >.<
CODE:
PHP-Code:
function bbcodes($text){
$text = nl2br(htmlspecialchars($text));
$bbcodetags = array(
// MAIN BBCODES
'/\[b\](.*?)\[\/b\]/',
'/\[i\](.*?)\[\/i\]/',
'/\[u\](.*?)\[\/u\]/',
'/\[s\](.*?)\[\/s\]/',
'/\[img\](.*?)\[\/img\]/',
'/\[left\](.*?)\[\/left\]/',
'/\[center\](.*?)\[\/center\]/',
'/\[right\](.*?)\[\/right\]/',
'/\[justify\](.*?)\[\/justify\]/',
'/\[quote\](.*?)\[\/quote\]/',
// URL
'/\[url\](.*?)\[\/url\]/',
'/\[url\=(.*?)\](.*?)\[\/url\]/',
// EMAIL
'/\[email\](.*?)\[\/email\]/',
'/\[email\=(.*?)\](.*?)\[\/email\]/',
// SMILIES
'/:\)/',
'/:D/',
'/xD/',
'/;\)/',
'/:\(/',
'/:o/',
'/:P/'
);
$htmltags = array(
// MAIN BBCODES
'<b>$1</b>',
'<i>$1</i>',
'<u>$1</u>',
'<s>$1</s>',
'<img src="$1" alt="" />',
'<div align="left">$1</div>',
'<div align="center">$1</div>',
'<div align="right">$1</div>',
'<div align="justify">$1</div>',
'<blockquote>$1</blockquote>',
// URL
'<a href="$1">$1</a>',
'<a href="$1">$2</a>',
// EMAIL
'<a href="mailto:$1">$1</a>',
'<a href="mailto:$1">$2</a>',
// SMILIES
'<img src="http://www.php.de/images/icons/smilies/smile.png" alt=":)" border="0" width="16" height="16" />',
'<img src="http://www.php.de/images/icons/smilies/grin.png" alt=":D" border="0" width="16" height="16" />',
'<img src="http://www.php.de/images/icons/smilies/laught.png" alt="xD" border="0" width="16" height="16" />',
'<img src="http://www.php.de/images/icons/smilies/wink.png" alt=";)" border="0" width="16" height="16" />',
'<img src="http://www.php.de/images/icons/smilies/unhappy.png" alt=":(" border="0" width="16" height="16" />',
'<img src="http://www.php.de/images/icons/smilies/surprised.png" alt=":o" border="0" width="16" height="16" />',
'<img src="http://www.php.de/images/icons/smilies/tongue.png" alt=":P" border="0" width="16" height="16" />'
);
// REPLACE
$text = preg_replace ($bbcodetags, $htmltags, $text);
// OUTPUT
return $text;
}

Hoffe ihr könnt mir helfen!
Ich denke mal der code weis nicht welchen tag er zuerst schliessen muss oder sowas.. Keine ahnung >.<
Kommentar