SlideShare a Scribd company logo
1 of 19
Download to read offline
oEmbed




            http://puresign.be
                                 oEmbed
            @puresign
                                 Sven Decabooter
Thursday 13 September 2012
oEmbed




   Contents
                             • What?
                             • oEmbed in Drupal
                             • Extending the module
                             • Demo




                                                               2
Thursday 13 September 2012
oEmbed




                             What is it?


Thursday 13 September 2012
oEmbed




              What?
                             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.

                             http://oembed.com/




                                                                          4
Thursday 13 September 2012
oEmbed




              What?          Consumer:
                             http://www.flickr.com/services/oembed/?url=http%3A//
                             www.flickr.com/photos/bees/2341623661/


                             Provider:
                             {
                             	   "version": "1.0",
                             	   "type": "photo",
                             	   "width": 240,
                             	   "height": 160,
                             	   "title": "ZB8T0193",
                             	   "url": "http://farm4.static.flickr.com/
                             3123/2341623661_7c99f48bbf_m.jpg",
                             	   "author_name": "Bees",
                             	   "author_url": "http://www.flickr.com/photos/bees/",
                             	   "provider_name": "Flickr",
                             	   "provider_url": "http://www.flickr.com/"
                             }




                                                                                               5
Thursday 13 September 2012
oEmbed




              What?
                             http://www.youtube.com/watch?v=yzdZHByJmFUa




                                                                            6
Thursday 13 September 2012
oEmbed




                             oEmbed in
                               Drupal

Thursday 13 September 2012
oEmbed




              What?              http://drupal.org/project/oembed
                                 By Dave Reid - bangpound - voxpelli

                             •   oEmbed Core
                             •   oEmbed Field
                             •   oEmbed Filter
                             •   oEmbed Embed.ly
                             •   oEmbed Provider
                             •   Media: oEmbed



                                                                          8
Thursday 13 September 2012
oEmbed                                                                oEmbed




       Core                  • Manage oEmbed providers (CTools exportables)
                             • Test oEmbed URLs
                             • Theming for oEmbed output
                             • Set of default providers
                             • Form API elements:
                              •   oembed - oembed_bare - oembed_thumbnail

                             • API functions
                             • Caching


                                                                                     9
Thursday 13 September 2012
oEmbed                 oEmbed




       Core




                                      10
