This is released under the GPL v.2.
The Flickr Thumbnail Photostream Wordpress plugin makes including and linking to photos on a Flickr account simple and flexible. The links come in the form of thumbnail images that link to their larger, normal formats within the Flickr website. The advantage of this plugin is that it does not use RSS feeds and uses the Flickr API instead.
This plugin requires the JSON and cURL PHP libraries to be installed.
The plugin has been tested with Wordpress 2.3.3 and 2.5.
Please download the zip file (20k) from the Wordpress plugin site
http://wordpress.org/extend/plugins/flickr-thumbnails-photostream/
All the main functions of control such as connecting to a Flickr account and storing information on the photo thumbnails, can be achieved through the “Flickr Control” front-end GUI in the Wordpress admin panel. Any changes in current Flickr photo information/status can be immediately updated by clicking on the “Update Photos” button.
Running the relevent Flickr API function calls can sometimes take between 2 & 3 minutes to fully execute. All information is stored in a cache file held locally, so that it minimise the chance of performance loss on web pages. The cache file can be located anywhere and can store up to 500 images at a time, so long as it is accessible and has the correct WRITE permissions.
If users wish to have regular/automatic updates of their photo information and status, then that is achievable through creating a crontab entry, or similar automation mechanism, to execute the supplied runScript.php file.
A CSS file is supplied to provide a starting point for displaying the thumbnails, but changes can be made to suit individual preference.
where do I create the data cache folder and how do I specify the path.. nothing seems to be working for me.
Hi Zach:
You’ll need to create a folder somewhere for the cache. The scripts will need to be able to write out the images in that folder. If you create it in the tmp folder in a linux install this may be something like:
/tmp/flickrcache
or if you are on shared hosting, it could be in your home directory:
/home/zach/htdocs/flickrcache
Make sure that directory has writable permissions by the webserver.
If you are still having problems, email me at kdorset AT plus DOT net and I’ll get James to help!
I am also having difficulty adding a cache folder. I have created a folder with permissions set at 777. But when adding trying to direct to the folder Flickr Control says it either does not have the permissions or it does not exist.
Hi kris:
Can you please check that you have specified the full path in the “Data Cache Folder Location” text box on the Flickr Control page, and in addition, make sure you don’t have a ‘/’ at the end of the path.
Hope this helps, if not, please come back here and give me a shout.
hi!
i think i have the same problem. i have tried a lot of different folders and every time i got an error report “This folder path does not exist! Your options have not been updated”. write permissions are set. it only works with the /tmp folder. but this folder doesn´t exist. an also when the folder exists, i don´t get the flickrdata.json. so updating photos is impossible.
can anyone help me please?
Hi, to all those with cache folder problems, try for the moment to store the cache file in the plugin folder itself ‘flickr-thumbnails-photostream’. That should work as a temporary fix whilst I carry out an investigation.
Sorry to all those who have experienced issues with this.
If you are running in php safe mode and/or have open_basedir restrictions in place, then you are probably limited as to where you can store the cache file.
I’ve just tried creating a new folder within the plugins folder, then giving it 777 permissions and it works fine:-
/plugins$ mkdir cache-test
/plugins$ chmod 777 cache-test
So it is probably something to do with your individual php settings, which you may not have permission to change if you are on shared hosting for example.
The solution to this is to store the cache file in the ‘flickr-thumbnails-photostream’ plugin folder (as mentioned above), with all the other downloaded files.
This should work as the ‘flickr-thumbnails-photostream’ plugin folder must be accessible for you to have got to the Flickr Control page in the first place.
A possible example of a full path on linux might be:-
/var/www/htdocs/wordpress/wp-content/plugins/flickr-thumbnails-photostream/
I really hope this helps and sorry again for the problems. We will work to put a fix in place and to document this issue in the next release version of the plugin.
I feel like such a dummy but I simply cannot figure this out! I have wordpress stored on my domain, http://maenad2.org
and the location I have given in Flickr Control is as you suggested: /flickr-thumbnails-photostream/
or in my case, /www/blog/wp-content/plugins/flickr-thumbnails-photostream/
I had no problem with changing the write permissions but Im not to sure how to see if I am running in php safe mode and/or have open_basedir restrictions in place. Sorry to be a bother, I just don’t know what I’m doing wrong? Thanks ![]()
Please don’t worry about it, this is really important feedback and if there are issues we need to know so we can fix them.
Even if you are running in php safe mode and/or using open_basedir restrictions, you should still be able to use the the Flickr plugin folder to store the cache file.
Try using:-
/www/blog/wp_content/plugins/flickr-thumbnails-photostream
without the ‘/’ on the end, because the plugin will put that ‘/’ in for you.
Is it still saying you don’t have the correct permissions or is it displaying a different error message?
When I put that for the location and press update options, I get this ‘This folder path does not exist! Your options have not been updated.’
If I press update photos it says, ‘The folder does not have writable permissions. Please change the folder permissions.’
Ok, can you try just putting a ‘.’ , so thats just a full stop in the folder text box, and double check that you have full write access to all users on on the ‘flickr-thumbnails-photostream’ folder. Then click the update options button again.
permissions on the ‘flickr-thumbnails-photostream’ are set at 777, did you mean to put the ‘.’ (period) like this, ‘/flickr-thumbnails-photostream.’ ?
with or with out it i am still getting that the folder path does not exist.
thanks again
Don’t have the / in the front. That means it is looking for it at the root of the filesystem. Just have `.` there.
I typed in simply a ‘.’ and it finally allowed my options to save, but not to update my photos. I tried out a few more folders and finally ‘/tmp’ worked! Thanks for all your help =)
You’re very welcome, I’m glad to hear it’s all up and running now.
Is there a way to adjust the thumbnail quality? They look a bit crappy!
hi, my problem is still the same.
i just can save the cache folder when it is called “/tmp”. no way with /flickr-thumbnails-photostream works. also not with the “.” in front.
but when i save the /tmp folder it doesn´t create the json library.
i have already created a tmp folder (with permissions) in every path but is also doesn´t matter.
Hi markus:
You should just put the FULL STOP ‘.’ in the text box on its own, nothing else is needed. Just putting a FULL STOP in there tells the plugin to store the json file in the same folder as is used by the plugin files.
Am I correct in thinking that using /tmp allows you save your options, but does not create a json file once you have updated your photos?
Hi James:
The plugin currently receives a “square” version of the photos from the Flickr api which is set at 75 pixels x 75 pixels, which we then reduce down to 50 pixels x 50 pixels using a CSS file, for our own needs. Please feel free to edit the CSS file called style.css and change the ‘.flickrImage img’ class to see if you can get better results. The two attributes you’ll need to change are ‘width: 50px;’ and ‘height: 50px;’. Just change the two ‘50′ values to the size you want, ensuring to keep the ‘px;’ on the end.
If you make any changes to the CSS file, be sure to save it, and then re-activate the plugin.
Hope this helps.
Thanks jtuck!
Hello,
does the plugin (I haven`t tested it yet) display random images of my flickr account or can I make it doing so?
Moin moin
Olaf
Hi Olaf:
Yes the plugin does display random thumbnails of images on your Flickr Account. You don’t need to do anything else to enable this.
Hello,
I have had great success all the way up to this post:
“Am I correct in thinking that using /tmp allows you save your options, but does not create a json file once you have updated your photos?”
This is where my installation gets stuck. Any advice would be appreciated!
You need to make sure that the user that your webserver is running as has permissions to create the file in that location. Try instead setting the directory to just . and setting write permissions to the ‘flickr-thumbnails-photostream’ folder so that your webserver user can write in there.
Does anyone know the piece of code I would put into my sidebar.php if I don’t want to use the widget? I don’t have widgets enabled on my current theme and would like to use just straight code. Thanks.
Yeah sure, try this:-
<?php
if(function_exists(’displayRandomFlickrPhotos’))
{
displayRandomFlickrPhotos();
}
?>
You may have to create some styling in CSS to make it appear just how you would like. If you do this make sure you put the <div> and/or <span> tags inside the if statement’s curly brackets. The opening and closing tags should then be placed either side of the ‘displayRandomFlickrPhotos();’ function call.
Alright thanks.
However, I noticed that I couldn’t get the .json to create either. I have set 777 permissions to the flickr-thumbnails-photostream folder, tried my fullpath, tried ‘tmp’ after creating that folder with 777 permissions and still wont create. I can get options to save for all of these, but I can’t get the .json to create. I tried just a . , but it gives me the permission error when I click update photos (unlike the rest which say Warning: The php json library is missing).
oooh. That might be your problem then! Sounds like you are missing a library or php cofigure line option. James will have more info on Tuesday.
Thanks Kelly- I have tried your suggestions but the .json library wont manifest. I am guessing I have to wait for the update that Eric is looking for. Again, thanks for all your help.
Hi Eric & Mindful:
It does indeed sound like you don’t have the php json library installed.
Would it be possible to for you both to specify what operating system and php version you are currently running so that we know how best to advise you.
You can use
php -v
at the command line to find out what version you are currently running.
Umm… I feel so dumb at the moment. I really thought I had it down. Then all of a sudden I get that little unholy message “Oops, the Flickr folders/files appears to be missing.”
And the more I read each & every comment…the more confused I get!
I feel like James Tuck should be holding my hand through the process while speaking slowly to me. lol
The issues surround how the application needs to cache out all your images to your filesystem to prevent it trying to download a million images from flickr everytime it runs.
Therefore, when you install the plugin, you need to be creating a location which it can write to for the cache file, and have the json library installed so that it can write json files.
hi. Thanks for plugin
perfect.
best regards
Hi Yaya:
That error message is presented when the plugin can’t find either the cache data folder, or the data cache file inside that folder.
I would advise you put /tmp (if you have not already done so) in the data cache folder location on the Flickr Control admin panel, and click on Update Options button. Then if that is successful, click on the Update Photos button.
Try that and let us know how you get on.
never worked, after I had to use just a “.” in the options now the .json file is not created so I can’t continue. I’ll try some other plugin.
Hi,
I’m just wondering if you guys might know that this error might be when I press the ‘Update Photos’ button:
Fatal error: Maximum execution time of 60 seconds exceeded in C:\Sites\Single19\kvoltage\webroot\wp-content\plugins\flickr-thumbnails-photostream\flickrInclude.php on line 27
Fatal error: Maximum execution time of 60 seconds exceeded in C:\Sites\Single19\kvoltage\webroot\wp-includes\wp-db.php on line 94
It seems to take a while and then these to messages show up.
Any help of pointers would be greatly appreciated.
Luis > Make sure you have json support in your version of PHP.
Ivan > Do you have loads of flickr photos? That sounds like something is killing the process while is going off and creating cached thumbnails of your photos. What is the script timeout setting in your PHP install?
@Kelly: Yes, I have quite a few photos. And I have a hosting provider. Don’t really know the time out from the providers intallation of PHP. Do you reckon that’s something I should ask them? How about if I want to show only the last 8 or 6 photos I uploaded?… Do I still need to run through my entire collections of pictures?
Thanks for you fast response! ![]()
I think the application grabs all your photos in your collection and caches them. If you’ve got loads, then this might mean the script times out while running. This is probably a bad design decision
James might be able to add a timeout override into the code, or change the way it grabs images. I’ll talk to him tomorrow.
Hi Ivan:
The Flickr api will only allow a maximum of 500 photos to be taken from any one account at any one time. The plugin finds out how many photos you have and then retrieves all of them up to 500. If you have a high number of photos coupled with a slow connection to the Flickr servers, it is possible for a timeout to occur. I will look into a way of easing or preventing this issue for future versions.
To answer your question about showing the last 6-8 photos:
The plugin currently works by grabbing all the info from all the photos in your account and then makes a random selection, which then displays on your web page, up to the amount you set in the admin panel. It was originally built to display a random selection of photos rather than specific selection. Think of it as an iPod Shuffle for photos.
Apologies if this wasn’t quite the functionality you were after.
Hi. This is a great app Thanks for the hardwork. Also looking forward to see what your Flickr widget looks like :-).
I like Ivan would also love the option of being able to view the latest photo’s in my stream, as well as a random selection. Would be great if this feature could be added.
Thanks again!
Thanks Jonathan
I’m sure that functionality can be included in the next version and we will be looking into it. In addition to this we may be revising the way in which the plugin stores the cache information to make the setup both quicker and easier.
Site Links
Related Sites
Community Apps
Here at PlusNet we're always trying to use clever open source things to make our lives easier. Sometimes we write our own and make other people's lives easier too!
About PlusNet
Winner of 9 out of 11 Categories in the 2008 USwitch survey. Winner of "Best Consumer ISP" at 2008 ISPA awards. Voted number 1 in the Broadband Choices 2008 survey.
© PlusNet plc All Rights Reserved. E&OE
Community Site News is powered by WordPress