J-Flickr provides shortcode (e.g. [flickr key=”value”]) syntax access to the Flickr API.
|Author:||John Noel (profile at wordpress.org)|
|WordPress version required:||2.5|
|WordPress version tested:||2.9.2|
|Added to WordPress repository:||29-04-2009|
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Click to start download
J-Flickr is designed to be as unintrusive as possible in giving you access to the Flickr API service. This means that you are not limited to the methods you can call or hamstrung by the output of the plugin. If you want to search for photos with an Attribution License uploaded last year then you can, just as you can get a list of your public contacts or talk to the Flickr Pandas. Essentially you construct the shortcode as if making an API call and then either use one of the existing general templates or make your own! The templates are in XSL and operate directly on the XML sent back from Flickr so you're never wanting for data that other plugins may not expose.
Can I use method x?
You can use any method of the Flickr API that doesn’t require authentication. Some methods make more sense than others to use, if a method doesn’t return any output then you’re using the plugin for the wrong thing.
How do I define my own templates?
There is a ‘templates’ directory within the plugin directory that contains a selection of XSL templates. The included ones are for the (what I would imagine) are the most used result sets but making your own is as easy as creating a valid XSL template and dropping it and then using it (see the Examples section).
If you wish for a certain method to always use a certain template just name the template after the method sans the ‘flickr.’ prefix, e.g. for the method ‘interestingness.getList’ name your file ‘interestingness.getList.xsl’. Case sensitivity will be based on your hosts file system.
What is the template priority?
If you define a template in the shortcode this will be used before all others, if one is not defined or the file does not exist then the plugin will search for a method template, if that doesn’t exist it will fallback to the general templates. The ‘photos.xsl’ template is the standard and should not be deleted.
What is the cache for?
The cache exists to be friendly to Flickr, they’ve been awesome enough to provide a solid API so you should be friendly back to them by not hammering the service. Essentially every shortcode instance you put in your blog is an API call, if the cash didn’t exist then every request for a page with the shortcode would be an API request. So say you have 5 front page posts each with one shortcode instance, if 1000 visited in a day, thats 5000 API requests just for the homepage.
You are responsible for managing the number of connections and queries to the Flickr API
What is a good cache time?
I’ve set the default to be 1 day as that’s plenty of time between requests. The higher the value the better really, so if you only update your Flickr account at weekends then feel free to set it to 5 days (432,000 seconds) or longer.