updated flickr gallery wordpress plug-in
Well, it seems there’s some interest (at least from fellow Dreamhosters) in my updates to the PHP flickr gallery plug-in for WordPress. Basically, all I did was replace the remote fopen() calls with libcurl calls. The original plug-in was written by Ramon Darrow and can be downloaded here. Thanks to Ramon for making it available to the public. I’ve included a couple of bug fixes people tracked down since he released the plug-in. Enjoy.
(Note, if you need help installing the plug-in with WordPress 1.5, check out Ryan’s walkthrough.)
Here’s the updated source, download it via right-click/Save As, rename to a .php extension and use it instead of the original:
http://www.nickbouton.com/files/flickr-gallery.txt
EDIT » 2005-10-21:
I’ve recently heard that FAlbum is far superior to the flickr-gallery plugin, so you guys may want to try using that instead.



It works now! Thanks for your help…now I can rest in peace. :D
Glad I could be of service. ;)
After many hours of hacking, I finally found your updated version of the flickr-gallery. Since I also use dreamhost I realized that much of my early pain must have been the fopens(). Thanks for the curl rewrite.
In order to make your version work I had to unwrap 20+ lines that had become line wrapped at 144 cols. If you’d like I can send you this version back.
Once I figured this out I finally saw some content from flickr. Thank you!
Sadly, 3 small issues remain.
1 — Will I see the photosets, the links to my photosets result in an “No input file specified.” error message.
2 — The gallery page includes a photoset that has no public photos and should not be seen because define (’FLICKR_SHOW_PRIVATE’, false);
3 — In the WP admin interface I see the following message
Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxx/worldunfurled.com/wp-content/plugins/flickr-gallery.php:\
740) in /home/xxxxx/worldunfurled.com/wp-admin/admin.php) on line 6
The it is repeated 3 more times for lines 7, 8 and 9. All 4 of the are the lines that print the headers in the admin script.
You can see the gallery.php result here it seems to work and shows all my photoset links with icons.
The links to the photo set look like: /gallery.php/album/iguassu-waterfalls, but clicking on any of these results in an error:
“No input file specified.”
Any idea where I should look for the problem?
Thanks so much.
Sorry, the main site for the curious is: World Unfurled… my stroy of a trip around the world.
Hi Nick, great script… but I get an error message :
Here is the response from Flickr:
And here is the response after passing through the parser:
array (
)
I have set the right cache (I can even see a cache file in it) and I have organized my photo’s into sets — as I see in the other forums. Do you have any idea what more might be wrong? I’ve spent so many hours on this script now, getting tired of it — maybe you can help? You can see my site at http://www.eyear.nl/blog/gallery.php
Best Regards, Daniel
(dvandewetering@gmail.com)
Hi Daniel,
The only time I’ve seen that specific error is when Flickr’s web service is down. Basically what you’re getting back is an empty result set from the call the gallery script is making. If that’s the case, there’s nothing you can do about it until Flickr’s service goes back online.
I’ve seen that error before a number of times.. what I did was add some code to check for a failed/empty result set and hide the error message in a DIV you can toggle on or off.
Hi Nick, thanks for your quick reply. This week I’m in Germany for my work and I can’t add the code to the script (I assume you updated the file on your website?) — but I will do so this weekend. So far I still get the same answer from Flickr, so I assume it’s not that Flickr is down… I’ll keep you posted!
FlickR + WordPress
Pues nada, andaba yo felizmente por esos mundos de dios cuando se me ocurrió la brillante idea: ¿se podrá montar una galería de fotos en WordPress usando FlickR? (en realidad me hacía falta para un proyecto, pero es que contado así no tenía much…
Tried to do it again and again, and I still get the same error (meaning Flickr is not down). Can you help me out, what information do you need, a copy of my script?! You seem to be my only help! Why is everybody managing to get this to work, and can’t I (though I am pretty techy)?!
Plz help?!
Daniel.
Fellow Dreamhoster here! :-)
Thanks for the plugin, I’ve been searching for one like this.
crunchingnumbers.org