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
Tagged , , . Bookmark the permalink. Both comments and trackbacks are currently closed.

276 Comments

  1. Posted July 26, 2011 at 8:43 pm | Permalink

    Hi,

    I installed your plugin into the footer of my website (www.laurengondert.com), and all of my photos are showing up, but there is a lot of extra white space around them and they are not centered. I want it to look like it does on this site: http://themes.iki-bir.com/peano/

    When I try the different view options (view as square thumbnails, view as proportional thumbnails, view as large thumbnails) they all look exactly the same.

    How do I fix this?

    Thanks,

    Lauren

  2. Stuart
    Posted August 10, 2011 at 11:15 pm | Permalink

    Hi great plug-in the only problem is when I tick the ‘random’ box it doesn’t make them random. After clicking save the tick box next to random is removed automatically?

  3. Posted August 18, 2011 at 2:58 pm | Permalink

    Can’t seem to get the tag field to only display photos with 2 tags… e.g. Food, USA – seems like it is displaying photos with either tag. Is there a way to have it only show Food and USA.

    • Posted August 18, 2011 at 8:48 pm | Permalink

      Hi Christopher – I’m afraid Flickr doesn’t currently support this kind of query, to my knowledge (and I haven’t currently written a workaround to make it happen via the plugin)

  4. Posted September 5, 2011 at 8:26 pm | Permalink

    Hey there, I am putting together this website for a guy who will be running across the US in an attempt to break the world record.. Anyways.. They are using Flickr to upload images from the road and I have found that your plugin is the best option for making a wordpress gallery out of the flickr feed.

    I have ONE problem.. If they upload a video to their stream it displays like a photo. I am using prettyphoto and that supports videos in a lightbox (I had to change your code accordingly to make rel=wp-prettyPhoto”) but it just opens a box with the still from the video..

    Any thoughts on supporting Flickr videos OR simply not adding them to the query?

    • Posted September 6, 2011 at 12:08 pm | Permalink

      Hi Lindsay – I only had a quick peek at it, as I’m flat out with some other stuff, but it looks like you can specify a “media” parameter for the photos_search query – it depends on how you’ve set up the plugin, but if you’re using the photosteam, then you should be able to open includes/interface.php, line 266, and change:

                      $results = $flickr->photos_search(array('user_id' => $accountId, 'tags' => $options['tags'], 'per_page' => 500, 'page' => $page++));

      to

                      $results = $flickr->photos_search(array('user_id' => $accountId, 'tags' => $options['tags'], 'per_page' => 500, 'page' => $page++, 'media' => 'photos'));

      You could probably set it up to display video properly too, but it would take some programming experience to do, and I don’t have the resources to do it myself, I’m afraid.

      Best of luck!

  5. Posted September 5, 2011 at 8:36 pm | Permalink

    Ohh I got one more suggestion.. If you can make the option to display the flickr caption that would be great as well! but thats for another time.

  6. Posted September 6, 2011 at 4:18 pm | Permalink

    Michael – thank you soo much for your quick reply. If i have time in the coming weeks I’ll see if I can work out how to get the videos working as well – but the solution to show only images works perfectly for me.

    I dont currently know a lot about the flickr API but I am learning! THanks

    • Posted September 6, 2011 at 4:25 pm | Permalink

      No worries, Lindsay – glad to hear it worked straight off the bat! ’tis a start.

      • Posted September 6, 2011 at 4:32 pm | Permalink

        Yours was the first and only one I tried that just “worked”

  7. Posted September 10, 2011 at 9:19 pm | Permalink

    This plugin is great and does almost everything I need it to do except for one thing… How do I change the layout from 2 to 3 columns in my footer section? I’m currently running two widgets in that section of the footer for example purposes. “Gallery” has the right layout 3X3 but “Flickrpress” just won’t do it. Help.

    • Posted September 11, 2011 at 9:34 am | Permalink

      Hi Eric,

      You’ll need to get in and style it, if it’s not taking the dimensions you’re after – either increase the width, or decrease the margins/padding.

  8. Posted October 27, 2011 at 9:50 am | Permalink

    I think I must be thick but…. I have downloaded the plugin, I have got my WPI key and secret amd put it in the right fields and saved it. Great, all going well so far. Do I need to enter any of the other fields If so, I have not a clue what to put in them.

    My main problem is ….. how on earth do I get the thing to appear in the side bar or footer or wherever. I go to widgets and it’s not there (probably because it’s a plugin not a widget).

    Maybe there’s another thick person out there who also cannot do this final thing… or maybe I’m the only one!

  9. Posted October 31, 2011 at 1:47 am | Permalink

    Anyone there? I still have this problem. I’m stuck in the back of beyond in China and need some assistance. Thanks

    • Posted November 4, 2011 at 6:12 pm | Permalink

      Hi Sian,

      The widget should definitely be showing up in your “Widgets” section – if it’s not, I’m afraid I don’t have a clue why. Is the plugin definitely enabled? What WP version are you using?

  10. Posted November 23, 2011 at 6:49 pm | Permalink

    Hi, I love the plug-in but am wondering how to make the photo link open up in a new window. As of now the photos show up great but when people click the photos, the flick link opens up on the website. This make things difficult for visitors to find their way back to the web site.

    Thanks!

  11. Posted November 30, 2011 at 2:26 am | Permalink

    Hi,

    Could you please check out the weird output this plugin, which I’ve used successfully on a lot of other sites (it’s great!), is putting out? http://hdcustoms.com/gallery/

    This new site’s only new variable is the starkers/roots base wordpress code…which is probably throwing in some extra weird css…but I can’t figure out whats going on….

    Thanks in advance! I hope you have seen this before and have some sort of a solution…

    Ray

  12. Posted December 20, 2011 at 4:22 pm | Permalink

    Thanks for making this plugin available.

    I set everthing up on the settings / FlickrPress page in Word Press and I changed the callback URL in AppGarden to (mydomain)/wp-content/plugins/wp-flickr-press/flickr_oauth_callback.php

    When I use the Flickr icon in WordPress to add a picture, I get a new window with “USER ID is required. Please setting USER ID”

    In the OAuth Token section of FlickPress plugin config page, there are field labels for USERID, USERNAME and TOKEN but no way to enter information into the non-existent fields next to theem.

    Thanks for your heelp

    • Posted December 23, 2011 at 9:58 am | Permalink

      Hi Matthew,

      Hmm. It looks like another plugin developer has nicked Flickrpress’s name. I don’t recognise that path. It’s not Flickpress you’re using, I’m afraid =)

  13. Posted January 11, 2012 at 4:49 pm | Permalink

    Lightbox is discontinued. Can you add FancyBox support?

  14. Posted January 18, 2012 at 3:41 am | Permalink

    I am getting “Flickr is currently unavailable” for one API/account but for another it works.

    I get no errors in the log, and when I echo errors I get ‘1’.

    The API code and Account ID are correct (I even deleted the App and made another). The only difference between accounts is the one that doesn’t work is a PRO account.

    Do you have any ideas why I get this message?

    • Posted January 27, 2012 at 10:43 am | Permalink

      @Brett, got exacly the same problem, got the “Flickr is currently unavailable” message for my PRO account, also only when I try to access sets, the normal RSS works perfect, when I log the errors (changing line 84 in interface.php) I get this:

      wp-content/plugins/flickrpress/includes/interface.php:84 (flickrpress_load_items()): Couldn’t get account: User not found

      but I’m pretty sure I’m entering all the details correctly, is this a pro setting or something?

      • Brett
        Posted January 28, 2012 at 12:53 am | Permalink

        I found this website solved my problem: http://idgettr.com/

        Seems like you need to use your account ID, not the alias. After getting the ID it all worked fine for me.

        • Pshemko
          Posted April 22, 2012 at 12:00 pm | Permalink

          I’ve replaced the alias for account ID, but I’m getting the same error. Any more ideas? Thanks.

  15. David
    Posted April 7, 2012 at 4:54 pm | Permalink

    please Michael, is there a way to make clicking the flickr thumbnail open the image in a new window? thanks!

  16. Joel
    Posted May 2, 2012 at 11:33 pm | Permalink

    When I do the process to get the error from interface.php The error reads:

    content/plugins/flickrpress/includes/interface.php:190 (flickrpress_load_items_rss()): RSS load of feed://api.flickr.com/services/feeds/photos_public.gne?id=57968316@N07&lang=en-us&format=rss_200 failed

    What do I change to fix this? Is it doing this because I have a pro Flickr Account?

  17. Pshemko
    Posted May 21, 2012 at 7:46 pm | Permalink

    I stopped working at all. Even RSS. I think Flickr changed it’s API.

  18. Posted December 3, 2012 at 12:11 am | Permalink

    hi Michael,

    I like your plugin although I realize it has been published for some time. I have it working on my blog but was wondering if the picture that is displayed can be made larger? Also I don’t want to include a title but as you can see, when I don’t do this it is vertically uneven with the box on the left (I tried empty spaces but this didn’t work). I am not very well versed in PHP…

    Thanks…Marten

    • Posted December 3, 2012 at 12:12 am | Permalink

      that title comment you can’t help of course…….combining plugins becomes confusing :)

  19. Posted December 13, 2012 at 11:38 pm | Permalink

    In the last two utilizations of this plugin for my own site and a clients…there is a weird IE issue ( I know…go figure). Works great in real browsers.

    In IE the thumbnails show up as skinny white bars…a bar for each thumbnail…but no pic, just a series of skinny vertical rectangles.

    I’m using responsive css media queries on both sites…could be the issue.

    But any guidance would help tremendously guys. :)

    Sites where its happening for reference:

    1. purplemountainjewelry.com
    2. varsitypixels.com

    Thanks in advance guys,

    Aaron

  20. Posted January 5, 2013 at 4:18 pm | Permalink

    http://www.doremifasol.org/news/2013/01/05/finale-dieci-dita-2-03012013/

    Thanks for this plugin I use in the footer of my site

    Is possible open the foto to 1024×768 and give a navigation mode for the gallery? Now i open one foto for time.

    Sorry for my english