At the mercy of third party providers who take a great service and just yank it away (ahem Google– Reader; ahem Twitter– posterous; the list goes on), one can just take the lumps like a victim. But I like to find the ways around it. I got code on my side.
Do you see that image above? I generated it with my brand new, mostly untested, flickr cc attribution helper as a browser bookmarklet.
The thing about flickr is that while many people get lathered up abut the web interface, is power is that the underlying architecture is there for use via its API. That does not change, and it gives one access to the information in flickr. What it means is that you can make flickr do almost whatever you want, imagine, or can manage to bang out via code.
Crude prototype for new flickr cc attribution helper will spawn via bookmarklet; using json for fetching photo info pic.twitter.com/NKqIGNO8ZA
— Alan Levine (@cogdog) March 28, 2014
It did it by putting the info in a pop up window, even got fancy by putting the image as a background on the window.
I tried to get it all working inside a bookmarklet, but could not get the jQuery to cooperate. So I had a new idea. The bookmark’s function is simply to get the ID for the flickr image; that is the part of a URL such as
13455811934 — that is all I need to pass to the flickr photos.getInfo API. So my clever idea was to put all the code that does the work in an HTML/jquery page, and I could pass the flickr ID to it via a query parameter, e.g.
And that’s what I have working now. But I did not want to depend on hanging this on my domain, and shoulder the traffic for everybody– I figured out how to get the code running on a github site associated with the code.
But creating the bookmarklet is also something I could make easier. So here it is… (drumroll) the flickr cc attribution helper maker
With this tool you create your own browser bookmarklet. Something I could add are some options, for the HTML code, so you can have other sizes than the 500px width image used (that’s what fits this blog, and I make tools for me first).
But all you need to do is drag the link on the blue button to your browser bookmarks bar. When viewing a flickr image, it will toss open a new small window with the one click attribution (pop up windows, bad, I know. Maybe I can figure out how to put a lightbox on the flickr page)
And there you go! Attribute away.
But wait, there is more! Maybe you do not like the way my code does attribution. Maybe you want the licenses spelled out. Maybe you want to put your own CSS classes on things. Just grab the cc-attributor source from the github repo.
You can modify it any way, and put on your own web site (heck I tested on my MacBookPro in the localhost web directory). And then you can still use my Bookmark Maker to generate the tool, just put your URL in the field instead of mine.
Now go attribute your flickr photos! Don’t be tool of flickr, make it a tool for you.
I should say that this is barely tested. Mileage will vary. I also got very confused with github’s tools for making pages, and tripped up 20 times in the branches.
The post "You Can’t Keep this Dog Down! A new flickr cc Attribution Helper" was originally dropped like a smoking hot potato at CogDogBlog (http://cogdogblog.com/2014/03/cant-keep-this-dog-down/) on March 30, 2014.