i try http and https
@DND slso your code doesnt work (look screen)
Bump: I finally managed to solve the problem
Solution
Functions.php - find this:
Code:
function format_urls($text, $newWindow = false) {
return preg_replace("/((https?|ftp|gopher|news|telnet|mms|rtsp):\/\/[^()\[\]<>\s]+)/ei",
"formatUrl('\\1', ".($newWindow==true ? 1 : 0).", '', 'faqlink')", $text);
I changed this code in
Code:
function format_urls($s)
{
return preg_replace(
"/(\A|[^=\]'\"a-zA-Z0-9])((http|ftp|https|ftps|irc):\/\/[^()<>\s]+)/i",
"\\1<a target=_blank href=\"http://anonym.to?\\2\">\\2</a>", $s);
}
And then I add this youtube BB code:
Example: [video=https://www.youtube.com/watch?v=njU1O1jCTHY]
Code:
$s = preg_replace("/\[video=[^\s'\"<>]*youtube.com.*v=([^\s'\"<>]+)\]/ims", "<object width=\"640\" height=\"480\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\1\"></param><embed src=\"http://www.youtube.com/v/\\1\" type=\"application/x-shockwave-flash\" width=\"640\" height=\"480\"></embed></object>", $s);
I hope that someone will help if they have similar problems