MyBB Community Forums

Full Version: [MyCode]Youtube with iframe
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hey guys  i was trying to make something new but thought to make a new youtube code with iframe here it is 

Title - Youtube 

Desc. - To share yt videos

Regular expression - \[youtube\](.*?)\[/youtube\]

Replacement - <iframe width="854" height="480" src="https://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>


You can change the size of the video too Smile


how to use 



first copy this - [Image: MG5s6xR.jpg?1]


then paste it like this
 
[youtube]1WMhNahI3ig[/youtube]

then u have your video Smile

[Image: B4A9eWf.jpg?1]

Enjoy.
how to install?
I am using this MyCode with zero problems, thanks!
(2017-02-14, 06:03 AM)Rika Wrote: [ -> ]I am using this MyCode with zero problems, thanks!

You can use the default [video=youtube][/video] instead of this.
Here is a better replacement

Go here
yourforum/admin/index.php?module=config-mycode&action=add

Regular Expression
\[youtube\](.*?)\[/youtube\]

Replacement
<div style="width:100%;height:auto;max-width:560px;max-height:315px"><iframe width="100%" height="315px" src="https://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe></div>
(2015-12-23, 08:01 AM)RoD Wrote: [ -> ]hey guys  i was trying to make something new but thought to make a new youtube code with iframe here it is 

Title - Youtube 

Desc. - To share yt videos

Regular expression - \[youtube\](.*?)\[/youtube\]

Replacement - <iframe width="854" height="480" src="https://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>


You can change the size of the video too Smile


how to use 



first copy this - [Image: MG5s6xR.jpg?1]


then paste it like this
 
[youtube]1WMhNahI3ig[/youtube]

then u have your video Smile

[Image: B4A9eWf.jpg?1]

Enjoy.

I know this is old and I'll probably get jumped for the old thread but this worked for the CURRENT Version...
Thanks!