The flickr cc attribution helper is among my most proud creations; I can pretty much tell when I read other blogs who is using it. And it all started from the most important place, something to make my blogging practice easier.

I’d written earlier about an unintended outcome of moving it from a browser extension to a javascript bookmarklet tool- it essentially becomes something that has a plugin type capability.

To try and recap how it works; the bookmarklet javascript makes use of the flickr API public exposed to Javascript to get some info from a flickr page in view when the tool is activated (things like it’s flickr ID, the author ID, some info to construct a link to the image in a particular size, and other info about the license). It then sends this info a special tool URL that opens in a small window.

That tool URL parses the info sent to it and generates everything seen in the new window, including the cut and past attribution code.

Attribution tool in action

Attribution tool in action

The default tool up til now generates the HTML to embed and link to the original flickr page, and puts in text below the image a full attribution with proper links.

This is the kind I used on my own blog for years.

But when I redid my theme a few months ago, I decided to make a new “tool” that renders the HTML wrapped in the [caption]...[/caption] tags that wordpress uses to display uploaded images with captions. Most themes then style that in a way that works for the layout.

Then I got a pull request in github for a third variety that John Johnston developed – he has a gizmo on his site that creates a copy of the image with the attribution built into the image, so that makes it really easy for students to manage as there’s no mucking around with HTML. It can look like:

cc-stamped-example

Up until now you would have to know (or make your own) tool HTML to put in the form if you wanted a different layout or format for the attribution.. So I decided to make it a menu option so you can choose from the three available tools when you generate a bookmarklet tool:

maker-plugin

This to me makes it act like a plugin, and there is nothing stopping me from adding more variations if there are other ways the attribution should be displayed.

The menu triggers a jQuery command to change the value of the Tool URL AND updates the cut and paste code. To make it a bit more understandable, I added a new page that shows examples of the three available flavors.

I think its pretty slick, well except for how much I fumble and bumble with github.

If you have not made a flickr cc attribution helper, try the maker tool. If you have an existing one, you can try one of the new options (just delete your own bookmarklet tool and pick a new one.

Mmmm flavors.


Top / featured image Public Domain Pixabay image by Nemo

If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
Become a patron at Patreon!
Profile Picture for CogDog The Blog
An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *