Flickr Integration only applies to FigPro and there are a couple limitations:
- The maximum amount of pictures that can be shown in a flickr gallery through fig is 500.
- The default size that fig loads from flickr is the medium picture size (500 on longest side). This can be changed as will be explained below. The problem is
that flickr will not make a medium size picture if the original picture does not exceed 500 on the longest side. If your picture does not exceed these dimensions when uploaded to flickr, it will not make that size and therefore Fig cannot load it. Instead it
will load a blank flickr image. An example is that you upload a picture that is 300 X 450 to flickr. Flickr will not create a medium size picture for this image as it does not
exceed 500 on it's longest side. When you go to view this picture in Fig it will show the thumbnail but when it is clicked, it will show a blank image. I think most people upload
larger sized pictures to flickr so this should not be a big problem.
Step 1: Flickr API Key & Cache Folder
Go to http://www.flickr.com/services/apps/create/apply/ and apply for a non-commercial flickr api key to display your
Once you have received your API key, edit the config.php file to include your flickr information.
Create a folder called "cache" in your fig folder with permissions set to 777. This will cache flickr images and reduce API calls.
Step 2: Test Flickr Photostream
Make a new folder in the "data" folder with any name you would like and put a blank file in it with the name "flickr.php". Your file structure should look similiar
Now open Fig in your browser and you should see a new gallery in your navigation with the name of the folder you created above. When you click on it, it should display the last
100 images from your flickr photostream.
Step 3: Edit Flickr.php
You can add the following settings to the flickr.php file to change what is displayed (cut and paste this):
$photoset_id = " ";
$return = 100;
$size = "thumbnail";
- photoset_id - Add your flickr photoset id that you would like to show here. If this variable is set your photostream will not show for this gallery.
- return - A number from 1 to 500 for the number of images to show from your photostream or photoset. Flickr does not allow you to retrieve more than 500 pictures at a time.
- size - Size of the thumbnail images for your gallery. Can be set to the following:
- square - 75 by 75
- thumbnail - 100 on longest side
- small - 240 on longest side
Step 4: Add More
You can add as many flickr photosets as you would like to Fig. You can also have your photostream load automatically when Fig loads by setting the following flashVar in the HTML:
<param name="flashvars" value="defaultGallery=data/my_photostream" />
One More Thing
By default Fig will load the medium sized image for each photo in your flickr gallery. If you would like to load the large image from flickr (1024 on largest side) you can edit
the "flickr_photo.php" file in the fig folder on the following line:
$photoUrl = $f->buildPhotoURL($photo, "medium");
to the following:
$photoUrl = $f->buildPhotoURL($photo, "large");
Beware that any images uploaded to flickr that are smaller than 1024 on their largest side will not have a large image and Fig will load a blank flickr image in that case.