I've been working for the past week or so on a JavaScript licensing widget
that has been suggested on our wiki
<http://wiki.creativecommons.org/JsWidget>. It's a new way to integrate
CC licensing into your web application. It's really as easy as pie: Just
add the following tag somewhere in the body:
<script src="http://api.creativecommons.org/jswidget/tags/0.1/complete.js"
/>
and a CC licensing widget will appear. Your web application can then use
regular DOM queries to determine the user's choice.
NOTE that this is not ready for prime-time use! I want feedback on what
people would like us to add or change. Right now it serves only
English-language text; in the future you will be able to do
src=".../complete.js?locale=", stick your language code at the end, and
get text back in your language. Beyond translation, tell me how else I
can be of service!
You can download a trivial sample application and a long-ish README at our
SourceForge project:
http://sourceforge.net/project/showfiles.php?group_id=80503&package_id=239510
. For y'all's (in)convenience I've attached the README here, too.
It'll take you all of five minutes to deeply understand what's going on,
so I suggest you do if you're thinking about (or if you already are)
offering CC licensing to users of web applications you work on.
-- Asheesh.
P.S. Hi everyone, I was an intern last summer but now I'm a real tech guy
at CC. Pleased to meet you all!
--
"I only touch base with reality on an as-needed basis!"
-- Royal Floyd Mengot (Klaus)
-------------- next part --------------
This code is an example of how to integrate with the Creative Commons
JsWidget. If you just want to see how to use it, read index.html.
== WARNING ==
This is just a preview! YOU SHOULD NOT RELY ON IT!
It's not even a betta, nor in beta. It's a glimpse into the
ever-changing future. No warranty is provided; this software may eat
your cat, spill your milk, and prepare your breakfast. Or it may not.
Having said that, we plan to keep
== What is JsWidget? ==
The JsWidget is a JavaScript file hosted on creativecommons.org that
displays a user interface for selecting a Creative Commons license. We
wrote it so that if you didn't want to write your own interface, you
could just call ours.
We think it's so nice that we're going to make our web app things use it
eventually.
For an example of how to use it, STOP READING and look at index.html.
== Jurisdictions ==
JsWidget comes with support for different jurisdictions. If a user of
it wants to select a license customized for a particular country's
copyright law, the interface will handle that properly and will
automatically update as the international CC licenses are localized or
updated.
== Languages ==
In this preview edition, there is only support for US English. In the
future, you can select a language with the ?locale= option to
complete.js. If you leave the ?locale= off, then (in the future) the
server will attempt to negotiate a language with the client with the
Accept-Language header as per
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 .
Our language codes for ?locale= are fairly standard; when I find a
reference for where en_US and fr come from, I'll make a note of it here.
== Style ==
We give you two style files that make it look bearable. You probably
want to customize these so the form has the colors and styles your users
expect.
== Re-use ==
See COPYING for information on copying/reusing this work. Basically, do
whatever you want.
If you want to see how things work behind the scenes, look through
https://cctools.svn.sourceforge.net/svnroot/cctools/jswidget/.
== Questions ==
Ask us questions about this! Email our development mailing list
cc-devel at lists.ibiblio.org .
-- Asheesh Laroia <asheesh at creativecommons.org> 2007-07-19.