This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

Embed YouTube?


avatar
mishima 144
From: -
Embed YouTube?

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

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: Embed YouTube?
avatar
Editor
0
From: -
Most likely in about one month.
1 Re: Embed YouTube?
avatar
OP 144
From: -
Thanks Smiling Face Any ideas when 2.1 will be released?
1 Re: Embed YouTube?
avatar
Editor
0
From: -
This is a standard feature of the new Contentteller 2.1 series Winking Face

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

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.