This is my first post in two months..sorry, been incredibly busy at work! I’ve had my first week off since, well, I don’t know when!
So how did I spend one of my days off? Coding. Yep, bloody coding!
Anyway, I wanted to solve quite a specific problem with regards to Flickr. Every month on www.holgablog.com we run a ‘best of’ in which we showcase some of the best photos Holga photos we have seen in the Holga Flickr group. The problems we faced however were twofold:
- There was no easy way to browse the pool for all photos added for one specific month
- It took absolutely ages to manually insert the photos(with all info required) into wordpress
To tackle this, I’ve created The Flickr Group Searcher. This simple script enables you to enter the group code for a certain group (to get a group ID, you can either get lucky and the ID will be in the group’s URL, or you can use this to search for the group and find the id: FLickr API group search), choose two dates, and choose what you want to do when ‘clicking’ on the returned image thumbnails. This solved the first problem, in that we can now browse a pool between two dates.
The 2nd problem was also easily solved; you get the choice of three options before searching:
- You can either have the thumbnails linked through to the flickr page for that particular photo.
- You can generate the code required to enter the photo into a flickr discussion.
- You can generate the code required to enter the photo into a WordPress page/post (via the HTML view).
The 2nd and 3rd options show a text box at the top of the screen which,when you click on a photo, fills up with the code required for insertion into the chosen program. You can then simply copy and paste the code into wherever you need it!
Another great bonus is that it uses Alen Grakalic’s Jquery image preview, which enables the user to see a larger preview of the photo when they hover over a thumbnail.
In the long run, this should save us loads of time!
Another small script I created was the Flickr Favourite Searcher, which searches through a FLickr user’s public favourites that were added between two dates, and then generates the same type of insertion code as the Flickr Group Searcher.
The Geeky Part
To create these scripts, I used Dan Coulter’s awesome PHPFlickr which offers a PHP ‘wrapper’ around the Flickr API, allowing for easier interaction with the FLickr API methods. All the API methods are present, and are simple to use with PHPFlickr, with the results returned in an easy-to-use array.
If anyone wants a copy of my scripts to copy/butcher/change, drop me an email.