I’ve amended the popular WordPress Plugin FlickrRSS to now incorporate the Flickr API facility. I originally did this so I could circumvent the Flickr RSS limit of calling no more than 20 flickr photos at a time.
Some folks had asked for the plugin so it’s currently a Beta Release. If you have any questions or feedback please get in touch below here or using the new support forum.
Limitations
So far the plugin only works using the API when searching groups and userids, but I plan to extend it to utilise other options.
Support
The plugin has only been in use since Feb 2010 and I’ve had a lot of feedback so for support purposes I’ve setup a forum. I’ll be monitoring it for any problems and will try to advise. Visit the forum here.
Kudos
The original authors of FlickRSS are Dave Kellam and Stefano Verna. Many thanks to them.
Plugin Instructions
1. Put the flickrAPI files into your plugins directory
2. If you want to cache images, create a directory and make it writable
3. Activate the plugin
4. Configure your settings via the panel in Options
5. Add `<?php get_flickrAPI(); ?>` somewhere in your templates
Advanced
The plugin also supports a number of parameters, allowing you to have multiple instances across your site.
1. `'type' => 'user'` - The type of Flickr images that you want to show. Possible values: 'user', 'favorite', 'set', 'group', 'public'
2. `'api' => ''` - Optional but the point of the plugin!
3. `'tags' => ''` - Optional: Can be used with type = 'user' or 'public', comma separated
4. `'set' => ''` - Optional: To be used with type = 'set'
5. `'id' => ''` - Optional: Your Group or User ID. To be used with type = 'user' or 'group'
6. `'do_cache' => false` - Enable the image cache
7. `'cache_sizes' => array('square')` - What are the image sizes we want to cache locally? Possible values: 'square', 'thumbnail', 'small', 'medium' or 'large'
8. `'cache_path' => ''` - Where the images are saved (server path)
9. `'cache_uri' => ''` - The URI associated to the cache path (web address)
10. `'num_items' => 4` - The number of images that you want to display
11. `'before_list' => ''` - The HTML to print before the list of images
12. `'html' => '<a href="%flickr_page%" title="%title%"><img src="%image_square%" alt="%title%"></a&>'` - the code to print out for each image. Meta tags available: %flickr_page%, %title%, %image_small%, %image_square%, %image_thumbnail%, %image_medium%
13. `'default_title' => "Untitled Flickr photo"` - the default title
14. `'after_list' => ''` - the HTML to print after the list of images
Example 1
get_flickrAPI(array('num_items' => 36,
'type' => 'group',
'tags' => '',
'id' => '12325216@N00',
'api' => '3370ecbd3e604245581eb4955fd6xxxx')); ?>
This would show the 36 most recent group photos
Example 2
get_flickrAPI(array('num_items' => 30,
'type' => 'user',
'tags' => '',
'id' => '10529805@N00',
'api' => '3370ecbd3e604245581eb4955fd6xxxx')); ?>
This would show the 30 most recent thumbnail sized photos from the specified user’s set.
Example 3
Here is my dashboard page setup which I use to show 24 of my latest photos from my own Flickr page. I then invoke them via the widgets. You can see the results in the sidebar.


















