MyBB Community Forums

Full Version: New youtube embed code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't know why MyBB do not use new youtube embed code by default, but you can edit the embed code manually.

AdminCP -> Templates & Style -> Templates -> [Choose your theme] -> Ungrouped Templates -> video_youtube_embed

Replace the current code with this one:

<iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/{$id}" frameborder="0" allowfullscreen></iframe>

It's just a simple code. There are also some other options that you can find them by clicking on the "Embed" button located below each youtube video in Youtube.com!
(2011-03-25, 10:22 PM)SaeedGh Wrote: [ -> ]I don't know why MyBB do not use new youtube embed code by default, but you can edit the embed code manually.

AdminCP -> Templates & Style -> Templates -> [Choose your theme] -> Ungrouped Templates -> video_youtube_embed

Replace the current code with this one:

<iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/{$id}" frameborder="0" allowfullscreen></iframe>

It's just a simple code. There are also some other options that you can find them by clicking on the "Embed" button located below each youtube video in Youtube.com!

Didnt work for me...

im trying to get the new youtube URL to work, "youtu.be/videoidgoeshere"

All i can find are codes to the old youtube URL.
I have the same problem. Only frame is shown and there is no video in it ???
Worked nicely for me Smile
@Andro what did you do exactly?
It didn't work for me and my previous code is also gone, now what should I do?
Works fine for me. Don't know what you're all doing wrong.
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$2"></param><embed src="http://www.youtube.com/v/$2" type="application/x-shockwave-flash" width="425" height="350"></embed></object>

Default Code Youtube

Exclamation
or use this code. working for me. change the with and height to your liking.

<iframe width="560" height="315" src="http://www.youtube.com/embed/{$id}" frameborder="0" allowfullscreen></iframe>
thanks for this...