@$2"); $texto = preg_replace($a, $b, $texto); return $texto; } function clickurl($text){ return preg_replace('!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+)!i', '$1', $text); } if($u_datasaver == 'on') { function bbc($text) { $find = array( '~\[center\](.*?)\[/center\]~s', '~\[left\](.*?)\[/left\]~s', '~\[right\](.*?)\[/right\]~s', '~\[spoiler=(.*?)\](.*?)\[/spoiler\]~s', '~\[spoiler\](.*?)\[/spoiler\]~s', '~\[b\](.*?)\[/b\]~s', '~\[i\](.*?)\[/i\]~s', '~\[u\](.*?)\[/u\]~s', '~\[s\](.*?)\[/s\]~s', '~\[quote\](.*?)\[/quote\]~s', '~\[size=([0-9]*?)\](.*?)\[/size\]~s', '~\[color=([#A-z0-9]*?)\](.*?)\[/color\]~s', '~\[link=((?:ftp|https?)://[A-z0-9].*?)\](.*?)\[/link\]~s', '~\[img\](.*?)\[/img\]~s', '~\[img=(.*?)\ (.*?)\](.*?)\[/img\]~s', '~\[youtube\](.*?)\[/youtube\]~s', '~\[yt\](.*?)\[/yt\]~s', '~\[dailymotion\](.*?)\[/dailymotion\]~s', '~\[dm\](.*?)\[/dm\]~s', '~\[video\](.*?)\[/video\]~s' ); $replace = array( "
$1
", "
$1
", "
$1
", "
$1
$2
", "
Spoiler
$1
", "$1", "$1", "$1", "$1", "
$1
", "$2", "$2", "$2", "[view image]", "[view image]", "[view YouTube video]", "[view YouTube video]", "[view DailyMotion video]", "[view DailyMotion video]", "[view video]" ); $text = preg_replace($find, $replace, $text); return $text; } } else { function bbc($text) { $find = array( '~\[center\](.*?)\[/center\]~s', '~\[left\](.*?)\[/left\]~s', '~\[right\](.*?)\[/right\]~s', '~\[spoiler=(.*?)\](.*?)\[/spoiler\]~s', '~\[spoiler\](.*?)\[/spoiler\]~s', '~\[b\](.*?)\[/b\]~s', '~\[i\](.*?)\[/i\]~s', '~\[u\](.*?)\[/u\]~s', '~\[s\](.*?)\[/s\]~s', '~\[quote\](.*?)\[/quote\]~s', '~\[size=([0-9]*?)\](.*?)\[/size\]~s', '~\[color=([#A-z0-9]*?)\](.*?)\[/color\]~s', '~\[link=((?:ftp|https?)://[A-z0-9].*?)\](.*?)\[/link\]~s', '~\[img\](.*?)\[/img\]~s', '~\[img=(.*?)\ (.*?)\](.*?)\[/img\]~s', '~\[youtube\](.*?)\[/youtube\]~s', '~\[yt\](.*?)\[/yt\]~s', '~\[dailymotion\](.*?)\[/dailymotion\]~s', '~\[dm\](.*?)\[/dm\]~s', '~\[video\](.*?)\[/video\]~s' ); $replace = array( "
$1
", "
$1
", "
$1
", "
$1
$2
", "
Spoiler
$1
", "$1", "$1", "$1", "$1", "
$1
", "$2", "$2", "$2", "\"\"", "\"\"", "
", "
", "
", "
", "" ); $text = preg_replace($find, $replace, $text); return $text; } } ?>