It was an all day journey to get home from Canada (Edmonton to Minneapolis to Phoenix by plane, then drive to Strawberry), and after dumping the bags and shredding the junk mail, I got distracted.
Two hours later, I realized it was late.
But if you have not heard, flickr has a preview of a new layout for your photo pages – bigger images, and some movement of buttons and sidebar stuff. It’s refreshing. To activate it on your own photos, go to http://flickr.com/photobetaoptin/.
Then I realized that changes in the structure of the page would hose my CC Attribution Helper script, which as a browser script, hangs its code threads on the internal page structure, which is significantly different when you lift the hood.
If you are among the small percentage who has not heard of this script (yeah right, more likely the other way around), what it does is to add to any flickr page with creative commons licensing, a cut and past field for either embedding the image in a blog with attribution provided, or just a simple text string for, say providing attribution in a presentation slide. It saves a lot of time and copy/paste steps to do this– here’s an example:
So with a bit of brute force effort (I am totally guessing on a lot of the XPath coding), I managed to create a version that works with the new layout:
It actually can handle both layouts (it sniffs for a div id that is only found on the new layout).
Its been pretty minimally tested, but I think its working correctly (only showing on flickr photos that have a cc license).
You can install this new (0.4) version of Flickr CC Attribution Helper at
Feedback greatly appreciated!
The post "Late Night Code Frenzy Flickr CC Attribution Helper Updated" was originally emerged from the primordial ooze and first walked on land at CogDogBlog (https://cogdogblog.com/2010/06/cc-attribution-helper-updated/) on June 26, 2010.