Log in

View Full Version : youtube and google videos


trainer
02-19-2007, 03:11 PM
how do you add the option of playing youtube and other videos within the thread/post instead of having to goto the host site.

PhilC
02-19-2007, 09:06 PM
I've created a custom BBcode tag that lets you do this. You can do it a number of different ways, but mine is like:

[youtube]YouTubeVideoID

where YouTubeVideoID is the code that YouTube gives to each video on its site. That ID is a mix of characters, symbols and numbers. and can be found by looking at the URL to the YouTube video. It's the value in the "v=" name/value pairing in all YouTube URLs.

To do it in AdminCP, go to Custom BBcode > Add New BBcode. Call it YouTube Video, or whatever you want. For "Tag" enter youtube. For replacement, enter:

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{param}"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{param}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>

That should do it!