Thursday 13 September 2012
oEmbed                                                       oEmbed




       Field
                             • Provides an oEmbed Field formatter
                             • For Link fields
                                (http://drupal.org/project/link)




                                                                            11
Thursday 13 September 2012
oEmbed                                                    oEmbed




       Filter
                             • Provides oEmbed filter for Drupal input
                                formats




                                                                         12
Thursday 13 September 2012
oEmbed                                                         oEmbed




  Embed.ly
                             • Adds definitions for providers supported
                                by embed.ly

                             • http://embed.ly: paid service to embed
                                rich media in your apps / websites




                                                                          13
Thursday 13 September 2012
oEmbed                                                      oEmbed




      Provider
                             • Makes it possible for a Drupal site to
                                become an oEmbed provider itself

                             • Provides oEmbed data in JSON /
                                JSONP / XML formats

                             • Defaults to rendering node HTML output




                                                                           14
Thursday 13 September 2012
Media:                                                       oEmbed




      oEmbed
                             • Integration with Media module
                                (http://drupal.org/project/media)

                             • Creates a oEmbed PHP Stream Wrapper
                                for Resource

                             • Implements the various formatter and file
                                listing hooks in the Media module.




                                                                             15
Thursday 13 September 2012
oEmbed




                             Extending the
                                module

Thursday 13 September 2012
oEmbed




Extending                    • add support for an extra provider:
                                hook_default_oembedcore_provider()
                             • alter existing providers:
                                hook_oembedprovider_alter()
                             • alter oembed request data (to provider):
                                hook_oembed_request_alter()
                             • add your own providing logic (for your
                                oembed_provider enabled website) :
                                hook_oembedprovider()


                                                                             17
Thursday 13 September 2012
oEmbed




                             Demo


Thursday 13 September 2012
oEmbed




Questions                    Contact

                             Sven Decabooter
                             sven@puresign.be
                             @sdecabooter

                             Pure Sign
                             Liefkensstraat 35B
                             9032 Gent - Wondelgem
                             Tel. 09/277 78 24

                             http://puresign.be
                             contact@puresign.be
                             @puresign
                                                              19
Thursday 13 September 2012

More Related Content

Similar to oEmbed in Drupal

PFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP AppsPFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP Apps
Pablo Godel
 
Building businesspost.ie using Node.js
Building businesspost.ie using Node.jsBuilding businesspost.ie using Node.js
Building businesspost.ie using Node.js
Richard Rodger
 
Fluentd: the missing log collector
Fluentd: the missing log collectorFluentd: the missing log collector
Fluentd: the missing log collector
td_kiyoto
 

Similar to oEmbed in Drupal (20)

PFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP AppsPFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP Apps
 
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
 
Who Pulls the Strings?
Who Pulls the Strings?Who Pulls the Strings?
Who Pulls the Strings?
 
Introducing Immutant
Introducing Immutant Introducing Immutant
Introducing Immutant
 
Io lang
Io langIo lang
Io lang
 
Intro to Chef
Intro to ChefIntro to Chef
Intro to Chef
 
Ruby CI with Jenkins
Ruby CI with JenkinsRuby CI with Jenkins
Ruby CI with Jenkins
 
Best Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim WardBest Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim Ward
 
Building businesspost.ie using Node.js
Building businesspost.ie using Node.jsBuilding businesspost.ie using Node.js
Building businesspost.ie using Node.js
 
Fluentd: the missing log collector
Fluentd: the missing log collectorFluentd: the missing log collector
Fluentd: the missing log collector
 
Complete Dojo
Complete DojoComplete Dojo
Complete Dojo
 
Symfony2 and MongoDB
Symfony2 and MongoDBSymfony2 and MongoDB
Symfony2 and MongoDB
 
Web Page Test - Beyond the Basics
Web Page Test - Beyond the BasicsWeb Page Test - Beyond the Basics
Web Page Test - Beyond the Basics
 
Back-end with SonataAdminBundle (and Symfony2, of course...)
Back-end with SonataAdminBundle (and Symfony2, of course...)Back-end with SonataAdminBundle (and Symfony2, of course...)
Back-end with SonataAdminBundle (and Symfony2, of course...)
 
Of metacello, git, scripting and things
Of metacello, git, scripting and thingsOf metacello, git, scripting and things
Of metacello, git, scripting and things
 
Newbies, you are not alone
Newbies, you are not aloneNewbies, you are not alone
Newbies, you are not alone
 
Scraping in 20 mins
Scraping in 20 minsScraping in 20 mins
Scraping in 20 mins
 
Tame your test environment with Docker Compose
Tame your test environment with Docker ComposeTame your test environment with Docker Compose
Tame your test environment with Docker Compose
 
Ironfan: Build a Hadoop Cluster in 20 minutes
Ironfan: Build a Hadoop Cluster in 20 minutesIronfan: Build a Hadoop Cluster in 20 minutes
Ironfan: Build a Hadoop Cluster in 20 minutes
 
Developing RESTful Web APIs with Python, Flask and MongoDB
Developing RESTful Web APIs with Python, Flask and MongoDBDeveloping RESTful Web APIs with Python, Flask and MongoDB
Developing RESTful Web APIs with Python, Flask and MongoDB
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

oEmbed in Drupal

  • 1. oEmbed http://puresign.be oEmbed @puresign Sven Decabooter Thursday 13 September 2012
  • 2. oEmbed Contents • What? • oEmbed in Drupal • Extending the module • Demo 2 Thursday 13 September 2012
  • 3. oEmbed What is it? Thursday 13 September 2012
  • 4. oEmbed What? 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. http://oembed.com/ 4 Thursday 13 September 2012
  • 5. oEmbed What? Consumer: http://www.flickr.com/services/oembed/?url=http%3A// www.flickr.com/photos/bees/2341623661/ Provider: { "version": "1.0", "type": "photo", "width": 240, "height": 160, "title": "ZB8T0193", "url": "http://farm4.static.flickr.com/ 3123/2341623661_7c99f48bbf_m.jpg", "author_name": "Bees", "author_url": "http://www.flickr.com/photos/bees/", "provider_name": "Flickr", "provider_url": "http://www.flickr.com/" } 5 Thursday 13 September 2012
  • 6. oEmbed What? http://www.youtube.com/watch?v=yzdZHByJmFUa 6 Thursday 13 September 2012
  • 7. oEmbed oEmbed in Drupal Thursday 13 September 2012
  • 8. oEmbed What? http://drupal.org/project/oembed By Dave Reid - bangpound - voxpelli • oEmbed Core • oEmbed Field • oEmbed Filter • oEmbed Embed.ly • oEmbed Provider • Media: oEmbed 8 Thursday 13 September 2012
  • 9. oEmbed oEmbed Core • Manage oEmbed providers (CTools exportables) • Test oEmbed URLs • Theming for oEmbed output • Set of default providers • Form API elements: • oembed - oembed_bare - oembed_thumbnail • API functions • Caching 9 Thursday 13 September 2012
  • 10. oEmbed oEmbed Core 10 Thursday 13 September 2012
  • 11. oEmbed oEmbed Field • Provides an oEmbed Field formatter • For Link fields (http://drupal.org/project/link) 11 Thursday 13 September 2012
  • 12. oEmbed oEmbed Filter • Provides oEmbed filter for Drupal input formats 12 Thursday 13 September 2012
  • 13. oEmbed oEmbed Embed.ly • Adds definitions for providers supported by embed.ly • http://embed.ly: paid service to embed rich media in your apps / websites 13 Thursday 13 September 2012
  • 14. oEmbed oEmbed Provider • Makes it possible for a Drupal site to become an oEmbed provider itself • Provides oEmbed data in JSON / JSONP / XML formats • Defaults to rendering node HTML output 14 Thursday 13 September 2012
  • 15. Media: oEmbed oEmbed • Integration with Media module (http://drupal.org/project/media) • Creates a oEmbed PHP Stream Wrapper for Resource • Implements the various formatter and file listing hooks in the Media module. 15 Thursday 13 September 2012
  • 16. oEmbed Extending the module Thursday 13 September 2012
  • 17. oEmbed Extending • add support for an extra provider: hook_default_oembedcore_provider() • alter existing providers: hook_oembedprovider_alter() • alter oembed request data (to provider): hook_oembed_request_alter() • add your own providing logic (for your oembed_provider enabled website) : hook_oembedprovider() 17 Thursday 13 September 2012
  • 18. oEmbed Demo Thursday 13 September 2012
  • 19. oEmbed Questions Contact Sven Decabooter sven@puresign.be @sdecabooter Pure Sign Liefkensstraat 35B 9032 Gent - Wondelgem Tel. 09/277 78 24 http://puresign.be contact@puresign.be @puresign 19 Thursday 13 September 2012