Plugin: o42-CC


Update 2009-10-22 - Plugin unmaintained
The plugin has not received any updates for a long time, due to a lack of time. I’m about to switch to another blogging system and thus soon won’t be using WordPress myself. Thus I’ve decided to officially stop the development of the plugin. If anyone is interested to continue its development, please feel free to contact me.

Purpose
This WordPress plugin allows you to easily select a Creative Commons license, which then will be used to mark your work accordingly. In case you don’t know about the purpose of Creative Commons, you really should see this ass-rockin’ animation.

The plugin is capable of adding information about the license you’ve selected in several ways: as metadata (RDF, usually used in the header of HTML files), as textual link or as a “clickable image”. Depending on configuration this either happens automatically or via template tags. Further documentation about the available template tags can be found in the configuration menu for the plugin.

The code for o42-CC is based on the WP-CC plugin, written by Firas Durri. I started by writing a small modification to WP-CC which allowed to select one of the available jurisdictions. But the mod didn’t know about the different versions available in each jurisdiction, and it didn’t know which of the licenses are available in which version. Being unsatisfied with this situation I started to rewrite much of the WP-CC code and ended up with o42-CC.
Firas has been (and still is) a great help during development, by contributing some ideas and testing the plugin.

Knowing that, you might ask yourself how o42-CC and WP-CC differ from each other. Which brings us to the…

Features

  • o42-CC starts off with a wizard which supports the selection of a jurisdiction. This makes sure that users doesn’t accidentally select invalid combinations of jurisdiction, license and license version.
  • Each of the configuration screens offer a short help text as a guide through the setup procedure.
  • o42-CC allows to select any of the currently available license version, not just 2.0 licenses - a feature that has been requested for WP-CC some time ago.
  • Information about available licenses are separated from the main code and are held in a few arrays. This makes it easy to update or extend these informations without the need of modifying the main code.
  • License selection can safely be aborted. The current settings in database won’t be changed until the “Update Options” button is pressed in step 2 of the license selection wizard.

While the Creative Commons website offers the so called satelite licensing interface for applications like this plugin, I decided to take another road and implement the necessary logic in the plugin. The main reason for this decision was that the satelite interface didn’t allow to select old versions of licenses. This would be ok for users who haven’t selected a license yet, but would be annoying for those who have already adopted an old license version before.

Disadvantages
When speaking of the features it’s only fair to mention the disadvantages I see. They might or might not apply to your situation, though.

  • Since all information about the licenses are hardcoded, a new plugin version is needed to make use of changes to these informations. On the other hand, such changes are rare. You also must actively switch to a new version of the selected license (since license upgrades do not apply automatically!), so this is not a big issue, I think.
  • In contrast to WP-CC this plugin doesn’t provide links to further information of each of the offered licenses. Users which did not already choose one of the licenses will find it hard to decide which of them is the right one for their needs. It’s not easy to address this problem, but addressing it is on the to-do-list (see below)
  • Localization isn’t easily possible (without editing the source) in the current version (0.1.1). Although this “only” applies to the configuration screens in the administration interface, this will be addressed soon.

Screenshots
Wizard - welcome message
Wizard - selection of jurisdiction
Wizard - selection of license and version
Configuration screen for selected license

License
This plugin is available under Attribution-ShareAlike 2.0 Germany.

Download
Current version is: 0.1.1

o42-cc-0.1.1.tar.gz

Installation

  1. Download the current version of the plugin (see above).
  2. Extract the archive to a temporary directory.
  3. Copy the file o42-cc.php to wp-content/plugins/ in your WordPress installation.
  4. Change to the Plugins menu in the WordPress administration panel, where o42-CC should be listed as an available plugin. Activate it.
  5. Change to menu Options → o42-CC. The license selection wizard will be presented to guide you through the process of selecting a license for your blog. Follow the instructions on the screen.
  6. Decide about the options offered regarding automatic output of information about the selected license in your blog.
  7. Optional: in case the automatic output doesn’t work well for your template, you might want to place a call to one or more of the offered template tags manually into your template. The configuration screen that’s visible when a license has been selected has a short description about each of the tags.

To-Do / Feature ideas

  • Make use of the localisation features offered by WordPress. Offer a german localisation.
  • Offer a dynamic, javascript-based info link during license selection (step 2 of the wizard). Basic idea: the link should guide the user to the description depending on the previously selected jurisdiction and the currently “highlighted” version for each of the offered licenses.
  • Add option to the configuration screen to allow selection of one of the two standard “Creative Commons - some rights reserved” logos. Maybe extended by a field to manually specify a completely different graphics file as standard image. The user may still override that standard selection by providing an individual image to the call of o42_cc_output_image() template tag.
  • Add a text field to change the default text used by o42_cc_output_text(). User still may override this standard by providing a different text when calling …_output_text.
  • Provide per-post selection of a license.
  • Add Public Domain.
  • Add CC/GPL and CC/LGPL.
  • Add other, non-CC licenses. Suggestions are welcome.
  • Provide a way to cleanly uninstall the plugin. This should remove all of the options that were added to the database by the plugin. See if there is a callback that could be used to do so when the plugin is deactivated. If not already available, propose integration of a framework for plugin deinstallation, could be added to WP 1.6.
  • Separate license information from code and add a mini-wizard to check for and perform upgrades to this file. Thanks to Bill for this suggestion.

