Modified TanTanNoodles Flickr Gallery WordPress plugin

Photo of the day via a shortcode in modified TanTanNoodle Flickr Gallery wordpress plugin.

[flickr datetaken=’2010-08-16′ size=’Medium’]

Have you felt a burning need to post a picture of the day by pulling a single image from your flickr photostream? Ever wanted to do all of that directly from your iDevice without having to browse web pages and find photo id’s from urls, or try and use the wordpress posting page with plugins on a tiny screen?

Well, you’ve come to the right place. While the Joe Tan’s Flickr Gallery plugin does almost everything I want, I couldn’t find an easy way to reference a single photo in my photo stream without having to look up the photo’s ID (via flickr’s web interface) or creating an individual tag for each photo i wanted to reference individually.

So, braving the PHP world (guess theres a first time for everything) I cracked open Joe’s plugin and modified the code for handling wordpress shortcodes.

I’ve added three additional parameters to the flickr shortcode.

  • datetaken
  • dateuploaded
  • containstext

both datetaken and dateuploaded are narrowing in that any of the other parameters, like tags etc, will be restricted to the photos matching that date.

By using the new shortcode parameters I can tag photos freshly uploaded from my phone (with a single tag, say ‘POTD’) and show them taken on a specific date, i.e. today. This way I keep all my uploaded photos in flickr’s gallery , and display them in my posts with a shortcode that’s easy to remember and type straight into my iPhone’s wordpress app.

Posting a photo of the day is now just a quick 2 step process.

While testing the modifications I’ve noticed that flickr’s search is VERY flakey indeed. If you specify more than a date and tag the picture isn’t found reliably. There’s more information about search problems on the flickr forums.

If you’re feeling brave download the attached class-public.php and upload it to your wp-content/plugins/tantan-flickr/flickr folder. BACK UP YOUR CURRENT FILE.

It seems to be working just fine at the moment, however, if anyone knows an easier and more reliable way to achieve this (preferably straight from my iPhone!) let me know!


  Copyright secured by Digiprove © 2010 Robert Hill

This entry was posted in General, Hackery. Bookmark the permalink.