47 Comments
Is it possible to view random pictures?
Hi. Nice and simple plugin.
Is there a way I can get the photos to link to the .jpgs for a lightbox, rather than the flickr page that it's hosted on?
durrr. Got it … It was right there in the settings.
Again, great plugin. This is very light and flexible … good for those who want a bit of control …like including the lightbox of their choosing.
Now I can't seem to get the num_items parameter to show more than 19 pictures. If I set it to 1-19 it will show that amount I specify… anything more and it just continues to show 19.
Hi Steve,
Yes I think it is. I’m looking at this now and will add more examples to this page today.
Hi David,
Are you using the FlickrAPI settings screen in WordPress or using the direct call in a template page? If it’s a template page can you paste the code you are using (hiding the Flickr API key so no-one else can use it)
I use both methods on this site. In the Sidebar and on the Photo Diary page and both methods call over 20 photos.
Hi David,
Are you using the FlickrAPI settings screen in WordPress or using the direct call in a template page? If it's a template page can you paste the code you are using (hiding the Flickr API key so no-one else can use it)
I use both methods on this site. In the Sidebar and on the Photo Diary page and both methods post over 20 photos.
Hi Steve,
Yes it is. I'll put up more practical examples above and also include the code that I use which uses “Lightbox Plus”.
Thanks, Dave
yea, once again, I wasn't looking closely enough at some of the documentation. I was trying to display more than 20 items within a “set”. I realize now that you can only have more than 20 photos pulled (up to 50) when selecting “user” or “group”.
What I ended up doing was giving (batch) unique tags to my set photos and then using flickr api to pull the 50 pictures by “user” and “tag”.
no it dosn.t work form me …please help
in this code fragment something hapens
// if(!preg_match('<img src=”([^"]*)” [^/]*/>', $item['description'], $imgUrlMatches)) {
// continue;
// }
my ver of wp is 2.9.1 flickr username: dizag and i wont “flicker set” in WP but …!?!?!
ApiKey is 27b11599bd52d0c9e4d7588c26fa7e39 for example
Is there a way to have this plugin grab more than 50 images?
Thanks. Plugin works great, I use it with colorbox–a jquery lightbox plugin.
Hi Mark, One of the Flickr API rules is that you don't call more than 30 photos at a time on one page… however if you call more than 30 it does work. I'm a bit wary of changing the plugin to more than 50 at the moment. I'm trying to develop it to include pagination.
You could however simply edit the plugin… line 10 of flickrapi-settingspage.php … from 50 to whatever number you required. If you abuse it though the good folks at Flickr may disable your API key.
Hope that helps.
Not sure how you are trying to use the plugin. Can you explain what you've setup and any messages / errors you receive?
following instructions about installation:
in directory (/press/wp-content/plugins/flickrapi) have
flickrapi-settingspage.php
flickrapi.php
——————————-
flickrAPI Settings:
Display 6 || set
api key ***********************7e39
User ID 44499020@N03
Set ID 72157622789433256
Item HTML:
<img src=”%image_square%” alt=”%title%”/>
————————————————-
in (index.php)
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
get_header(); ?>
<?php get_flickrAPI(); ?>
….
there haven't any msg or err!!
Can you try and use the FlickrAPI in a Widget first to ensure that it is working?
Also, when you call the from a template try and call it with some variables to see if it works.
i.e.
get_flickrAPI(array(‘num_items’ => 6,
‘type’ => ‘user’,
‘tags’ => ”,
‘id’ => ‘44499020@N03′,
‘api’ => ‘***********************7e39’)); ?>
Note that when we use a userid and set that the API is not invoked because Flickr doesn't allow those searches yet. It simply will pull back the latest 20 photos. This is something I'm investigating and may have a solution soon, but im the meantime you can always tag your own photos and search them using the tag option.
tnx for reply …
but still nothing with err silence
(i try both of them …)
if you want a help email me
)
yeah, displaying group photos doesn't work.
I've got it working in my sidebar. What problems are you having. Version 0.4 will be released today with a debug option so you might wanna hold on for that
It's almost working! I deactivated it and then reactivated it and now it's displaying 6 photos, but i've set it to display 18. Love the widget though, man…can't wait till it's all dialed in. It's at the bottom: ohhburn.com
what's happening is that the widget is only showing the photos we uploaded to the group. we want to display all the photos in the group uploaded not only by us but by everyone. is that possible?
I see the group http://www.flickr.com/groups/stuffstonerslike/p... and that has 7 photos in it and that's all I can see. Is there a link where we see all the group?
I see all the group now.. Has this just been setup because it can take Flickr some time to update all the feeds. It's not an instant process. Up to an hour sometimes.
it's been a few days. hrm. any suggestions?
once it does start to work, man, it's going to really killer!
I noticed that the main page now has 11 photos but the feed still returned 7. I think patience will sort it out. If there's no improvement by tomorrow I'll investigate further, but I use the Flickr Group “Dundee” in the sidebar and all the pool pictures eventually show.
thanks for checking it out, man. patience is a tough one…but we'll wait it out. thanks for taking the time to help! we didn't expect it and TOTALLY appreciate it!
Ok .. I investigated a bit. It's a common group problem. Check out Flickr Forum post http://www.flickr.com/help/forum/82334/?search=... and also http://www.flickr.com/help/tags/#2855. Looks like a review and some time will fix it all
)
Fantastic plugin. I have just one question though:
When I try to use %image_large% I get a FickR broken link message, whereas %image_medium% works fine.
Is this to do with a limitation in the account? IE if you have a Pro account you'll be able to access the large images, but otherwise you won't?
Have people successfully loaded large images from a basic Flickr account?
Thanks
James
i get the same issue on the image_large. any resolution here? i have a pro account and its not working.
tim
How to make a little distance between the images? like a 5px border?
You need to use a bit of CSS. I’m going to put an example up today which shows you what I’ve done for my Sidebar.
Thanks, Dave
I had a look at the %image_large% problems and it looks like Flickr don’t support this now.
I’ll be removing it from the next upgrade.
Is there a way to set it up so that you can use more than one FlickrAPI widget (say on multiple sidebars)? That is, in the theme I use, Grid Focus, on my blog, there are a few sidebars. A Primary-Main, Primary-Post and Secondary-Shared. I like to have my Flickr photos on the “Primary” or middle sidebar, under my Twitter, brought in by Lifestream.
Now, Lifestream’s widget has the ability to be placed in multiple sidebars…somehow. Is there a way to do that with FlickrAPI? (I’m currently using two different widgets to do this.)
Hi Matt,
Not at the moment. The only thing you could do (and which I do) is hardcode a php call into the theme. So for instance I use the widget in my sidebar, but on the “Karate Ghost” page I use a template which calls the FlickrAPI using the PHP code.
It’s certainly a good idea that I can try to implement into the next version.
The field to input my user id is not shown in my plugin installation. Could you kindly help me?
Felipe : can you screen grab for me and post it somewhere? ta.
Any update on posting the CSS example to put some space between the images?
Nevermind, I figured it out. I took a look at your style sheet, hope that’s OK. Thanks!
No problem Lori. If you use Firefox as you browser there’s an addon by Chris Pendrick called “Web Developer” which is awesome for seeing and changing CSS. Just Google for it.
Very nice plugin!
I do have one question though: Is it possible to show a random picture from within a set in the sidebar widget? Right now the widget automatically shows the last photo when I set the display to 1. I noticed Steve’s question and your reply on top, just couldn’t find the example.
I’ve not looked at this for a while Marloes… but am back to looking at it. Will try to update this feature in the latest version.
Is there an easy way of getting images but not displaying them immediately.
What I weant to do is
1) Fetch but not display
get_flickrAPI(array(‘num_items’ => 20,
… other params set as required
2) Then step through the array one at a time outputting them the way I want
e.g. with a line break after every third (or whatever) item
Basically I want to be able to do more than appears to be possible with ‘html’ => which acts on very image.
Hi Steve,
I’m currently writing something pretty similar to what you’re looking for. It’ll cache an xml file of results and then read through the xml file creating an array to then manipulate.
If you can wait a week or two I might create a separate plugin.
This Plugin is not working for me, can you help me out, please? Nothing shows up. When I tell the plugin to show the titles, that works…..but sadly, no images.
How are you using the plugin Carl? Need some details to check it out… Thanks, Dave
3 Trackbacks
[...] FlickrAPI – Easily display Flickr photos by set, user, favorite, group and public streams. [...]
[...] just below the header. For the integration and presentation I used a slightly modified version of FlickrAPI to fetch my photostream from Flickr and JQuery/Lightbox for the nifty popup. I also got rid of the [...]
[...] Solar Polar » FlickrAPI (tags: flickr plugins wordpress) 0Related PostsWalk on water [...]