How to embed a YouTube video into an article in Joomla! 1.5

Written by Cory | July 23, 2008 | Add Comment (0)

There are actually several ways to go about embedding a YouTube video into an article in Joomla! 1.5, but I have built a plugin that makes it dead simple. You can download the plugin here.

Here's how it works:

  • Step 1: Download the plugin.
  • Step 2: Install it.
  • Step 3: Enable (publish) it.
  • Step 4: Go to YouTube.com and find a video that you want to embed.
  • Step 5: Copy the URL for that video from your browser bar.
  • Step 6: Paste the URL into your content item.
  • Repeat steps 4-6 for as many videos as you wish to embed.

That's all there is to it. Really. It's that simple. The plugin handles all the embedding code for you. I am releasing the plugin under the GNU/GPL, so feel free to use it on as many sites as you wish.

Special thanks to Simon Tiplady for helping me with the regular expressions in this plugin.

Example

Trackback(0)

Comments (57)Add Comment

0
...
written by Theresa, July 24, 2008
Cory: I downloaded and installed the plug-in, then created the article and pasted in the You Tube URL -- no problem. But now the video is repeating itself. Why?

Here's a link:

http://www.co.douglas.ne.us/county/cards/youtube

The only thing I've pasted into the article is the link. I then created a menu item as well.
62
...
written by Cory, July 24, 2008
It looks like you generated an "a rel="nofollow" href="/ link to the video. The plugin took the URL within that link twice and embedded the video twice. You just need to paste the URL. You do not need to make a link to the video.

Make sure your WYSIWYG editor is not automatically turning the URL into a link.
0
...
written by Luong Nam, July 31, 2008
where is "Paste the URL into your content item"? I dont see Content Item, please help me, i am newbie.
0
...
written by Chris Pfeiffer, August 04, 2008
youre a champ. cheers mate. love your work, been a huge help smilies/wink.gif
0
...
written by ash, August 05, 2008
hi would you know how i could change the size?
0
...
written by jimmyoctane, August 31, 2008
Im with ash......is there a way to reduce the video size..(width/length)

thanks
Jimmy
0
...
written by jimmyoctane, August 31, 2008
nevermind
just use



0
...
written by Olivier Morin, September 03, 2008
Dear Cory

I love this site, it is by far the most useful I have ever found on such topics.
But I am unable to make the Youtube plugin work. I retraced all the steps but it still does not work.

Thank you anyway for everything that you do!

olivier
0
...
written by Braian, September 23, 2008
Dear Cory,
Thank you for your work, your plugin is exellent.
I have installed, is really a simple way that for me is exactly what I need.
The only "problem" is that the plugin works only with URL like:
http://www.youtube.com/watch?v=1unzN2zsA4k
but as you surely know youtube is now multilingual and multicountry. So I find out that your plugin doesn't work with URL like:
http://uk.youtube.com/watch?v=1unzN2zsA4k
or
http://it.youtube.com/watch?v=1unzN2zsA4k

Do u have any idea for fix it? I'm not a php programmer.. so for me is not so easy edit your plugin.
Thank you
Bye
Braian
0
...
written by @RP!e, November 03, 2008
Hi Cory,

Many thanks about this great plug-in info.

I used it finally smilies/cheesy.gif

@RP!e
0
...
written by Computação Gráfica Brasil.com, December 19, 2008
You can chamge for example:
http://br.youtube.com/watch?v=...
To
http://www.youtube.com/watch?v=...

