FMG Plugin
Flickr Mini Gallery - WP Plugin
IMPORTANT BUG FIX (lightbox not working)
Hi guys sorry to leave you alone for so long, I´m still in holidays and I´ve noticed that some of you are having problems with lightbox that is not opening. If you´re having this problem please download the last version and try again.
Also I´d like to say thanks to all of you who are helping the others to fix this bug. I´ll be back to work soon (1 month) and then I´ll put my hands on it again.
Description
Mini flickr gallery is a easy way to embed super flexible galeries from any flickr account or group, using different parameters to costumize it.
Installation
This plugin can be installed like all the other plugin. It requires no extra configuration except being activated.
- Extract the downloaded zip file to the
/wp-content/plugins/directory. You might also want to use OneClick Installer to automate this step. - In the Admin control panel, goes to the
Pluginspage and activate themini-flickr-galleryplugin. - Configure the plugin under the
Optionspage (Optional). - Start building your flickr galleries!
Usage guide
To get the photos this plugin uses the search API from flickr here are the parameters accepted:
note: you need at least one parameter
[miniflickr lang="pt" user_id="your_flickr_id'' tags="tag1,tag2" ...other parameters... ]Content for non javascript clients like RSS and email[/miniflickr]
lang(Optional)- This parameter only works if you’re using xLanguage plugin. And is the locale code like en, es, pt_br, en_gb.
user_id(Optional)- The NSID of the user who’s photo to search. If this parameter isn’t passed then everybody’s public photos will be searched.
tags(Optional)- A comma-delimited list of tags. Photos with one or more of the tags listed will be returned.
tag_mode(Optional)- Either ‘any’ for an OR combination of tags, or ‘all’ for an AND combination. Defaults to ‘any’ if not specified.
min_upload_date(Optional)- Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. The date should be in the form of a unix timestamp.
max_upload_date(Optional)- Maximum upload date. Photos with an upload date less than or equal to this value will be returned. The date should be in the form of a unix timestamp.
min_taken_date(Optional)- Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. The date should be in the form of a mysql datetime.
max_taken_date(Optional)- Maximum taken date. Photos with an taken date less than or equal to this value will be returned. The date should be in the form of a mysql datetime.
sort(Optional)- The order in which to sort returned photos. Deafults to date-posted-desc (unless you are doing a radial geo query, in which case the default sorting is by ascending distance from the point specified). The possible values are: date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, interestingness-asc, and relevance.
bbox(Optional)- A comma-delimited list of 4 values defining the Bounding Box of the area that will be searched.The 4 values represent the bottom-left corner of the box and the top-right corner, minimum_longitude, minimum_latitude, maximum_longitude, maximum_latitude.Longitude has a range of -180 to 180 , latitude of -90 to 90. Defaults to -180, -90, 180, 90 if not specified.Unlike standard photo queries, geo (or bounding box) queries will only return 250 results per page.Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against “parameterless searches” for queries without a geo componentA tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).
group_id(Optional)- The id of a group who’s pool to search. If specified, only matching photos posted to the group’s pool will be returned.
lat(Optional)- A valid latitude, in decimal format, for doing radial geo queries.Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against “parameterless searches” for queries without a geo component.A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters &emdash; If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).
lon(Optional)- A valid longitude, in decimal format, for doing radial geo queries.Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against “parameterless searches” for queries without a geo component.A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters &emdash; If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).
radius(Optional)- A valid radius used for geo queries, greater than zero and less than 20 miles (or 32 kilometers), for use with point-based geo queries. The default value is 5 (km).
radius_units(Optional)- The unit of measure when doing radial geo queries. Valid options are “mi” (miles) and “km” (kilometers). The default is “km”.
extras(Optional)- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are:
license,date_upload,date_taken,owner_name,icon_server,original_format,last_update,geo,tags,machine_tags,o_dims,views,media. per_page(Optional)- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.
*Detailed Flickr API
Examples
Gets photos from all the users with these tags
[miniflickr tags="travel, sunset, landscape"]
10 last images from my portfolio or shows the link if javascript is not enabled
[miniflickr user_id="56755410@N00" tags="portfolio" per_page="10" ] Portfolio[/miniflickr]
Gets photos from all the users with these tags
[miniflickr tags="poster" group_id="92076845@N00" per_page="5" ]
Features
RSS , Email and non javascript friendly
The plugin uses javascript to build the gallery but if the client (browser, email client, feeds reader) doesn’t support it there is an option to show plain html content instead
Internationalization
The plugin is compatible with xlanguage plugin, use the parameter lang if you need to show a gallery just in a specific language.
Download
flickr mini gallery.zip (updated29/01/09)
Support
Please if you find any bug or issue or have any suggestion please let me know. Leave a comment.
Donate
I spend lot of my spare time developing and supporting this plugin if it is useful for you please give me a hand.

