Flickrpress 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:
Download
Download Flickrpress at the WordPress site.
If you like Flickrpress, please consider buying one of my products.
Installation
- Unzip the package, and upload
flickrpress
to the/wp-content/plugins/
directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- 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 changeerror_log
on line 22 toecho
– 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
48 Comments
Hi I went to get this via the link but it's an FYI at wordpress.org:( Great thing you have offered here:) Cheers Lee
Nice plugin. However, I'd like to just show one photograph; when I changed the settings to '1', I receive this error message from the plugin: Warning: Invalid argument supplied for foreach() in /home/tworedbo/public_html/blog/wp-content/plugins/flickrpress/includes/interface.php on line 125 I don't know anything about coding – can you help please?
Ah, thanks for letting me know! I hadn't tested for that. Version 0.1.1, just released, will fix it
Thank you :)
Brilliant:)
Works great, thank you
Thanks for the fun plugin! Only problem I am having is when I choose the Display Random option, no pictures appear. If I uncheck it, it works fine. You can see it here – http://5yrplan.com/category/blog/
Thanks for the feedback! To help me chase down the bug: When this happens, what other settings are you using? RSS, photostream, photosets, or favourites? (Wow, that's a beautiful WordPress theme..)
I can only use Favorite Photos currently, as I don’t have any personal photos up on Flickr. So that’s what it’s set on.
Ahh yes, I see the problem – Please upgrade to 0.2.1 and let me know how it goes.
It’s now working perfectly. Thanks for the quick response! Great plugin!
Hi, I can’t get the plugin to display my photos. Do I have to get a new API key (as opposed to the one I already have?). I’ve messed with all the settings, and can’t get anything to show. You can see it on my home-page – http://www.andreachristensen.com. THANKS!
Hi Andrea – your existing API key should certainly work. Try updating to 0.2.1 (there was a bug in 0.2 that stopped random favourites from working). If it still doesn’t work for you, let me know what your configuration is (RSS, photostream, photosets or favourites, and random or not) and I’ll see if I can get to the bottom of it.
I am updated to 2.1. I also have unactivated Flickr Photo Album, another flickr plugin that I would like to use, but deactivated to see if that was the problem. It’s still not working. My configuration is this:
Title: Flickr Display: Photos from Photosets Flickr API: My API KEY Account Name/email: My email Photosets: Spring, (I originally had my photoset called ‘Apr – Jun 2009’ but changed it to ‘Spring’ to see if there was a problem with the spaces or dash in the title. That didn’t solve it either) Number of thumbnails: 4 Display Random: UNCHECKED View as Square Thumbnails: CHECKED Use Lightbox, etc.: CHECKED Add CSS Styling: CHECKED
Email me and I’ll give you access to my wordpress back-end, and you can take a look yourself if you think that will help.
Thanks, Andrea
Hi again! Have you tried displaying just your photostream, to see if that works? If it does work, there may be problems with finding the photosets.
See my comment at the bottom of the page in response to Christopher for info on how to get at any messages coming from the plugin, and let me know if there’s anything showing up.
Cheers!
I think I must be missing a brain cell or two. I activate the plugin, it shows as activated… and then what? I don’t see anywhere to configure the plugin. For example, the stuff in screenshots 1 and 2, where are those configuration panels? My other plugins have configuration panels in the WP settings area, but there doesn’t appear to be one for flickrpress even though the plugin is showing as activated. Am I doing something wrong?
Hi Melissa – you will need to go into ‘Appearance’ and ‘Widgets’, then click ‘Add’ beside the ‘Flickrpress’ widget to add it to your sidebar. For more information, see the WordPress documentation on widgets
Aaaaaaaaah, thank you. Oh man, this plugin is excellent. Way better than… well, let’s just say way better than its competitors. I’ll be unveiling it this weekend when I take my new blog layout live.
I just added the plugin love it. I am wondering howcome your thumbnails are so small. I would like to make mine also small. Right now they are little big. Also a new feature would be to show few pics but once someone clicks on it the lightbox open and clicking next on it gets more pics from flickr. Right now it just shows you those 4-5 pics which you are displaying on the website. thanks.
Hi Gaurav,
I’ve styled the thumbnails in my sidebar with some css (see my personal page, and the style.css within the plugin folder for another way to style them even more, with a custom frame)
The css I’m using in particular is:
.flickrpress-container { overflow: none; }
.flickrpress-container div { float: none; display: inline-block; margin: 2px; }
.flickrpress-container img { width: 42px; }
My style.css file is inactive and I cannot figure out ho to activate it. Also, any tricks to getting lightbox to work? I’m new to this and installed Lightbox2, but photos still open to a new page away from blog (i.e. no lightbox window). Also curious how you embed photos in your posts on your personal page to look the way yours do. Cool stuff. Thanks.
Using WPMu 2.7.1 this widget works wonderfully for services using API, but when I use rss it displays this error in place of the photos in the sidebar:
Warning: Invalid argument supplied for foreach() in /home/mydirectory/public_html/wp-content/plugins/flickrpress/flickr.php on line 74
D’oh. Sounds like there’s either a problem with the RSS feed, or a problem with WordPress’s RSS feed loader (maybe).
Do you have access to your web server’s error log? If so, that’s where errors from the plugin are reported. If not, you can force the plugin to output errors to the screen by opening up
interface.php
, and changing the wordserror_log
toecho
on line 22.If you still don’t see anything, let me know, and also let me know the RSS address you’re using.
Hi Michael! I like your WordPress plugin, but I have a problem. When I click on a thumbnail, lightbox doesn’t work and I have selected it on widget’s page. I use WordPress 2.7.1 in spanish, I hope you can help me.
Thank you! :)
PD: http://www.cbusquets.com/blog
Hi C,
It looks like lightbox just isn’t working on your site – I don’t know how to fix it though, I suggest you ask on the WP forums.
I love your plug-in. I am using it as a sidebar widget on my WordPress page to display random images from a Flickr portfolio set.
I have the lightbox option disabled so clicking a thumbnail opens the photo’s Flickr page. Is there an easy way to make that page load in a new window?
Also, is there a way to make only one photo display on each line? In a listing of four photos, proportional thumbnails in landscape orientation display fine, but back-to-back portrait thumbnails display two on a line.
It would be nice to specify the width of each photo displayed so the column edges of landscape and portrait orientations align, but perhaps I’m making too many requests. Thank you for a great plug-in.
Hello again. I am researching my own questions but still appreciate your input. The Lightbox 2 widget provided the page overlay functionality I was looking for (I wasn’t familiar with Lightbox until now).
I am looking through the plugin code to find where image size/display is specified. Any pointers on where to change width are welcome. Thanks.
Sorry, I did not notice your reply to Gaurav until after my post. That CSS with minor adjustments works great for displaying a vertical strip of photos. For anyone making rectangles instead of squares, the only recommendation I would add is to change the display option from proportional to large, then downsize from there.
Hi Michael. Tested a few of these plugins and arrived at yours and it is working so far. Thanks. I was just wondering where i would go to remove the ‘Flickr’ heading that appears. I can’t seem to find it in your code.
Thanks
To get rid of the gallery heading it appears I have to put a space for the name of the gallery or remove the title with css, as if i enter nothing for the title it breaks.
No Problem just good to work out how to do it
Hi Michael, thanks for this nice plugin. I use it to show my favorite collections. The lightbox does not work in my blog so I try to uncheck that option. After that, it links that picture under my photostream but not the original author. Could you check the code to fix it?
Wooo, this is a fantastic plugin. One issue I can’t solve on my own yet… I’d like to display a single, random SQUARE thumbnail (using rss feed) at a size of 200×200.
I saw the css trick you detailed previously, but that only seems to resize-up an already shrunken photo, so I’m left with a highly-artifacted, blurry 200×200 pic.
Where do I edit to get a 200×200 cropped single thumbnail?
Actually, Flickr doesn’t have support for that image size. Instead, you’ll probably want to select the ‘medium’ image size (or something), then use CSS to define a 200×200 box in which it sits. Maybe something like
`.flickr_item { width: 200px; height: 200px; overflow: hidden; }’
Hello Michael,
ive installed your plugin, however, Im having an issue displaying the photosets. I have separated them by commas, and have added the appropriate number of thumbnails, but it seems to be only grabbing from the first photoset in the list.
Please advise what may be the error. Thanks in advance!
This just won’t work for me at all. :(
API gets nothing displayed at all – no matter what the settings.
RSS results in an error: Warning: Invalid argument supplied for foreach() in /home/domainname/public_html/wp-content/plugins/flickrpress/flickr.php on line 74
can I manually include the widget, as an example in a static php-footer-page, without using the dynamic widget configuration? how? thx for your help!
can I manually include the widget, as an example in a static php-footer-page, without using the dynamic widget configuration? how? thx for your help! sorry, forgot to check the notifiy-button …
thx for the plugin, i’m trying to use this one instead, anyway is it valid XHTML?
I’d love to use this for the random image wonderness, but currently, when I enter comma separated tags, (ie “flowers, yellow, bee”) it is pulling a random photo with any of the tags rather than all of the tags.
Any chance that there will be support of pulling photos that must include all tags selected?
Hi great plugin thank you..
Same question as “Matt” !!
How can I include the plugin manually ? As I don’t use widget side bar.
Thanks
Hi Michael, This plugin is fantastic…one small issue. I’m the admin for my Flickr group. I use the RSS feed flavor of your plugin on my site to display photos submitted to the group…only problem is, it won’t display any photo that I submit, even though that photo is showing up as part of the group pool….any ideas? Thanks!
Hah! Well, never mind…after 30 minutes, the photo just showed up! Later :-)
How can I put the plugin in my template?
Please could you tell me how it is possible to display the small thumnails in the sidebar like on your page? They are appearing fairly large and on 2 rows when displaying 4.
On my site it’s simply a function of the widget options. I have the box filled out with the number of photos I want to display at “8” and the widget takes care of the rest. May be a function of my rail width also.
This plugin is not working for me… it did originally but then I switched my API. It will not work with the new API key, even though I have triple-checked all of the settings (on WordPress and on Flickr).
Hi Michael
Great widget – but so far the lightbox functionality isn’t working. Do I need to install “lightbox” for WordPress first?
Thanks John
Thank you for the great widget! Saved me a lot of time.