Blog

Flickrpress: WordPress Flickr widget

Flickrpress screenshotFlickrpress is a widget/shortcode function to display items from Flickr in the sidebar or within pages and posts. This widget supports:

  • Flickr RSS feeds
  • Photostream
  • Filtering by tag
  • One or more photosets
  • Favorites
  • Displaying random items

Other features:

  • Choose from three different thumbnail types
  • Lightbox/Thickbox are supported
  • Data is cached locally to lower server load
  • Secure Flickr API used, to eliminate the risk of damage to your server, unlike some other Flickr widgets
  • Flickrpress is a multi-widget, so you can use more than one instance (e.g., one in your sidebar, one in your footer)
  • Use as a shortcode to insert into posts and pages — multiple instances supported in the one entry

Flickrpress uses the excellent phpFlickr library.


My latest project:

The Cartographer banner


Download

Download Flickrpress at the WordPress site.

If you like Flickrpress, please consider buying one of my products.

Installation

  1. Unzip the package, and upload flickrpress to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Add the ‘Flickr Widget’ to your sidebar and configure, or see the ‘Shortcodes’ section for information on use in pages and posts

If you wish to use content from anything but an RSS feed, you will need a Flickr API key. This can be obtained from Flickr

If you wish to use Lightbox, you must first install the Lightbox plugin.

Shortcode

Shortcodes are snippets of text that can be inserted into pages and posts. These snippets are replaced by various generated content. Flickrpress provides a ‘flickrpress’ shortcode to display images from Flickr within a page/post.

Available parameters:

type One of: ‘rss’, ‘photostream’, ‘sets’, ‘favorites’
url URL for RSS feed
api_key API Key for types other than RSS
account Account name, email or ID
sets Comma-separated list of photoset titles
tags Comma-separated list of tags to filter by (for photostream view)
view One of: ‘squares’ (view as squares), ‘proportional’ (proportional thumbnails) , ‘large’ (large thumbnails)
count Number of thumbnails to display
paging ‘true’ to show page navigation, to move back and forward through pages of images (implemented using AJAX)
random ‘true’ to display randomly
lightbox ‘true’ to use Lightbox
columns Number of columns of images to display

Example:

  [flickrpress type="photostream" api_key="xxxxxxxxxxxxxxxxxxxxxx" account="michaeltyson" count="30" paging="true" lightbox="true"]

Styling

Flickrpress comes with CSS styling, but if you wish to modify its appearance, such as adding frame borders, simply style the “flickrpress-container” class. See style.css for more.

FAQ

I’m seeing “Flickr is currently unavailable” messages

You may have an incorrect setting: To see the actual error message, open your server’s error log and look for Flickrpress messages. How you do that depends on your host – on mine, Site5, the error log appears in the WordPress folder; on others, you access it through a web interface). If you can’t get to it, open up the file includes/interface.php in the plugin’s folder, and change error_log on line 22 to echo – then any messages will be printed to the screen. You’ll want to change it back afterwards so your visitors don’t see those messages.

Changelog

1.0.2

  • Added Thickbox support
  • Compatibility fix for PHP 4

1.0.1

  • Bugfix in navigation javascript encountered when Lightbox isn’t installed

1.0

  • Implemented AJAX-based navigation through pages of images
  • Added shortcode documentation
  • Caching for shortcode and php calls
  • Removed ‘css’ option in favour of always including CSS
  • Fixed conflict between shortcode and widget versions
  • Fixed bug in loading all photostream items

0.3.2

  • Fixed a warning when using shortcode

0.3.1

  • Fixed a packaging snafu

0.3

  • Support for use outside of sidebar

0.2.1

  • Bugfix for displaying random favourites

0.2

  • Now able to be styled as described in http://www.webdesignerwall.com/tutorials/css-decorative-gallery/. See style.css for more info.

0.1.1

  • Bugfix for when only 1 random image shown

0.1

  • Initial release
, , . Bookmark the permalink. Both comments and trackbacks are currently closed.

