Dec
24
2009

by

oEmbed plugin for Joomla

I was so impressed with the new oEmbed feature in wordpress 2.0 that I decided I would try and bring the joy to Joomla.  I have made a similar plugin in the past “easiertube” which seems to be getting some good reviews, but a simply way which was much easier to extend would be great!

So in principle :-

oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.

I have registered a project over at code.joomla.org and have an alpha version for Joomla 1.0 and 1.5 already.  The regex needs a little more work and has to try and cope with the idiosyncrasies of wysiwyg editors but once I figure the 1 regex, I can do away with figuring out the others for easiertube.

So my plugin uses a number of little scripts, it does rely heavily on oohEmbed.com

oohEmbed is an oEmbed compatible provider of HTML embed codes for various web sites

So, just by pasting a url from youtube, the url is passed to oohEmbed.com and a nice little jquery script converts the url to a link with a class and is replaced with the actual embed code.

currently this plugin will only support a few providers, when I get it working as I want I’ll add more

fivemin

amazon

flickr

googlevideo

hulu

imdb

metacafe

qik

revision3

slideshare

twitpic

viddler

vimeo

wikipedia

wordpress

youtube

Added in latest Alpah1.2 for joomla 1.5.x is myspace vids and screenr and a few bug fixes

So as an example if you paste the url http://www.youtube.com/watch?v-nTDNLUzjkpg on a line with text its not convert.

However, paste it on its own line:-



and it is.

At the moment I still need to tweek the regex as its not working in Joomla as it does in here, but like I said, that might be due to issues with wysiwyg editors.

I’ll keep you posted and add a link to the download with the project is accepted by joomla

Written by in: code,Joomla |

4 Comments »

  • Knauer says:

    To make this plugin w3c-conform, please change line 87 in oembed.php to

    $filename=”params.php?w=”.$maxWidth.”&m=”.$mode.”&h=”.$maxHeight.”";

    (and also replace ‘&’ with ‘&’ in all other relevant spots in this plugin, i.e. jquery.oembed.js,…)

    Thanks for this plugin!

  • Knauer says:

    This form edited my comment.

    The second ‘&’ was supposed to be an ‘& amp;’ without the space, of course.

  • yoshi says:

    Hi Knauer,
    I’ll certainly look in to that. Glad you found the plugin useful

  • yoshi says:

    Plugin updated for joomla 1.5.x see if that fixes your issues.
    Also added support for myspace vids & screenr

RSS feed for comments on this post. TrackBack URL


Leave a Reply

 

Powered by WordPress. Theme: TheBuckmaker [modified].