On http://wordpress.org/extend/plugins/flickr-mini-gallery/ it states that this plugin works for WP version 2.0.2 ; however, I’m running version 2.3.3 and it won’t let me load the plugin as it calls for the shortcode() function. By any chance do you have an older version that works under WordPress version 2.3.3?
@Roamer
Sorry mate, my fault. I started writing the plugin for 2.0.2 but then I changed. No older versions sorry for the inconvenience.
By the way thanks to let me know I changed the information on wordpress repository as well.
I was looking into using your gallery and when I install it the lightbox stuff doesn’t work. It’s not my browser because I can see you demo fine but my installs… Any ideas?
Hello. Is there a way to paginate the results ? I guess I am missing something as there is a per_page option. Thanks for this plugin
I have the same problem as Dave Reid.
Any ideas?
greets, Colin
Fixed it! The address to the CSS seems to be wrong!
Very nice script!
Thnx!
Looks like this is a great plugin, but I am having the same problem with the lightbox as the Colin and Dave, but without a solution. Looks great in squares or thumbs, just no enlarged image - just follows the link. Any suggestions?
There are 2 problems with the actual files:
1. I miss the path to the css-file in the file flickr_mini_gallery.php”. If you use the plugin, you can only open the file. I have change the file at line 46. I put in there “echo ”;”.
2. If you us your plugin with some themes (like “Gunmetal” from http://www.sixshootermedia.com/), the next-button shows under the close button. I have change the file “jquery.lightbox-0.5.css” at line 60 from “width: 49%;” to “width: 48%”. So it works perfect.
P.S. A perfect an siply working plugin.
Greatings from Switzerland
Bernhard
Ok, here is what i figured out:
- The plugin works fine out of the box, but only shows the images and click throughs to flickr.
- The lightbox does not work, because the lightbox stylesheet is not included by the plugin. In the example it seems to be manually included:
/wp-content/plugins/flickr-mini-gallery/css/jquery.lightbox-0.5.css
- The second part that seems to be missing is the registering of the images to be handled by the lightbox. In the example this is done by including the js file “wp-content/themes/neoclassical/_js/gallery.js” This file seems to register the images with the light box, and to do some other stuff.
Is there a way the author (or someone who made this work) provides some step by step help in how to recreate the working example? or maybe even update the plugin?
it looks great, but the last mile seems too steep for me.
cheers
hi, i am having trouble uploading from flickr. I am running wordpress 2.6.
please help!
blake
Lighbox fix:
Open file flickr_mini_gallery.php
find:
add_action(’wp_head’, ‘jquery_lightbox_scripts’,5);
after add:
function lightbox_css() {
$path = ‘/wp-content/plugins/flickr-mini-gallery/css’;
wp_enqueue_style(’jquerylightboxcss’, $path.’/jquery.lightbox-0.5.css’, false, false, ’screen’);
wp_print_styles(array(’jquerylightboxcss’));
}
add_action(’wp_head’, ‘lightbox_css’);
Now initialize the right class
Open miniflickr.js
find:
.format_text
chage it with:
.post_content
this solution work fine for me
~cheers
@bartolli
i can’t find any .format_text on miniflicker.js are you sure about this?
@dimas
Sorry for the delayed answer ..
This classname is used by lightbox();
http://i.drun.net/view/id/7e8aefa5
~Cheers
You need to get Akismet up and running to cut back on the spam comments.
I have tried this plugin with 2.7 and it doesnt work. No obvious error messages but it just doesnt show anything. It shows the alternate text however.
Hi, I’m up and running on 2.7 but the lightbox won’t run - I noticed there’s a few comments trying to fix it but these solutions don’t seem to work either - any thoughts?
Hi,
It does not work. What may be the possible cause? Thanks!
Hey Guys,
Sorry for the biggest delay ever answering you here. I´m still in holidays (actually a long sabatic) but I took some minutes to update the plugin fixing the problem with lightbox so please download the last version here on this page and let me know if yuo have other problems.
Thanks so much for those helping to improve and solve the problems
Hi
I have installed and activated the plugin and then add [miniflickr tags=”st, albans, verulamium”] into my sidebar.php code (inside a div) but it just prints the text on the page. Am I missing something really stupid? Does it need php tags etc?
Thanks
Nigel
How do i disable the lightbox script off, it blocks my other “lightbox-2″ function.
Hello Felipe,
I have installed FMG Plugin.
I am facing a problem where on local server it shows the images form flickr but on the online server the images are not displaying.
Can you please let me know if any server setting needs to be changed?
–
Gaurav Malhotra
Wow Great plugi, thnaks I love it.
I only have a problem with the “tag_mode” option.
No matter what I do it only shows pictures the ALL option. So the 3 line below all give the same pictures return
[miniflickr user_id=”32776803@N08” tags=”baukje, dennis”] [/miniflickr]
[miniflickr user_id=”32776803@N08” tags=”baukje, dennis” tag_mode=”all” per_page=”80″] [/miniflickr]
[miniflickr user_id=”32776803@N08” tags=”baukje, dennis” tag_mode=”any” per_page=”80″] [/miniflickr]
Am I doing somting wrong?
Also I would like to use a gallery in my sidebar, is this posible and how?
Thanks,
Dennis
Can I use photo sets as well as tags from flickr?
Hey there, great plugin so far. Can you tell me if there is an update to use it into the single.php posting images based on the post tags?
Keep it up.
I wondered if there was a way to increase the number of images that the Flickr mini gallery shows. At the moment there seems to be a limit
is it possible to add the tag directly to a template file?
i solved the problem with adding it directly to the template file - my code:
name . ‘,’;
}
}
$flickrtags = get_the_title();
echo “”;
?>
Thank you very much for the great plugin!
As Markus, Nigel and Dennisnet, I also want to add the gallery in my sidebar.. Have anyone solved this?
sorry, the code was broken - i try it again?
$flickrtags = get_the_title();
echo “”;
if the code doesn´t work again here the way you can make it easy:
use the template tag to show your pictures, the open the post, look at the source-code of the post and you will see a div-tag - copy this div-tag to your sidebar and it will show your pictures everywhere!
kind regards,
markus
hello how can I do to create sets for photo albums?
[miniflickr user_id=”39267572@N03” sets=”72157619512171264”] [/miniflickr]????
Sorry but you can’t at the moment the photo.search on flickr API doesn’t have the capability of search photos from a set. But you can use tags and if you put the same tag for the images on a folder, you can do this as a batch process using flickr organizr, it will give what you after (I hope)
I figured out the Light Box problem. It is a combination of a JQuery conflict problem and the CSS file isn’t linked correctly in the flickr_mini_gallery.php file. The javascript conflict problem would explain why it worked for some and not others. Some have other plugins installed that are causing the conflict. Here is how I fixed it.
I just hard coded the style sheet in the flick_mini_gallery.php file. You will need to change the URL to your site. The code to change is located around line 45.
echo ”;
Here is where I found the fix for the miniflickr.js file. Notice the variable created using the noConflict(). This variable is then used throughout the script insted of $ to prevent confilcts with other js libraries. You can just replace the whole miniflickr.js file with this code.
http://pastie.org/pastes/559931/
It should work now. I hope this helps others.
BTW. Cool plugin. Thanks for developing it.
Brian
Thanks so much for this plugin, it is exactly what I need. I am having just one small problem. My thumbnail images are pushed up right next to each other with no space in between them. I can’t seem to find what file I need to add some kind of space or padding to the thumbnails. any assistance would be greatly appreciated
Thanks!
Is it possible to change the script so that the thumbnails link to the original photo page instead of opening the images in a Lightbox? I have had a look at the scripts but I’m not up with PHP coding, so if anybody can help out that would be most appreciate.
I was just introduced to your plugin and think what it does is really pretty cool. However I’d like to point out that by deregistering jQuery you are stomping on a lot of other people’s plugins (3 of mine for example) that enqueue jQuery using that WordPress standard method. I created a couple of hot fixes for myself that fix the problemy and thought I’d share them with you so that you can use the
wp_enqueue_script('jquery');method again.If you add these lines to your miniflickr.js file
At line 2 after initial comment:
jQuery(function($){—
Add at end of file:
});And replace the jquery_lightbox_scripts() function in flickr_mini_gallery.php with this:
//add jquery and lightbox
function jquery_lightbox_scripts(){
$path = '/wp-content/plugins/flickr-mini-gallery/js';
wp_enqueue_script('jquery');
$opts = mfg_get_options();
$format = $opts['mfg_thumbformat'];
echo '
var theblogurl ="'.get_bloginfo('url').'";
var flickr_mini_gallery_img_format ="'.$format.'";
';
echo '';
wp_enqueue_script('jquerylightbox', $path.'/jquery.lightbox-0.5.js', array('jquery'),'0.5');
wp_enqueue_script('miniflickr', $path.'/miniflickr.js', array('jquery'),'0.1');
}
Or you can download the altered files here: http://www.23systems.net/downloads/file/flickr-mini-gallery-jquery-hotfix.zip
To add padding between the photos add the following style element.
.felickr img, .flickr-mini-gallery img {
margin:0 5px 5px 0;
}
Then insert this code to add the gallery, changing the user_id and tags.
Hi. Great plugin - but the sorting is waaay out of order for me. It just displays all pics randomly. Any tips?
No not google, its the people. ,
Hello!
First of all – very nice plugin!
I have a few issues though. I was already using the jQuery lightbox on my site but when I activated the “flickr mini gallery” it stopped working.
The lightbox launches correctly and resizes properly but it gets stuck loading. Any idea what the problem might be?
I have already tried the solution Brian wrote (Brian on August 31st, 2009)
Thank you guys in advance. I would really appriciate the help!
Jakob
Hi guys,
Could anyone help me one more time on setting some padding between photos when the gallery is shown?
I can’t understand advice given in the post earlier.
Thanks in advance.
Marcin
@Marcin try this class on any css file :
.flickr-mini-gallery img {
margin:0 5px 5px 0;
}
thanx, this is awesome! Nice work!
For some reason, I can’t get this to work. I installed the plugin as per the instructions and activated it. I have tried using shortcode with varying attributes to test, and all I get is the shortcode displaying as text in the rendered page.
Ultimately I would love to use this in the page template file itself, but I can’t even get the php code to work.
This is my first experience w/ Wordpress and this plugin seems perfect for my project. Am I missing something?
Thanks in advance!
Chris
terrific plugin. Is their a way to increase the size of the images in the slideshow?
Nice plugin. works perfactly.
I had a problem with this plugin, but it turns out that the problem itself had nothing to do with this plugin. The problem was the Tabbed widgets plugin. When I deactivated it the flickrmini started working again. So try deactivating some of your other plugins.
Did anyone figure out how to change the size of the images? Great plugin.
Just what I needed! Thnx
Great plugin. Works so well. If anyone needs to get the unix time then head over to http://www.unixtimestamp.com/index.php and it will convert the time to unix time.
Cheers
does anyone having problems pulling photos from a flickr group? user_id is working fine but not the group_id. here is the error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2)
Timestamp: Wed, 27 Jan 2010 17:26:00 UTC
Message: ‘photos.photo’ is null or not an object
Line: 19
Char: 11
Code: 0
URI: http://www.modefan.com/wp-content/plugins/flickr-mini-gallery/js/miniflickr.js?ver=0.1
Message: Object doesn’t support this property or method
Line: 1
Char: 1
Code: 0
URI: http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=36c8b00c47e8934ff302dcad7775d0a2&tag_mode=all&user_id=1074275@N23&tags=poster&min_upload_date=&max_upload_date=&min_taken_date=&max_taken_date=&sort=&bbox=&safe_search=&content_type=&group_id=1074275@N23&lat=&lon=&radius_units=&per_page=5&format=json&jsoncallback=jsonp1264611873656&_=1264611874406