36 Comments

  1. Alexa
    Posted October 7, 2009 at 3:49 am | Permalink

    Hello –

    I love the plugin but use Lightview which doesn’t appear to work with the “Lightbox” option as built into the widget – should it? And, if not, that’s fine for it to go to the gallery – but can you tell me how I can code it so it opens in a new window (target_blank)? I have various plugins to make that happen within a post or in the blogroll, but it doesn’t appear to be helping with this widget.

    Thanks! Alexa

  2. Posted October 8, 2009 at 3:10 pm | Permalink

    I was wondering if anyone figured out how to use this without using the widget. I looked around, but didn’t find anything yet.

    It seems like a great plug-in, but I really don’t want to use widgets right now in my layout.

  3. Posted October 12, 2009 at 8:33 pm | Permalink

    +1 for using this outside of a widget. While I do use it in a widgeted sidebar, I like the plugin, layout and feature set better than the other flickr (page) plugins, and would really like to use it on a page. Any thoughts to doing this?

    Thanks.

  4. Posted October 14, 2009 at 5:05 am | Permalink

    FlickrPress suddenly stopped working on my blog. Was not logged in or making changes at the time. Not sure if it is FlickrPress, Flickr, or Lightbox, but clicking a photo loads a small black box in the center of the screen with a loading circle meter and nothing else. Is this a known issue?

    • Posted October 15, 2009 at 9:27 am | Permalink

      Not sure, ML, is it happening for other people, or just you? If the image isn’t loading, it sounds like your connection to Flickr is timing out, perhaps

  5. Posted October 15, 2009 at 9:26 am | Permalink

    Hi guys – I just released v3.0 which will give you use outside of the sidebar. See the readme for details.

  6. Alexa
    Posted October 15, 2009 at 1:00 pm | Permalink

    Michael, I went to do the upgrade (the automatic one) in WP 2.8.4 and it said “The plugin does not have a valid header.” Now, it’s not in my list of plugins at all, though still in my plugin directory.

    Is this an isolated problem – or you may want to check the update? Thx –

  7. Posted October 15, 2009 at 3:36 pm | Permalink

    Hi, great to hear of new options… but when I auto updated the plugin, well, it went all “Bermuda Triangle” on me. Totally disappeared from radar, nowhere to be found. The active widget in the sidebar vanished, and the option to add it on the widget admin page is gone. It doesn’t even show anywhere in my list of plugins active or otherwise. Just thought I’d let you know. Love the plugin and look forward to using it again. Thanks. (using WP 2.8.4)

  8. Posted October 15, 2009 at 11:18 pm | Permalink

    Same symptoms as Alex and Mitch on WP 2.8.4. The plugin goes bye-bye on upgrade.

  9. Posted October 16, 2009 at 10:46 am | Permalink

    Whoops! Sorry, guys. That was my bad. Fixed in 0.3.1.

  10. Posted October 18, 2009 at 10:22 pm | Permalink

    I get: Missing argument 2 for flickrpress().

    when I try to use the shortcode Do you have a full example?

    I used

    Where key, account and set are set to what I want to display. It also just displays them in a column down instead of 2 rows of 4 like they did before the upgrade.

  11. Posted October 19, 2009 at 12:54 am | Permalink

    hmmm, in my last post, my shortcode example did not show up.

  12. Posted October 20, 2009 at 6:28 pm | Permalink

    Hi, I just upgraded to 0.3.2 and the widget disappears in 2.8.4.

    Love the plugin otherwise!

    • Posted October 23, 2009 at 3:35 pm | Permalink

      Hi Greg – Do you have access to your error logs? I’d be interested to see if there’s anything in there that’s helpful

  13. Posted October 22, 2009 at 12:29 am | Permalink

    Undoubtedly the best Flickr plug-in for WordPress yet!! Thanks for all your great work.

  14. Justin
    Posted October 27, 2009 at 5:48 am | Permalink

    Hi all-

    I wonder if anybody else has had the issue with this widget not allowing more than 4 thumbnails to show in the sidebar (even though I set the settings to 12)? Also, it doesn’t seem to be pulling the newest images from my RSS feed. If anybody can offer assitance, it would be much appreciated! Thanks for the great widget Michael!

    -Justin

  15. Posted October 28, 2009 at 3:08 am | Permalink

    I have an issue with a collision between the widget and the short code version. I had the widget in the side bar and then created a gallery page using the short code. When you went to the gallery page the widget would be removed, as in the widget was actually removed in admin, and it disappeared from all pages.

    in short it would seem that the short code and the widget are incompatible with one an other.

  16. Posted October 28, 2009 at 3:10 am | Permalink

    For those looking for the short example here you go:

    [flickrpress type=”sets” api_key=”YOUR API KEY goes here” account=”Your Account here” view=”squares” count=”10″ lightbox=”true” sets=”Comma seperated, list, of set, names” title=”Title of the group of photos”]

  17. Posted October 28, 2009 at 3:12 am | Permalink

    Here is the documentation from the plugin’s code for short code parameters:

    • Available parameters:
    • type One of: ‘rss’, ‘photostream’, ‘sets’, ‘favorites’
    • url URL for RSS feed
    • api_key API Key for types other than RSS
    • account Account name, email or ID
    • sets Comma-separated list of photoset titles
    • tags Comma-separated list of tags to filter by (for photostream view)
    • view One of: ‘squares’ (view as squares), ‘proportional’ (proportional thumbnails) , ‘large’ (large thumbnails)
    • count Number of thumbnails to display
    • random ‘true’ to display randomly
    • lightbox ‘true’ to use Lightbox
    • css ‘true’ to add CSS styling
  18. Posted October 29, 2009 at 6:54 am | Permalink

    I was able to re-insert the sidebar widget after adding shortcode to a page had eliminated it. The page still has only 1 long column as John mentioned earlier, I guess now I just need to learn how to css a specific page? :)

    Silly question. If I want to increase the size of the Square thumbnails (in the sidebar widget), where do I do that? I tried changing in style.css, but that didn’t work.

    Thank you.

  19. Posted October 29, 2009 at 7:11 am | Permalink

    Update: after getting the sidebar widget to show again, I went to the page I had shortcode on and wow, the page format was correct with row and columns. I made a couple of changes to the text on the page, and once I saved it the sidebar widget disappeared yet again, AND the proper page formatting also disappeared, back to one long column.

    Not sure what to do next, guess I’ll remove all shortcode info from the page so I can hope to get my sidebar working again. Look forward to any feedback you have that will allow them to work together.

    Thanks.

  20. Posted November 5, 2009 at 11:57 pm | Permalink

    Hey-

    I’ve got the plugin working with my API key in random from photostream mode. The pictures it returns are from the same small set of the photostream. The results are random, but from the same 1% of the photostream. Is there a setting in flickr so that I can use more of my photos?

  21. Enrico
    Posted November 6, 2009 at 10:48 am | Permalink

    Hi,

    I can’t find an example of the PHP function to use when I want to display flickrpress in my custom sidebar (without using the widget)..anyone could help me??

    thx

  22. Posted November 9, 2009 at 3:49 am | Permalink

    Great plugin, Michael. Just a quick note. In case anybody is interested in using it with Lightview Plus, one change needs to be made in line 86 of flickrpress/flickr.php:

    class=”lightview” rel=”gallery[flickr]“

    Cheers,

    Johannes

  23. Posted November 12, 2009 at 6:38 pm | Permalink

    thanks for the great WordPress Flickr widget!!! if you could give me a little help it would be much appreciated…

    I have the the WordPress Flickr widget installed but I am having trouble with the lightbox gallery, how do you get the flickr photo to open once you click on the photo to go into a gallery? I tried downloading and installing several gallery type widgets but couldn’t get the light box to run? Any ideas? I really appreciate your help!!!

    thanks,

    Yale

  24. Sha
    Posted November 13, 2009 at 2:03 pm | Permalink

    how would you call this with php instead of using a widget?

  25. Posted November 14, 2009 at 4:14 am | Permalink

    Love Flickrpress! I can’t wait to integrate it into my site. It works great if I want to show my on photos but unfortunately I have run into a problem trying to share my favorites. I don’t want to display my own stream but rather my favorites from Flickr. I have set the widget to do so, and it opens with Lightbox without issue, but when I try to follow the “View on Flickr” link it gives an error because it tries to pull the image from my own Flickr account rather than the original artist’s image that I have favorited. Is there a way to fix this at all? I would love to share other people’s work that I find interesting on Flickr.

  26. Posted November 14, 2009 at 8:57 am | Permalink

    I just can’t seem to get this plugin to work. I’ve installed it, configured my correct API key and account name (even tried email) and nothing is showing up :/

  27. Posted November 22, 2009 at 8:01 pm | Permalink

    This looks like a great plugin, but I just can’t get it to work – no matter how many times I’ve tried to uninstall, re-do, re-upload, etc. The title of the widget shows up in my sidebar, but no photos. I followed instructions to the letter, but my photosets just don’t show up. I thought I had finally discovered a nice little sidebar photo gallery – and this probably IS one. It just doesn’t work for me.

    Thanks.

    Deb

  28. Posted November 22, 2009 at 8:12 pm | Permalink

    Deb

    I think I had some issues trying to get my images to appear because of a wrong username. When logged into Flickr, at the top right it says “Signed in as xxxxxxxx”. Use that as the username in the widget and then your API key. My username is different than my photostream name and so that is why it wasn’t showing my images.

    • Posted November 22, 2009 at 8:18 pm | Permalink

      That fixed it for me IronmanDunn. Thanks!

    • Posted November 22, 2009 at 8:20 pm | Permalink

      One thing though. It show’s thumbnails and when you click on it it just opens a picture. Are you able to configure it to take you to the actual flickr photo page?

  29. Posted November 22, 2009 at 8:45 pm | Permalink

    I am not sure if that is possible without the Lightbox plugin being installed, which I recommend anyways. When an image is clicked on then it opens in a lightbox and provides a link to view the image on Flickr. I already had the Lightbox2 plugin running on my site and so Flickrpress integrated easily. Maybe try out Lightbox2 to see if you like it – I do.

    To see how Flickr press works on my site with the link then visit http://www.caringforapathy.com . I still need to sort out the opening of my favorites stream that is at the bottom of my site though.

    • Posted November 22, 2009 at 8:58 pm | Permalink

      Excellent. Works a charm now. btw, how did you get your photos to appear at the bottom as well? I’ve tried checking my widgets and only see an option to have it on the right hand side

      • Posted November 22, 2009 at 9:03 pm | Permalink

        My theme has “sidebars” at the bottom as well, and so I just put an instance of Flickrpress in one of those. I have 6 sidebars all together in my theme, 3 on the right and 3 on the bottom. It all depends on how your theme is laid out.

  30. Posted December 1, 2009 at 10:25 am | Permalink

    Hi Michael, many thanks for the cool plug-in! Any idea how to remove the

  31. tags around the widget, please?