This don`t will cause nothing problem.

dear,

http://www.computacaograficabrasil.com
0
...
written by Matty Byloos, January 09, 2009
I've been looking for this how-to guide FOREVER!!! thanks so much for doing the legwork.

301
Great Plugin
written by Greg Waddell, January 17, 2009
I just downloaded and installed the YouTube plugin and it works like a charm right out of the box. Thanks.
0
...
written by sapiterbang, January 26, 2009
wow, finally i found the great and the simplest to be used module in the world smilies/smiley.gif

many thanks
351
How do I install it?
written by Paul Brown, January 26, 2009
Hi Guys

Total newbie....

I downloaded file which had 2 files in it ( a zip and an xml)

I run 1.5.9 and see no way to install the plugin via plugin manager

How do I install


Thanks
62
...
written by Cory, January 26, 2009
Hi Paul,

Don't unzip the file. In your administrator, go to Extensions->Install/Uninstall. There is a place there for your to upload the installation package (Zip file). That's all you have to do to install it.

Good luck!
351
...
written by Paul Brown, January 26, 2009
Thanks, that worked a treat.

Sorry to sound dumb. Now its installed and enabled, how do I use it. When I write a new article how do I embed vids?

Thanks
0
Simple, easy, effective!
written by Randi Helene, January 29, 2009
Thank you!!
0
GREAT
written by Danny Daluiso, February 12, 2009
Best plugin ever!

Thanks,

Danny
0
The youtube videos overlapping words
written by Jasmine, February 28, 2009
The youtube videos will not stay in the places I put them when I publish the article. Instead they overlap with words and are off to the side somewhere.

0
Wicked
written by bilc, March 04, 2009
What a wicked plugin, worked brilliantly first time, awesome work guys.

Cheers

Bilc
0
...
written by joejoe, March 09, 2009
i did everything like the steps as dscribed but all i see in front end is the URL link i just put in the backend????
0
...
written by joejoe, March 09, 2009
ok i got it now, the only other questions is how do i make the video size (display on my site) smaller?
62
...
written by Cory, March 09, 2009
Hi joejoe,

There are currently no settings for making the video larger or smaller, you would have to modify the plugin's code to make it smaller.

Cory
0
...
written by joejoe, March 09, 2009
Thanks for the qucik reply Cory. How do i do this? is it simple to do? because i dont know much about codding?
62
...
written by Cory, March 09, 2009
Actually, no, it's not that easy to do if you do not know much about coding. I will try to post an updated version soon that has parameters for changing the size.

Cory
62
...
written by Cory, March 09, 2009
Hi joejoe,

I have just uploaded a new version of this plugin that enables you to set the width and the height through the plugin parameters.

Thanks for the suggestion!

Cory
0
...
written by joejoe, March 09, 2009
your awsome, thanks so much.
0
...
written by joejoe, March 09, 2009
i dont know if i read this on here or some where else, i have a ecommerece site with Joomla and Virtuemart, there is no way to play the videos on that particular products page?
62
...
written by Cory, March 09, 2009
Unfortunately, not with a content plugin. Virtuemart does not render content plugins. You could try embedding a video directly into the product details.
0
...
written by joejoe, March 09, 2009
cory one more thing please, i read it up there but didnt understand it, on my front page its showing double window/double video? and i did copy the link from my youtube URL
62
...
written by Cory, March 09, 2009
I'm not sure why it would be doing that unless you pasted the URL twice.
0
...
written by joejoe, March 09, 2009
no i didnt, you can check the second window is another plugin im testing and the two next to each other is this plugin. esurveillanceshop.com
0
Install problems?
written by Skiffie, March 11, 2009
smilies/cry.gif I'm having trouble installing this plugin. I have Joomla 1.0.15 installed and for the installers, I have installer options for components, modules and mambots. I've tried all of these options but I get the error message "ERROR: Could not find a Joomla! XML setup file in the package."
62
Joomla! 1.5 only
written by Cory, March 11, 2009
Hi Skiffie,

This plugin only works in Joomla! 1.5. That's why you are not able to install it.
539
Rad Plug-in Cory!!!!
written by Craig Watkins, March 15, 2009
Long time no see!

Perfect for what I was trying to do.

ALWAYS come to this site when you need answers for Joomla. Invaluable resource. Changes are Cory will have already dealt with whatever you have going on and have an answer or he will get you one!

Many thanks.

Craig smilies/smiley.gifsmilies/smiley.gif
0
Great!
written by Thomas, April 11, 2009
Very nice plugin. Does the trick. Works quite well with Joomla! 1.5.9 and the WYSIWYG Editor by Joomlapolis.
0
...
written by joey, April 13, 2009
Realy thanks for this plugin!

I realy love it!!!!!!!!
625
Youtube Related Videos
written by Mark, April 15, 2009
Great plugin by the way! Its worked awesome the first time.

Any idea on how to prevent the viewer from selecting a related video once the clip completes?

I don't want the viewers watching other peoples videos on my site.

Much Appreciation,

Marksmilies/angry.gifsmilies/angry.gif
0
paste url into article?
written by Michael O'Sullivan, April 17, 2009
need help - where to paste url? Into body of article? If i do url itself shows not video. Into a module? Would love to get this working
Thanks
0
problem with the plugin
written by kamran, April 24, 2009
Hi!

After Installing when I enable the plugin and go to my homepage I get this error: "Warning: Missing argument 3 for plgContentYoutubeEmbed:smilies/shocked.gifnPrepareContent() in /plugins/content/youtubeembed.php on line 41"

Please tell me what to do?????
0
promlem embedding
written by benmetevier, April 24, 2009
when i post the url into the article all i get on the front end is the url.
i downloaded and installed exactly how you said.
please help
thanks
0
Re: promlem embedding
written by Mikkel Moldrup-Lakjer, May 05, 2009
I think the instruction which is missing is: you should not paste the url within the article, but click the movie button in the menu bar and paste the url in the pop up window...
0
Internet Explorer Problem
written by Dr Paul, May 06, 2009
I thought this was incredibly simple and great straight off (while looking at FIrefox), but then it appears to break the site in INternet Explorer

wassup?
62
...
written by Cory, May 06, 2009
Hi Dr Paul...This should be browser-independent. All it does is replace the URL with the YouTube embed code. I just checked, and it works for me in all browsers.
0
Can't install the installation package
written by alp, May 13, 2009
I cannot install the package on my extension manager. Here is the error message I get:
* JFolder::create: Infinite loop detected
* JFTP::store: Bad response
* Warning! Failed to move file.

Any suggestion? Thanks.
62
...
written by Cory, May 13, 2009
Hi alp, it sounds like you have a problem in your Joomla installation. No one else seems to be getting that error.
0
...
written by alp, May 13, 2009
Thanks a lot Cori,
Do you think I might be using an incompatible version (mine is 1.5.9)? Or is there a possibility that my programme is restricted for new uploads by the seller?

I really need to sort it out. Any suggestion to help me out would be much appreciated.

Thanks a lot!
0
Video without the related videos
written by Edi, May 14, 2009
thabks worked smoothly...

Can it be modified so that it will not show related videos after the video?
0
thank you very much. I got it done
written by huumai204, June 01, 2009
thank you very much
0
problem using the plugin
written by Abid, June 01, 2009
it does not work while paste the url in article even follow all steps mention above. it simply show the text of url
0
HOW TO MAKE IT AUTOPLAY
written by kellie, June 05, 2009
Hi All

This pluggin is really nice. It worked just fine.
I even change the size of the video to make it bigger.
Now my only problem is, I can get it to AUTOPLAY. Do you how?

Thanks a lot

kellie
0
HOW TO MAKE GOOGLE VIDEOS WORK WITH THIS
written by kellie, June 05, 2009
Hi

My other video that I need to put in joomla is on google.
How to make it work?

Thanks a lot
62
...
written by Cory, June 05, 2009
Hi Kellie,

There currently isn't a setting in this plugin to make the video auto play. For Google videos, you will need to use something like the All Videos plugin from www.joomlaworks.gr
0
not working when category layout
written by MacMonir, June 11, 2009
hello all,
the plugin is fine but i use category layout at that time the article having the video does not show the video in the front page but shows in details page. Please help about this.
0
...
written by Staude, June 20, 2009
Hello. I'm a pretty big noob to Joomla but i've been trying to install .. well this is the 5th youtube plugin on my website and every time I try to install it i get a "invalid checksum" error.
I've tried both by uploading to ftp and by asking it to install it directly. The way that i've been trying to install it is by going into my admin area / installers / mambots. (i've also tried modules and components) and then well chosen upload in most cases and directed it to .. well i've tried every single file in the directories.

I have joomla 1.0.15 so it should work right ? I mean that is 1.5 ? That might just be a presumption. But i've tried several plugins now and it should seem weird that not one of them works so I must be doing something terribly wrong. If someone could help me i'd appreciate it.
0
how to to make a link for video?
written by Poorani, July 02, 2009
Hello,
I have installed this plug in its working good. I dont want paste the url directly in the content page and i need to make link to the url for video. Can u help me out for the same?

Write comment

security code
Write the displayed characters


busy

Join the HowToJoomla Community!

  • Create a profile
  • Connect with other members
    of the community
  • All for FREE

Sign up now!

 

Already a member? Login here.

HowToJoomla is proudly hosted by Eleven2

 
 
 

Search the Joomla! Community for Resources

 
 

Latest Community Activity

Yesterday
Cory and depika are now friends 12:47 PM
2 days ago
shashidhar replied in a discussion Need help 07:11 AM
shashidhar joined a group HowToJoomla! 07:10 AM
5 days ago
Shine Rankin replied in a discussion Need help 05:00 AM
Shine Rankin joined a group HowToJoomla! 04:59 AM
3 weeks ago
michael cuanico added Feeds application Jun 14
John joined a group HowToJoomla! Jun 10
 

Welcome to Our Newest Community Members

wil san
Ty Moyer
namal
krishan
shashidhar
leland
Jack Barakitis
Jim Livingstone
Robert Teufel
Amirul Azizi
James Hafner
Mahmood Anwar
 
 

Latest Comments

How to embed a Googl

I have embedded many times google maps to joomla, ...

Beginning Joomla! We

Thank you for given this great post.... ...

How to embed a YouTu

Hello, I have installed this plug in its working g ...

Blank Joomla! 1.5 Te

can rebrand to control panel logo? ...

How to Move Your Joo

Thank you for this. It worked like a dream for me ...