Ich habe schon länger den Youtube Mode in meinem Forum eingebaut. Bis jetzt funktionierte es einwandfrei. Nun seit es eine deutsche Seite von Youtube gibt und Links von dort ins Forum gestellt werden, funktioniert es nicht mehr. Wie zum Beispiel dieser Link http://de.youtube.com/watch?v=MEic4zPOnos
So sieht der Code in der bbcode.php aus:
Code: Alles auswählen
// standard video table
global $lang;
$directurl = '<table border="0" cellpadding="0" cellspacing="2"><tr><td align="left"><a href="';
$object = '</td><td align="right"><span class="gensmall"><a href="http://www.phpbb-de.com" target="_blank" title="phpBB">phpBB</a> Plugin</span></td></tr><tr><td colspan="2">';
$tableend = '</td></tr></table>';
// match a google video URL and replace it
$ret = preg_replace("#(^|[\n ])([\w]+?://video.google.[\w.]+?/videoplay\?docid=)([\w-]+)([&][\w=+&;-]*)*(^[\t <\n\r\]\[])*#is", '\\1' . $directurl . '\\2\\3\\4" target="_blank" class="postlink">' . $lang['Jump_to'] . ' Google Video</a>' . $object . '<object><param name="wmode" value="transparent"></param><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" wmode="transparent" src="http://video.google.com/googleplayer.swf?docId=\\3" flashvars=""></embed></object>' . $tableend, $ret);
// match a youtube video URL and replace it
$ret = preg_replace("#(^|[\n ])([\w]+?://)(www.youtube|youtube)(.[\w.]+?/watch\?v=)([\w-]+)([&][\w=+&;%]*)*(^[\t <\n\r\]\[])*#is", '\\1' . $directurl . '\\2\\3\\4\\5\\6" target="_blank" class="postlink">' . $lang['Jump_to'] . ' Youtube</a>' . $object . '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\\5"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\\5" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>' . $tableend, $ret);
// match a myvideo video URL and replace it
$ret = preg_replace("#(^|[\n ])([\w]+?://)(www.myvideo|myvideo)(.[\w.]+?/watch/)([\w]+)(^[\t <\n\r\]\[])*#is", '\\1' . $directurl . '\\2\\3\\4\\5" target="_blank" class="postlink">' . $lang['Jump_to'] . ' MyVideo</a>' . $object . '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="470" height="406"><param name="movie" value="http://www.myvideo.de/movie/\\5"></param><param name="wmode" value="transparent"></param><embed src="http://www.myvideo.de/movie/\\5" width="470" height="406" type="application/x-shockwave-flash" wmode="transparent"></embed></object>' . $tableend, $ret);
// match a clipfish video URL and replace it
$ret = preg_replace("#(^|[\n ])([\w]+?://)(www.clipfish|clipfish)(.[\w.]+?/player.php\?videoid=)([\w%]+)([&][\w=+&;]*)*(^[\t <\n\r\]\[])*#is", '\\1' . $directurl . '\\2\\3\\4\\5\\6" target="_blank" class="postlink">' . $lang['Jump_to'] . ' Clipfish</a>' . $object . '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="464" height="380" id="player" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://www.clipfish.de/videoplayer.swf?as=0&videoid=\\5&r=1" /><param name="wmode" value="transparent"><embed src="http://www.clipfish.de/videoplayer.swf?as=0&videoid=\\5&r=1" width="464" height="380" name="player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>' . $tableend, $ret);
// match a sevenload video URL and replace it
$ret = preg_replace("#(^|[\n ])([\w]+?://[\w.]+?.sevenload.com/videos/)([\w]+?)(/[\w-]+)(^[\t <\n\r\]\[])*#is", '\\1' . $directurl . '\\2\\3\\4" target="_blank" class="postlink">' . $lang['Jump_to'] . ' Sevenload</a>' . $object . '<object width="425" height="350"><param name="FlashVars" value="slxml=de.sevenload.com"/><param name="movie" value="http://de.sevenload.com/pl/\\3/425x350/swf" /><embed src="http://de.sevenload.com/pl/\\3/425x350/swf" type="application/x-shockwave-flash" width="425" height="350" FlashVars="slxml=de.sevenload.com"></embed></object>' . $tableend, $ret);
Gruss, darot