Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
YouTube MyCode (now with MyBB popup support!)
#1
Pencil 
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)
Reply
#2
WOW That's amazing. But can you make this plugin url compatible? Like [youtube]link of the video[/youtube] ???

Thanks,
faviouz
Reply
#3
(07-24-2009, 03:36 PM)faviouz Wrote: WOW That's amazing. But can you make this plugin url compatible? Like [youtube]link of the video[/youtube] ???

Thanks,
faviouz

Just use this regex:
\[youtube\]http://www.youtube.com/watch\?v=(.*)\[/youtube\]
Reply
#4
Does it work? Toungue (didn't feel like testing it)
Reply
#5
I've tested it in my board and it works.
btw there is a nice testing feature of mycode in admin cp. Wink
Reply
#6
have tried form Opera 10 browser? Smile
Hello, Welcome to MyBB Indonesia to get local support
My 'Simple' Unique Plugin here Smile
Reply
#7
Umm Does this do HQ videos?
I'm not here often, shoot a PM or whatever if you want my discord.
Reply
#8
HQ is available.

If want to try it out (different browser, ...) use the demo link in my first post (FF3, FF3.5, IE7, IE8 Operas 9, Chrome 2 works without any problem - other browser I haven't tested yet).


Attached Files Thumbnail(s)
   
Reply
#9
Added.

Thanks for the code querschlaeger Smile.
High Quality Web Hosting from HostKoi Web Services, LLC
Now offering FREE Hosting.
Reply
#10
can u add we add the forum css for a border ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)