YouTube plugin for Mango

As mentioned earlier, this site is powered by Mango Blog. Having played with it a little to get it installed, I thought I’d look at its extensibility…

The plugin framework seems quite simple once the basic concepts have been understood; so I started to write my first plugin.

The documentation mentions a YouTube plugin but as far as I could see it doesn’t actually exist, so this seemed an ideal place to start! Simply download the files and unzip them into /components/plugins/user/ – and then activate the plugin from the Add-ons page in the blog admin.

All you need to do to include a video is find out what the video’s ID is (it’s the string of characters after v= in the YouTube URL), and write the following into your post or page:

[youtube:videoid]

And your video should be included like so:

I may develop this further – maybe add options to specify the global video size for your blog. If you have anything you’d like to see, please let me know! 

 

Comments

Josh

Very cool :) I am working on two other plugins as well -- this will help me understand the plugin framework.

23 January 2008, 13:41
Reply
Mark Warrick

Awesome plugin! It worked flawlessly on my site: http://www.economycorps.com

16 April 2008, 19:14
Reply
brice

Thanks! I just discovered mango, and I am quickly falling in love. Other than the slowness, its awesome. But there may be a setting that I need to discover.

This plugin is perfect. Thanks for taking the time and sharing.

27 May 2008, 18:22
Reply
CheyenneJack

Flawless execution. Well Done. Saved me a boatload of time. Going to have to figure out how you did it. Just spent hours last night figuring out how to enable iFrames on Mangoblog and blogging on it, wasn't sure if I had the energy to tackle YouTube today. Thankfully you made it cake. Only now I'm curious about extensibility code, so in the end I may not save time, but it will be more fun and productive.

08 August 2008, 00:23
Reply
bret

Love it! Thanks. I think we all need to write more for Mango. Spread the word!!

28 October 2008, 04:15
Reply
Dave

Please note that this plugin does not work in internet explorer 8

01 December 2008, 11:15
Reply
Seb Duggan

Seems to work fine in IE8 for me - in both strict and compatibility modes.

But I'll take a closer look later...

01 December 2008, 11:21
Reply
Mango Blog Hosting

We've used your plugin too over at Mango Blog Hosting (http://mangobloghosting.com), thanks!

04 January 2009, 07:04
Reply
Steve

It says Plugin could not be activated when attempting to activate it, using MangoBlog 1.2.4

30 January 2009, 21:24
Reply
Rafael

I have added the youtube feature but i want to customize the video and not show related videos and to specify a specific color and size. I have pasted the custom code into the HTML and it did not work can you suggest if there is a way.

16 February 2009, 06:21
Reply
Joanna H

Thanks for the plugin. Its tops! Keep up the good work!

30 July 2009, 12:27
Reply
josh

I am having trouble with one YouTube entry on my site and I'm not sure why. The code is working for another video, and the video in question is working on it's own Mango page, but on the main blog page I can't get it to work. Is there possibly an issue with having two or more YouTube videos on the same page?

I would appreciate it if anyone had any insight into this.

11 November 2009, 12:57
Reply
josh

I figured out the problem, but I don't know how to fix it. If you use this plugin in the Excerpts section, the video will not be displayed - only the tag will. It works fine, however, in the actual blog post.

11 November 2009, 13:28
Reply
Seb Duggan

Thanks Josh - I'll take a look at that and release an update soon!

11 November 2009, 13:32
Reply
John Corliss

I was able to add the plugin however the youtube url doesn't work. It only displays the [youtube:videoid] link. Running CF9. Am I doing something wrong?

30 January 2010, 09:32
Reply
ROCKandREVIEW

great plugin. we use it all the time over at ROCKandREVIEW.com

how do we set custom values for the player, for instance full screen?

16 April 2010, 21:47
Reply
ROCKandREVIEW

scratch that - here is the code as i've modified it to work:

<object width="425" height="355">

<param name="movie" value="http://www.youtube.com/v/#videoId#&fs=1&rel=1"></param>" target="_blank">http://www.youtube.com/v/#videoId#&fs=1&rel=1"></param>

                  

<param name="wmode" value="transparent"></param>

<param name="allowFullScreen" value="true"></param>

<embed src="http://www.youtube.com/v/#videoId#&fs=1&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355" allowfullscreen="true"></embed>

</object>

16 April 2010, 21:57
Reply
Shane

Works like a champ. Thanks!

21 July 2010, 16:15
Reply
Lucenut

I just tried this plugin in MangoBlog 1.6 and it won't activate. I cleared the cache and even restarted CF. Just get "Plugin could not be activated"

13 April 2012, 21:16
Reply
Post a Comment
  1. Leave this field empty

Required Field