Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Free Torrent Source (http://www.bvlist.com/forumdisplay.php?f=25)
-   -   Youtube Embed link in forum (http://www.bvlist.com/showthread.php?t=4415)

Storm6699 3rd February 2010 13:29

Youtube Embed link in forum
 
how to make that when I put the youtube embed link in the forum post show youtube video window
and not only embed code

PHP Code:

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/yGSkjGJAyVM&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param>

<
param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/yGSkjGJAyVM&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

When you put youtube embed link to the forum instead to show youtube window shows me only the code

elvira 4th February 2010 17:34

open include/globalfuctions.php

find
PHP Code:

reset$smilies ) ; 

add before this
PHP Code:

// Video tag [video=url]
// YouTube Vids
$s preg_replace("/\[video=[^\s'\"<>]*youtube.com.*v=([^\s'\"<>]+)\]/i""<object width=\"500\" height=\"410\"><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=\"500\" height=\"410\"></embed></object>"$s);
// Google Vids
$s preg_replace("/\[video=[^\s'\"<>]*video.google.com.*docid=(-?[0-9]+).*\]/i""<embed style=\"width:500px; height:410px;\" id=\"VideoPlayback\" align=\"middle\" type=\"application/x-shockwave-flash\" src=\"http://video.google.com/googleplayer.swf?docId=\\1\" allowScriptAccess=\"sameDomain\" quality=\"best\" bgcolor=\"#ffffff\" scale=\"noScale\" wmode=\"window\" salign=\"TL\"  FlashVars=\"playerMode=embedded\"> </embed>"$s); 


Storm6699 4th February 2010 23:18

now working
THNX elvira :-D


All times are GMT +2. The time now is 01:46.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.