Feature Request: Short code
-
Hi George,
have an idea, and think you’ve got most of the cod already in your plugin to do this… How about adding a shortcode to allow embedding a license in-page? I’m thinking something along the lines of:
[cc lic=”by-nc-sa” ver”3″ size=”small”]That would produce a small, linked badge in place.
The reason I sak for something like this is for producing show notes for my podcast. Since I play a lot of CC music and provide accurate attribution and license information.
For an example of what I current do see: http://cerebralrift.org/2014/12/30/cerebralmix-2014-12-28-top-15-for-2014/
George
https://wordpress.org/plugins/creative-commons-configurator-1/
-
Hi George,
A badge only output via a shortcode is an interesting feature and I’d be glad to implement it.
Currently, I’m out of free time, so it might take a while, but this will be implemented.
Thanks for your feedback,
George
Thanks George,
I understand the time-crunch problem. I look forward to this being added when you have the time.
George
[cc lic=”by-nc-sa” ver”3″ size=”small”]
Hi George,
The ‘ver’ parameter puzzles me a bit. The shortcode should generate a badge for the licenses supported by the plugin. Each license has a unique slug, which renders the ‘ver’ parameter unnecessary.
Could you provide more feedback about ‘ver’. Was it written as an example?
My assertion was there is a chance of there being more than one license version being supported by the plgin in the future. Especially if the CC Foundation provides revisions to the current licese… IE, a 4.0 and a 4.1 version.
I know that the earlier versions of the license are supposed to be depricated in preference to the 4.0 version of the licesne, however there is a a large body of work(s) that are licensed under the 2.x and 3.x variants of the license currently.
FWIW – I didn’t make it clear that te ver and size paramaters would be optional. If not present the settings the user has for the plugin would be used, the ver and size parameters would be used to over ride the settings for the plugin.
This is probably the one deviation from the current functionality of the plugin… In this case I don’t have the option to chose a newer license for works created by a third party, and should respect the original license choice.
George
I see. I had thought about multiple CC versions when developing 1.8.0, so there will be no problem, except for the license slugs, which may seem a bit awkward at first (eg
cc__by-sa
for the current BY-SA,cc3__by-sa
for the BY-SA v3 etc).I’ve implemented the shortcode like this:
[license type="license_slug" compact="1/0" link="1/0"]
The
type
parameter is required. The default forcompact
andlink
is 1. If an unsupported type is used, it prints the supported types. For instance:license error: invalid type - supported: cc__by, cc__by-nd, cc__by-sa, cc__by-nc, cc__by-nc-nd, cc__by-nc-sa, cc0
The new version will be released soon.
Added in 1.8.5. Your feedback is welcome.
Usage information exists in the description page of the plugin.
George,
This looks awesome! I will be giving it a try tonight as I have another show to post tomorrow.
Geprge
George,
I just started the draft of my show notes, and I previewed the table with the shortcodes in place — it looks awesome! And it was a quick modification from the text version to the shortcode version.
Thanks! Precisely what I was looking for!
George
Glad it works as expected! 🙂
- The topic ‘Feature Request: Short code’ is closed to new replies.