Flickr Creative Commons Attribution Helper
by Alan Levine http://cog.dog/
If this kind of stuff has any value to you, please consider supporting me so I can do more!
Turns the laborious task of giving attribution of creative commons flickr photos into a one click operation. If you just want to run with it make your own now.
Note This bookmarklet tool currently works in Chrome and Safari web browsers but not Firefox (do to Content Security Policy restrictions). There might be options, but so far they are eluding me.
Darn you flickr! You make it so complex to give proper attribution for Creative Commons images. The photos available are a bag of gold-- collection of creative commons licensed photos on flickr. Yet to use said images to create a blog post requires no less than 12 clicks and 4 copy/paste operations (estimate).
In 2009 I thought there should be an easier way and created the first flickr cc attribution helper as a Firefox Greasemonkey script. The script detected if a given flickr photo was Create Commons licensed. If so, it inserted directly into the flickr page a cut and paste set of HTML that had everything to put into a blog post- the image code to display the photo, a link back to the original, and a display of the license, the photo owner, and links back. It also provided a second text attribution string that could be used in documents or presentations.
And finally the update of the flickr site in March 2014 again rendered the script nonfunctional; it makes it imposible for me to update my scripts because much of the display is generated dynamically via complex YUI scripts; the information could not be easily parsed.
So I looked for another way.
Because attribution is the right thing to do, to express gratitude, no matter the flavor of the license, no matter if the law requires it or not.
Always Be Attributing.
THE WAY FORWARD
As an addition, when you make the bookmarklet tool, you have options to change the size of image used, so you can make use of flickr's different image widths (240, 500, 620, 800, 1024 px). Note that the larger sizes will not work if the original is of smaller dimensions.
This new version takes a different approach; a person interested in using the tool intalls a web browser bookmarklet. Just drag the link text on the blur button to your browser's bookmark bar.
Upon viewing a flickr photo, if you are viewing a flickr photo licensed under creative commons, it will launch a small window with a few one click copy/paste attributions fit for use in a blog post or a presentation.
The first one is a full HTML attribution with the image embedded, suitable for cutting and pasting into an HTML editor. The second is the attribution in HTML, to be maybe for a footer credit or a caption field. The third is text only, for presentation slides or written works.
THE EASY WAY VS THE CUSTOM WAY
If you want to do basic attribution, you can use the bookmarklet generating tool, and go off attributing. It is powered by the helper tool page residing on github (I love you github).
The work of the attribution helper is done via an HTML page boosted with some jQuery code. The bookmarklet passes the unique flickr id (it's in the URL), and the tool page uses the flickr api vis JSON to get all of the information needed to build and display an attribution string.
These pages act as plugins, so the bookmarklet maker can make different varieties of output. There are currently three flavors of attributions generated
- Plain HTML - embeds the image and puts a proper and linked attribution text below
- Plain HTML CC TASL - uses the format from Creative Commons Best Practices for Attribution
- Wordpress - embeds the image but wraps it in the [caption]...[/caption] short codes that Wordpress themes use to format images with captions.
- Wordpress CC TASL - same but uses the format from Creative Commons Best Practices for Attribution
- Stamped - generates a downloadable copy of the image with the attribution stamped right into it (thanks to John Johnston who created a nifty mobile version of a flicker finder / attribution stamper.
- Markdown - Suitable for static blog generators, Github, and other popular Markdown-friendly tools, original by Glen Smith.
- Markdown -CC TASL - Suitable for static blog generators, Github, and other popular Markdown-friendly tools but uses the format from Creative Commons Best Practices for Attribution
If you would like to customize the attribution output in any way, or just prefer to run your own, you can grab a copy of the attribtion helper on github here, fork and modify, and run on your own web server. It just needs to be available at a public web page. And you can still use the bookmarklet generator below to build your browser tool.
TO RUN YOUR OWN MAKER
Download this repo and use the docs folder for your own site. You can use the entire generator or just your own modified tool page. You need place to put a HTML page at a public URL and you should get your own Flickr API key
Get a flickr API key https://www.flickr.com/services/apps/create/apply
var fpai = 'YOUR-OWN-APIKEY';
Upload to your web server in directory of your choice. Check the URL. You know how to do this?
Use the bookmarklet maker use your own URL for a helper script, and drag the link to your toolbar.