cc licensed flickr photo shared by jamelah

Mmm, sliced bread!

So far maybe 140 people have installed my Flickr Creative Commons Attribution Helper– a GreaseMonkey script for Firefox. I use the sucker almost every day.

It takes what used to be about a 5 click, 4 copy/paste operation to give me, in one motion, the HTML needed to embed a Creative Commons licensed flickr photo in my blog- and– the format is consistent every time.

But last week, a tweet from Alec Courous got me thinking, that there are times when you want an attribution string that is not HTML, e.g., when you are using flickr photos in say a presentation.

I took about 10 minutes to add that feature.

The new version 0.3 of my script at http://userscripts.org/scripts/show/49395 now adds a second text box that has an attribution string in text:

cc-attribution-helper-new2

Either box is automatically select when you click it, so it is just a command-c away from being used.

The one piece is that maybe you want your attribution done a different way- mine is formatted like:

cc licensed flickr photo by Zzzzzz Zzzzzzzzz: http://flickr.com/photos/xxxxx/ZZZZZZZZZ/

Hey, I had to choose something. If there is something better, please make suggestions, but you can also edit the script yourself! Just look under the Firefox Tools menu for Greasemonkey, then select Manage User Scripts. Select the script you want to edit… and click the Edit button (you may have to select a text editor; I use BBEdit Lite, but whatever you have for a plain text editor will do).

You will need to edit line 67, and it would help to know a bot of JavaScript for how it puts strings together:

// create content to insert to page
   div_attrib.innerHTML = 'CC Attribution (HTML)<textarea rows="5" onClick="this.select()" name="ccattweb"><a title="' + phototitle + '" href="' + photolink + '"><img src="' + photosrc + '" /></a><small><a title="' + phototitle + '" href="' + photolink + '">'  + 'cc licensed flickr photo</a> shared by <a href="' + userlink + '">' + usernick + '</a></small></textarea>CC Attribution (text)<textarea rows="5" onClick="this.select()" name="ccatttxt">cc licensed flickr photo by ' + usernick + ': ' + photolink + '</textarea>';

And it is the last part that is the text version. You could do something shorter like:

// create content to insert to page
   div_attrib.innerHTML = 'CC Attribution (HTML)<textarea rows="5" onClick="this.select()" name="ccattweb"><a title="' + phototitle + '" href="' + photolink + '"><img src="' + photosrc + '" /></a><small><a title="' + phototitle + '" href="' + photolink + '">'  + 'cc licensed flickr photo</a> shared by <a href="' + userlink + '">' + usernick + '</a></small></textarea>CC Attribution (text)<textarea rows="5" onClick="this.select()" name="ccatttxt">cc licensed flickr photo: ' + photolink + '</textarea>';

or longer like:

// create content to insert to page
   div_attrib.innerHTML = 'CC Attribution (HTML)<textarea rows="5" onClick="this.select()" name="ccattweb"><a title="' + phototitle + '" href="' + photolink + '"><img src="' + photosrc + '" /></a><small><a title="' + phototitle + '" href="' + photolink + '">'  + 'cc licensed flickr photo</a> shared by <a href="' + userlink + '">' + usernick + '</a></small></textarea>CC Attribution (text)<textarea rows="5" onClick="this.select()" name="ccatttxt">creative commons licensed photo"' phototitle "'" by flickr user:' + usernick + ' found at ' + photolink + '</textarea>';

Your mileage may vary.

So what do you think? This is way better than sliced bread! And its free!

The post "New! Improved! With Extra Sheen! Flickr CC Attribution Helper" was originally pulled charred and crispy from a smoky charred oven at CogDogBlog (http://cogdogblog.com/2009/08/flickr-cc-attribution-helper-new/) on August 3, 2009.

7 Comments

  • Help is just through the door « meaning of life or 42 amhwrites.wordpress.com/2009/08/04/help-is-just-through-the-door

    […] This is a sample pic from flickr using Alan Levine’s nifty attribution helper. […]

  • michael chalk michalk.id.au/txt

    Great idea, Alan.. if i can work out how to use greasemonkey in chrome, i’ll have a go at using it ;-]

    .. you know about the photo dropper plugin for wordpress don’t you? Really useful if you’re looking for a generic theme-based image.. searches flickr creative commons for you, and adds link, licence etc. Your script brilliantly fills the gap when you already have a photo in mind.

    best regards, michael

  • Alan Levine aka CogDog cogdogblog.com

    Thanks MIchael, I’m just a new born pup to Greasemonkey but it has incredible power to customize your web experience (Scott Leslie has done a lot in this area).

    I did play with photo dropper for a while, and while I did find it handy, the search interface of getting only 5 at a time and having to page through results was tedious, and it was hard to get a feel for an image from a tiny icon– it is so much more glorious to use http://compfight.com where you can scan like 100 at a time.

  • Andy Rush andheblogs.com

    Alan – I give this script 5 barks at the moon. Incredible!

  • Shelley Rodrigo committedtechnofile.com

    Alan,
    You rock (I’ve used the old version and I’m downloading this one)! And the citation person in me (after doing four chapters of citations in the textbook…I either claim some expertise or no expertise) wonders if you might consider the following in future versions (yeah, I’m not playing with GreaseMonkey scripts unless we’re both together at some CyberSalon):
    *access date (the date they grab the script)
    *name of the picture
    Lots of the citation guidelines want date of access on the internet because it can be so fluid.
    Shell

  • Alan Levine aka CogDog cogdogblog.com

    Shelley,

    Send me an example of how an attribution should appear, and I’ll make you that script.

  • Michelle Dyer-Hurdon

    This is great. Thank you!

Leave a Comment

All fields are required. Your email address will not be published.