MyBB Community Forums

Full Version: YouTube MyCode (now with MyBB popup support!)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
(2009-07-24, 10:34 PM)querschlaeger Wrote: [ -> ]I've tested it in my board and it works.
btw there is a nice testing feature of mycode in admin cp. Wink

any demo Toungue
Works perfectly - many thanks! Big Grin
How to add a button Youtube and when someone want to insert a movie just to press it and add the last part of the link, not to have to type manualy [youtube] [/youtube]?
(2009-07-24, 10:16 AM)querschlaeger Wrote: [ -> ]Hi,
this simple MyCode will embed a YouTube video (ok, nothing special...) but with the "new" popup support by Youtube!

Regex:
\[youtube\](.*?)\[/youtube\]
(or whatever you want)

Replacement:
<div style="margin:0;padding:0;width:512px;"><div style="float:right;"><button onclick="MyBB.popupWindow('http://www.youtube.com/watch_popup?v=$1','youtube_$1',640,480);" style="background:url(http://s.ytimg.com/yt/img/master-vfl102488.png) 0 -658px;border:0;height:22px;width:27px;" /></div><object type="application/x-shockwave-flash" data="http://www.youtube.com/v/$1&amp;fs=1&amp;rel=0" width="512" height="384"><param name="movie" value="http://www.youtube.com/v/$1&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /></object></div>

Usage:
[youtube]i9Z8gW8NBks[/youtube]
(it's the video ID by youtube)

Demo: Short Films (click on the image at the top on the right of a video)
(or view this screenshot)

Thanks bro! that's def a good added feature!!!
Lol I was looking for this and first thing I saw was this thread, sweet.

However, I can't seem to get it to work. Can someone help? I've pasted the replacement in the replacement box, and the code into the one above, what next?
not working for me......


manny
It's great when it works, but when I try posting two YouTube videos in the same thread it doesn't like it, and doesn't render either of them.
Guys, Youtube already changed the image URL (http://s.ytimg.com/yt/img/master-vfl102488.png) so it can't work perfectly any more.

Just wait for MyBB 1.6 This will include Video-MyCode by default.
Here work very well.
Congratulations for the code.
It doesn't show pop up arrow...Please help.
Pages: 1 2 3 4