Type in a tag, click “play”, and you will be served up 20 random flickr photos, displayed each for 20 seconds. The idea is to have people practice the art of improv to a set of never before seen images, and try to make sense of it.
Yeah, do 5 Card flickr 4 times ;-)
But I thought this might be fun to do. My first round was a build off of the same code that I wrote for 5 Card Flickr, because all of the image data for the tags read in are stored locally in my database (the site pulls in the flickr id for a photo needed to generate a size of an image via the API).
That was not hard, after tapping into a jquery library for slide shows, jquery cycle, which is amazing for what it provides to create a variety of web-based slideshows. But it seemed limiting to use only the tags defined for my other site.
So I pressed rewind, and just wrote something from scratch, using the same phpflickr library to work with the flickr API. In this version, I use the API to pull up the 200 most recent photos with the tag into an array, and then use array_rand() to grab 20 random from among those, which are then served up by the jquery cycle gig.
I found that the first image in the set loaded a bit slowly, so I made the first slide an intro/explanation/teaser image I pre-created (I have five of them, so you get a random one each time).
The images are then displayed 20 seconds at a time, with a counter on the left- here is an example using tyhe tag “dog” (is there another tag worth doing?)
I did a demo of this at a Moosecamp session for Northern Voice, and people seemed to like it.
After I can do some tweaking of the layout and fish for feedback, I will post the code for it. Some things that people asked for included:
- An ability on the front to select the duration for slides to appear (it is fixed at 20 seconds, but this could be a menu option).
- An ability to change the number of slides (maybe a mini pecha, say 10 slides?)
- A clock on the screen (I am against the idea, it does not meet with the concept, but that is just me)
- Perhaps a way fo presetting some “easy”, ‘medium”, “hard” settings to set the challenge level
No promises I will do any of this, but I will at least share the code soon.
But this was fun to make!
Give it a play at http://lab.cogdogblog.com/pechaflickr/
The post "From the CogDogLab: Pechaflickr" was originally pulled like taffy through a needle's eye at CogDogBlog (https://cogdogblog.com/2011/05/pechaflickr/) on May 26, 2011.