Embed YouTube?
mishima 144
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: Embed YouTube?
Philipp Esselbach
From: -
Editor
0From: -
Most likely in about one month.
1 Re: Embed YouTube?
mishima
OP
144
From: -
From: -
Thanks Any ideas when 2.1 will be released?
1 Re: Embed YouTube?
Philipp Esselbach
From: -
Editor
0From: -
This is a standard feature of the new Contentteller 2.1 series
To patch 2.0, open /classes/class_system.php in an editor and add after:
the following:
Now you can use the following code to embed a YouTube video:
You need to replace VIDEO ID with the id of the video. You find the video id here: youtube.com/watch?v=VIDEO ID
To patch 2.0, open /classes/class_system.php in an editor and add after:
function code( $var )
{
global $system, $database;
the following:
$var = preg_replace( "/\[youtube\]([a-zA-Z0-9-_]+)\[\/youtube\]/", "<object width=\"425\" height=\"350\"><param name=\"movie\" value=\" http://www.youtube.com/v/\\1\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\" http://www.youtube.com/v/\\1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed></object>", $var );
Now you can use the following code to embed a YouTube video:
[youtube]VIDEO ID[/youtube]
You need to replace VIDEO ID with the id of the video. You find the video id here: youtube.com/watch?v=VIDEO ID
Hey,
I'd like to embed a YouTube clip into one of the article pages is there a way to do it using BBCODE?
I would use HTML but if I have both selected it defaults to using HTML for the layout and I need BR tags for new lines etc.
Cheers