Changes
Version 0.1.1:
First public release.

Informationen und Links

Stürze Dich ins Getümmel! Kommentiere, lies was andere zu sagen haben, oder verlinke den Beitrag in Deinem Blog.


Weitere Einträge
Neulich bei Ebay…
Plugin: o42-clean-umlauts

Kommentieren

Hier kannst Du einen Kommentar hinterlassen. Einfaches HTML ist erlaubt.

Kommentare

What about the new 2.5 version? The absence of them was the main reason I stopped using WP-CC.

Hi David.

The short answer:
version 2.5 is available.

The longer answer:
The 2.5 version of licenses is available for all jurisdictions that offer them, currently only “generic”. I will try to keep up with any change done to licenses - currently the license information contained in the plugin is up-to-date in this regard.

Bye, Mike

I’m not a CC user (at least yet) though I love this type of plugin and appreciate the work done by you, Firas and the others. But I would like to offer a suggestion to your thoughts about hardcoding choices in an array, which i like to use when possible: put them in a separate file, CSV, XML, YAML, YMMV ;). Further, to deal with keeping the latest information available, you might add a button ‘Retrieve latest license data’ that copies a new version of the file from a pre-determined URL (your site, maybe Codex, there’s probably a simple solution). Anyway, thanks again for contributing.

Thanks for your suggestion, Bill. Indeed, that’s a good idea. Maybe writing the serialized contents of each information-holding array to this file is the easiest method - serializing should work with every PHP version that is capable of running WordPress.

I could then add another mini-wizard to perform a check for new license information (HEAD request against the file on my server should work).

Another idea that comes to mind: how about an easy plugin upgrade procedure? Similar to checking for a new version of the license information a check for a new plugin version could be implemented. Given that the webserver is allowed to write-access the plugin, the plugin could upgrade itself with a simple button click.

I tend to shy away from such direct mechanisms as auto-upgrades though others have expressed less reluctance for it. I prefer being told an update’s available, which far too few developers put in their offerings. My two Euros, since you asked.

I think I’ll add a function that checks once a day for a new version of the plugin (maybe that’s a nice addition to the dashboard, have to check if it’s possible to add something to it from a plugin). If a new version is available, the user may (or may not) decide to hit a button that starts off the wizard for performing the upgrade. So in the end it’s the choice of every user whether (s)he uses that option or not.

What do you think?

Fantastic job, thanks. One suggestion is to change the template tags to match those used by WP-CC. In other words, cc_output_image instead of o42_cc_output_image. The reason is that it makes migrating from one plugin to another easier. Also you’re never likely to have both plugins enabled.

One more suggestion is to allow manual entry of the license URL based on the license chosen by the CC website. Not sure if this is possible or not. Anyway this might alleviate problems where the plugin needs to be updated when licenses are updated in the various jurisdictions.

Checking for a new version of the plugin is a good idea, but I wonder if there isn’t a more general solution (eg the WP plugin manager, should it ever come back out of hibernation…)

Hi Mike,

Great plugin. I had to manually add the tag to my footer to see the logo, but all of the header info went in fine. One question; How come I can only use this license: Attribution-NonCommercial-NoDerivs 2.0. When I try to use 2.5 and click on the logo, I get a “file not found”. My site is: http://blog.maltese.net

Thanks in advance for any help,
Chris

With regards to Chris M comment, I have gone through the code and made a few very minor alterations, they are extremely small and could easily have been overlooked.

The modified code is available here

I get no wizard in the Options panel - using WP 1.5

[...] o42-cc plug-inä是新的plug-in,而ä這兩天試用的新plug-in。有沒有聽過Creative Commons這個概念?想在自己的wordpress站台ä標明自己ä用的是Creative Commons(創用CC)授權的話,試試這個方ä的plug-in吧。簡單的幾個設定就可ä選項ä想要的license,ä在網頁ä加入meta data/text/image等授權標示,若ä喜歡ä擺的ä置,自己在themeä加入o42_cc_output_metadata()/o42_cc_output_text($text)/o42_cc_output_image($text, $image)這樣的指示就行囉。 引用時請ä用此URL [...]

[...] I downloaded and installed the Creative Commons License plugin ‘o42-CC‘ for wordpress and found that certain aspects of it didn’t function correctly, I have since corrected these abnormalities and published the corrected file here. [...]

[...] o42-CC -Creative Common的Logo(本站右ä角) [...]

[...] 在進行更換的時候,發現sidebar modules與原本用ä顯示CC授權的WpLicense衝突,會導致整個sidebar modules頁面無法設定,欄äää片空白,把WpLicense停用後,就恢復正常,ä必須重新設定sidebar,因此我另外找äo42-ccää取ä插入授權的功能。 [...]

[...] Visit [...]

[...] blogtaku42 - » Plugin: o42-CC This WordPress plugin allows you to easily select a Creative Commons license, which then will be used to mark your work accordingly. In case you don’t know about the purpose of Creative Commons, you really should see this ass-rockin’ animation. (tags: wordpress plugin) [...]