Your SlideShare is downloading. ×
  • Like
Importing and synchronizing content using Feeds
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Importing and synchronizing content using Feeds

  • 12,377 views
Published

Presentation from DrupalCamp Spain 2011 about Feeds in Drupal 7.

Presentation from DrupalCamp Spain 2011 about Feeds in Drupal 7.

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
12,377
On SlideShare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
97
Comments
0
Likes
13

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 7 drupalImporting and syncingcontent using FeedsPeter Vanhee2nd October 2011 - DrupalCamp Spain
  • 2. Who am I?‣ Consumer and contributor to Drupal for over 5 years‣ Co-founder Youth Agora @youthagora and Nuvole @nuvoleweb‣ Web consultant in Barcelona @pvhee
  • 3. www.europeancampus.eu
  • 4. Content is aggregated and synchronized using Feeds
  • 5. Use Cases‣ Build Activity streams using feeds from Twitter, Facebook, ...‣ Batch import sets of users from file‣ Import Commerce Products‣ ...
  • 6. What is Feeds?
  • 7. Feeds is...‣ Import / aggregate framework‣ Create and update drupal entities out of the box: nodes, users, taxonomy‣ Real-time feeds support
  • 8. Related‣ Migrate ‣ Aggregator‣ Table Wizard‣ User import‣ Node import
  • 9. Feeds as the standard for piping content
  • 10. Feeds usage drupal 6 drupal 7 statistics from drupal.org Statistics from drupal.org
  • 11. Fetcher ParserProcessor
  • 12. Fetcher‣ Http‣ File upload A complete list is at http://drupal.org/node/856644
  • 13. Parser‣ CSV, RSS1, RSS2, Atom‣ OPML, Sitemap XML‣ XPath for XML/HTML‣ JSONPath for JSON‣ YouTube, Flickr, Slideshare‣ iCal A complete list is at http://drupal.org/node/856644
  • 14. Processor‣ Node‣ User‣ Taxonomy‣ Commerce Products A complete list is at http://drupal.org/node/856644
  • 15. 2011.drupalcamp.es my drupal site Example #1Import and sync RSS Feeds
  • 16. Feeds importers are configurations of Fetcher Parser Processor
  • 17. create nodes of type Feed item
  • 18. fields in RSS fields in Feed item
  • 19. And now... importing!
  • 20. /import
  • 21. We can do this with Drupal Core Aggregator too!
  • 22. Let’s try spawning Feed A User 1 Feed B Feed A User Feed B Feed C Feed C1 User 2 Feed X Aggregator (core) Feeds
  • 23. Spawning
  • 24. Add Feed = Add Node
  • 25. Example #2Import images
  • 26. A node of type Story will hold a Flickr image
  • 27. the Flickr XML feed{ http://www.flickr.com/services/feeds/geo?format=rss_200&tags=drupalcamp
  • 28. Parse XML with XPath expressions //item title link description geo:lat geo:longmedia:thumbnail/@url
  • 29. Fetcher http Parser XPath Parser Map targets from XPathProcessor Node processor
  • 30. select XPath XML parser
  • 31. source is XPath Result fields in Story
  • 32. Importing
  • 33. We have problems ! Tags are not imported correctly
  • 34. Feeds Tamper http://drupal.org/project/feeds_tamper
  • 35. Enter Tampering Input Field Output Field explodedrupal feeds sevilla drupal feeds sevilla html_encodeMe&lt;/a&gt;posted a <a href=”.”>Me</a> photo:&lt;/p&gt; posted a photo
  • 36. Configure Tampering
  • 37. More tamper actions
  • 38. Add your own tamper plugins snippet from html_entity_decode.inc
  • 39. After importing... tags are now correctly split
  • 40. Importing Big Stuff‣ Feeds has Batch support‣ Feeds can run on cron jobs in the background
  • 41. Field support‣ Text ‣ Email‣ File ‣ Multimedia‣ Image ‣ Address‣ Link‣ Geofield‣ Taxonomy Tip: check Feeds issue‣ Password queues for patches‣ Date‣ Integer
  • 42. Feeds as a Framework‣ Supports import/sync of Commerce Products (via Commerce Feeds)‣ Straightforward to add custom fetchers, patchers and processors using Feed hooks (check feeds.api.php)
  • 43. Finally...when not to use Feeds‣ Content does not need to be stored by Drupal‣ Complex content migration tasks
  • 44. Now... Real-Time? Are we there yet? Are we there yet? Are we there yet?Publisher Subscriber Yes. Here you are. Are we there yet? Slide taken from @alexb presentation on Feeds
  • 45. Enter PubSubHubBubPublisher Hub Subscriber What does this solve? 1. Notifications to Subscribers managed by Hub 2. Send only what is changed and when it gets changed
  • 46. Euhm.. so what does Feeds do exactly? Feeds makes Drupal a PSHB SubscriberUpdate feeds in real-time from PSHB Hubs e.g. Blogger, Wordpress, Superfeedr, ...
  • 47. Thanks! Peter Vanhee @pvhee
  • 48. Questions? Peter Vanhee @pvhee