Verge Studios Blog about Graphic Design, Web Design, and Joomla

Joomla Embed.ly Plugin: Improving Content embedding

Please Note: Plugin download link is at the very bottom of the article before the comments!

If there is one thing we love at Verge Studios, then it is using simple solutions for complex problems. One of the most annoying problems of working in a media rich world is embedding that media in web content. It's no problem if you have a an embed generator like Youtube does where all you need to do is click on the embed link and out comes some copy and pastable html code. However multiply this by 100 different services from twitpic over liveleak to Dinosaur Comics, and you are busy copy and pasting embed code more than you are actually enjoying content. The Joomla Community has been very industrious in the past and has come up with numerous content plugin solutions that will use short code ex: [youtube]link_to_video[/youtube] to render the appropriate embed code. However, the problem with most of these is that they have a fixed number of services, and if you want to add any other services, you either have to add them yourself to the plugin code, or hope the author updates them. The solution: Embed.ly an online service that will transform links for you into embeddable html, which continuously increases it list of supported services.

Using an hour of our time and their hosted and continuously updated javascript, we have created a content plugin for Joomla that will transform any links into their respective embeddable code. In true Verge Studios fashion, the basic configuration is very simple and should work out of the box. However we have included an advanced parameters section that will allow you to set exactly what links to transform and which to ignore (css classes),set image constraints, and also to limit the services accessed.

The use is very simple. All you need to do is take a link to one of the embed.ly supported services and enclose it in [embedly ][/embedly] tags. So for example a sample code inside a Joomla article would show:

[embedly ]http://www.youtube.com/watch?v=A1vMpkIRAjo&feature=related[/embedly]

Please note that I have left a space after the inside first embedly tag so I can render the above code and not have the plugin transform it into an embed code.

The result of the above code is here:

http://www.youtube.com/watch?v=A1vMpkIRAjo&feature=related

So where do we go from here? Embed.ly is still a very young service. However they already provide over 100 embed codes for various places throughout the web. Check out their list here. They offer scrips for Python, PHP, Ruby, and Javascript. We are even able to specify width and height on a code by code basis. So for example:

[embedly ]url|width|height[/embedly ]

Will render the URL with a given width and height

As the API develops we will be adding more plugin parameters.

Below find 3 more examples of using embed.ly on various services.

[embedly ]http://twitpic.com/2bjk8g[/embedly]
[embedly ]http://www.slideshare.net/sproutinc/sprout-building-brands-on-social-networks-feb-4th-2010[/embedly]
[embedly ]http://xkcd.com/303/[/embedly]
http://twitpic.com/2bjk8g
http://www.slideshare.net/sproutinc/sprout-building-brands-on-social-networks-feb-4th-2010
http://xkcd.com/303/
Attachments:
FileDescriptionFile size
Download this file (plg_vergeembedly.zip)plg_vergeembedly.zipPlugin to render embedded content using the Embed.ly API from a provided URL.14 Kb
  • raptor23

    avatar
    Does not work for me. I tried a youtube vid and the plugin just transformed it into a regular URL link. Am I doing something wrong?
  • Max Neuvians

    avatar
    Hi Raptor23,

    I just updated the plugin to work with jquery. Also, I had the same experience with a youtube video and it was because the user had disabled embedding.

    If this is not the case with the video, would you mind sharing the video with me?
  • jeffreyd00

    avatar
    sounds great, is there an editor button? my users will not remember to type embedly
  • Max Neuvians

    avatar
    Hi Jeffrey,

    that is a really good point. We always toss the WYSISWYG editor at first chance and never use the buttons at the bottom, but I agree it would be very useful. I will try to get something out this week.
Write comment
Your Contact Details:
Gravatar enabled
Comment:
Security
Please input the anti-spam code that you can read in the image.