{% else-1 %}
функция bbcode для text

                        
function bbcode( $bc )
{
$bbcode = array(
'/\[url](.+)\[\/url\]/
isU' => '<a href="$1" target="_blank" style="color: #000000;" >
$1</a>' ,
'/\[file](.+)\[\/file\]/
isU' => '<a href="http://
up2file.ru/file
$1" target="_blank" style="color: #000000;">ID
$1<img src="/design/images/
up2file.png" alt="">' ,
'/\[img](.+)\[\/img\]/
isU' => '<a href="$1" ><img src="/
output/resize.php?image=$1" /></
a>' ,
'/\[aimg](.+)\[\/aimg\]/
isU' => '<img src="$1" alt="$1" style="width: 40px; float: left; margin: 0 5px 0 0;"/
>' ,
'/\[b\](.+)\[\/b\]/
isU' => '<b>$1</b>' ,
'/\[u\](.+)\[\/u\]/
isU' => '<span style="text-
decoration:underline;">$1</span>' ,
'/\[s\](.+)\[\/s\]/
isU' => '<s>$1</s>' ,
'/\[i\](.+)\[\/i\]/
isU' => '<i>$1</i>'
);
$bc = preg_replace ( array_keys
( $bbcode ), array_values
( $bbcode ), $bc );
return $bc ;
}
1 77 0
Без комментариев...