collective.oembed

by Jean-Michel FRANCOIS last modified Apr 25, 2012 10:54 AM

embed content from oEmbed-providers as well as make your plonesite being oembed provider

Project Description

Introduction

This addon integrate oembed into Plone. You can find a demo at http://youtu.be/kHikGIWrvCs

oEmbed official documentation: http://http://oembed.com/

oembed provider

Your site will become an oembed provider using @@oembed view as an endpoint:

URL Scheme: http://mysite.com/*
API endpoint: http://mysite.com/@@oembed
Supports discovery via <link> tags

oembed client

This addon provide an integration of jquery.oembed plugin. Because there are many fork you have to choose the one you will use. The official plugin has been integrated to plone throw the addon collective.js.oembed

The oembed client is integrated using a viewlet that is not activated by default. You have to activate it throw the controlpanel. It is configured that way:

<script type="text/javascript">
  jqueryOmebedSettings = {...} //extracted from the controlpanel
</script>
<script type="text/javascript">
        $(document).ready(function() {
            $(".oembed").oembed(null,jqueryOmebedSettings);
        });
</script>

consumer

A consumer is availabe throw a utility:

>>> url = "http://www.youtube.com/watch?v=it1hMtZKle8"
>>> consumer = component.getUtility(collective.oembed.interfaces.IConsumer)
>>> consumer.get_data(url, maxwidth=300, maxheight=None, format='json')
{...}

There is also a @@collective.oembed.consumer view, which can take params throw attributes:

>>> consumer_view = component.queryMultiAdapter((self.context,self.request),
...                                 name=u'collective.oembed.consumer')
>>> consumer_view._url = url
>>> consumer_view.embed_auto()
<div class="oembed-wrapper oembed-video">...</div>

Embed.ly

This addon can use embed.ly service. You can set the embed.ly api key in the control panel or install and configure collective.embedly, this addon will use the configuration provided by this one.

Providers

embed.ly is activated only if you have added an api_key or configured collective.embedly. The addon provide native support for the following services:

External providers:

Video providers:

Photo providers:

Rich providers:

How to get use (get the working url I want)

All most every website has many kind of URL

Credits

Companies

makinacom

Authors

Contributors

Changelog

1.2.1 (2012-04-25)

  • Fix offline mode (when working without internet)

1.2 (2012-03-15)

  • add Plone 4.0.x support

1.1 (2012-02-22)

  • Add collective.oembed.url2embed browser view component
  • Add collective.oembed.superconsumer browser view component
  • Add GoogleMaps, gist.github.com, google calendar, google docs, scribd support
  • Support shorted url with tinyurl.com, goo.gl, bit.ly, t.co, youtu.be, vbly.us

1.0 (2012-01-13)

  • Fix regex for 5min endpoint.
  • Handle more error: HTTPError, OEmbedError
  • Add url2embed support
  • Add oembed support for instagr.am, Vhx.tv, Official.FM, Nfb.ca [raphigaziano]
  • Add url2embed support for picasaweb [raphigaziano]

1.0a (2012-01-02)

  • Initial release

Self-Certification

[ ] Internationalized

[X] Unit tests

[X] End-user documentation

[X] Internal documentation (documentation, interfaces, etc.)

[ ] Existed and maintained for at least 6 months

[ ] Installs and uninstalls cleanly

[X] Code structure follows best practice

Current Release
collective.oembed 1.2.1

Released Apr 25, 2012

Download file Get collective.oembed for all platforms
collective.oembed-1.2.1.zip
If you are using Plone 3.2 or higher, you probably want to install this product with buildout. See our tutorial on installing add-on products with buildout for more information.

All Releases

Version Released Description Compatibility Licenses Status
1.2.1 Apr 25, 2012 More about this release… GPL final
1.2 Mar 15, 2012 More about this release… GPL final
1.1 Feb 22, 2012 More about this release… GPL final
1.0 Jan 13, 2012 - Fix regex for 5min endpoint. - Handle more error: HTTPError, OEmbedError - Add url2embed support - Add oembed support for instagr.am, Vhx.tv, Official.FM, Nfb.ca [raphigaziano] - Add url2embed support for picasaweb [raphigaziano] More about this release…
Plone 4.1
Plone 4
GPL final

Comments (0)