Recipe for a Flash-Free Flickr Slideshow in Drupal

Submitted by johanna on May 24, 2011 - 9:38pm

If you're in a Flickr photostream or group pool or photo set, there's a "Slideshow" button in the upper right corner that has "share" options. These share options give you embeddable code that you can drop into content on any site. What's great about it: it's easy to use, and if it's on your site then others can grab the code and share it in viral fashion. What's not so great about it? It's Flash. Flash is notorious for being far less cross-browser/platform compatible and user-accessible than Javascript/jQuery. For example, a jQuery slideshow will work on most smartphones, whereas Flash may or may not. Also, if you're using an embeddable proprietary widget from a third party, you don't have much (if any) control over its styling or how it's presented. If you are comfortable installing Drupal modules and using Views, it's not hard to pull any RSS feed into Drupal from Flickr and use Views to generate a jQuery slideshow. Mine is above (with no custom styling whatsoever), the latest 10 images from the Bird on a Wire Flickr pool (hat tip to Leonard Cohen).

It doesn't come with any of the nifty viral share features out of the box. Slideshow controls are available, but frankly they are unsightly without custom styling, so I omitted them here. But this slideshow can be custom themed, and it's accessible in older browsers and on many mobile platforms. Here's the recipe:

1. Setup

Set up Aggregator: Enable the Aggregator module in core. In the module settings, add the IMG tag to the list of allowed HTML tags. Add the URL for the Flickr RSS feed you want to use. Run cron.

2. Make a View Page or Block

Now you're ready to go into Views. Click "Add New View" and choose "Show > Aggregator item" and it will give you options to create a page and/or a block. I chose to create a block, which could be deployed in any region in the template via Blocks or Context or Panels. Set the format to "slideshow" and you can explore the settings options for Cycle there.