<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.creativecommons.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gameguy43</id>
		<title>Creative Commons - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.creativecommons.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gameguy43"/>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/wiki/Special:Contributions/Gameguy43"/>
		<updated>2026-04-23T05:10:42Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Mozilla_Service_Week&amp;diff=25912</id>
		<title>Mozilla Service Week</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Mozilla_Service_Week&amp;diff=25912"/>
				<updated>2009-09-02T19:28:49Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: /* Volunteers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;padding:1.25em 1em; -moz-border-radius:5px; -webkit-border-radius:5px; background-color: #eaeaea; overflow: auto; margin-bottom:2em;&amp;quot;&amp;gt;&lt;br /&gt;
Mozilla Service Week is an opportunity for people to help others learn more about their area of expertise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=&amp;quot;100%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;strong&amp;gt;[[#I Want To Help!|I Want To Help!]]&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;strong&amp;gt;[[#I Need Help!|I Need Help!]]&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mozilla Service Week is September 14-21, 2009. From [http://mozillaservice.org/learn_more/index/en_US their website]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;strong&amp;gt;What Is Mozilla Service Week?&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;During the week of September 14-21, 2009, we're asking individuals to step up and make a difference by using the Web to better their community. We're looking for people who want to share, give, engage, create, and collaborate by offering their time and talent to local organizations and people who need their help.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Mozilla believes everyone should know how to use the Internet, have easy access to it, and have a good experience when they're online. By utilizing our community's talents for writing, designing, programming, developing, and all-around technical know-how, we believe we can make the Web a better place for everyone.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As an organization that shares those values and ideals, Creative Commons is answering Mozilla's call for participation by hosting an online help desk via our [[IRC]] channel. &lt;br /&gt;
&lt;br /&gt;
The CC help desk is a place for experienced CC-ers (staff, Jurisdiction partners, and community members), to come together to share their collective expertise with those that are new to CC and need a little, or a lot, of guidance. &lt;br /&gt;
&lt;br /&gt;
The CC community will be providing help with the following topics:&lt;br /&gt;
&lt;br /&gt;
* General CC help&lt;br /&gt;
* CC technology (ccREL and software projects)&lt;br /&gt;
* Where and how to publish CC works&lt;br /&gt;
* Where and how to find CC works&lt;br /&gt;
* CC in education and science&lt;br /&gt;
&lt;br /&gt;
= I Need Help! =&lt;br /&gt;
&lt;br /&gt;
If you're new to CC or just have questions about one of the topics above you can get help by joining the [[IRC]] channel during Service Week.  Refer to the list of [[#Volunteers|volunteers]] below if you're not sure who in the channel to ask.&lt;br /&gt;
&lt;br /&gt;
== But I don't know what IRC is! ==&lt;br /&gt;
&lt;br /&gt;
From the [http://en.wikipedia.org/wiki/IRC IRC] page in Wikipedia:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;[IRC] is a form of real-time Internet text messaging (chat)... mainly designed for group communication in discussion forums, called channels.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creative Commons has a dedicated room, [[IRC|#cc]], on the [http://freenode.net Freenode Network].&lt;br /&gt;
&lt;br /&gt;
== IRC Software ==&lt;br /&gt;
&lt;br /&gt;
If you don't currently use IRC, Wikipedia has a helpful [http://en.wikipedia.org/wiki/List_of_IRC_clients list of applications].&lt;br /&gt;
&lt;br /&gt;
==== Linux Users ====&lt;br /&gt;
&lt;br /&gt;
You have lots of options; [http://xchat-gnome.navi.cx/ X-Chat Gnome] is one of them.  If you have a favorite, add a link here!&lt;br /&gt;
&lt;br /&gt;
==== Mac OS X Users ====&lt;br /&gt;
&lt;br /&gt;
* [http://colloquy.info/ Colloquy] is an IRC client for Mac OS X&lt;br /&gt;
&lt;br /&gt;
==== Windows Users ====&lt;br /&gt;
&lt;br /&gt;
* X-Chat is available at http://www.silverex.org/download/&lt;br /&gt;
* [http://www.mirc.com/ mIRC] was awesome in 1995. Maybe it still is.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= I Want To Help! =&lt;br /&gt;
&lt;br /&gt;
If you have time to help out, you can participate by spending time in the channel answering questions.&lt;br /&gt;
&lt;br /&gt;
Add your name to the schedule below and join the channel during your scheduled day.  You don't need to block out time, you can just leave it running in the background and look periodically to answer questions.&lt;br /&gt;
&lt;br /&gt;
Please add your name and IRC nick below to the days you can help out.&lt;br /&gt;
&lt;br /&gt;
== Volunteers ==&lt;br /&gt;
&lt;br /&gt;
The people below (with their IRC nick names in parenthesis) have volunteered to help out.&lt;br /&gt;
&lt;br /&gt;
=== Monday, September 14, 2009 ===&lt;br /&gt;
&lt;br /&gt;
* Nathan Yergler (nathany) [CC Staff]&lt;br /&gt;
* Alex Kozak (akozak) [CC Staff]&lt;br /&gt;
* Nathan Kinkade (nkinkade) [CC Staff]&lt;br /&gt;
* Greg Grossmeier (greg-g) [CC Staff]&lt;br /&gt;
* Aurelia J. Schultz [CC Staff]&lt;br /&gt;
* Fred Benenson (mecredis) [CC Staff]&lt;br /&gt;
* Parker Phinney (pyrak) [Former CC Intern]&lt;br /&gt;
&lt;br /&gt;
=== Tuesday, September 15, 2009 ===&lt;br /&gt;
&lt;br /&gt;
* Nathan Yergler (nathany) [CC Staff]&lt;br /&gt;
* Alex Kozak (akozak) [CC Staff]&lt;br /&gt;
* Nathan Kinkade (nkinkade) [CC Staff]&lt;br /&gt;
* Greg Grossmeier (greg-g) [CC Staff]&lt;br /&gt;
* Aurelia J. Schultz [CC Staff]&lt;br /&gt;
* Parker Phinney (pyrak) [Former CC Intern]&lt;br /&gt;
&lt;br /&gt;
=== Wednesday, September 16, 2009 ===&lt;br /&gt;
&lt;br /&gt;
* Nathan Yergler (nathany) [CC Staff]&lt;br /&gt;
* Alex Kozak (akozak) [CC Staff]&lt;br /&gt;
* Nathan Kinkade (nkinkade) [CC Staff]&lt;br /&gt;
* Greg Grossmeier (greg-g) [CC Staff]&lt;br /&gt;
* Aurelia J. Schultz [CC Staff]&lt;br /&gt;
* Parker Phinney (pyrak) [Former CC Intern]&lt;br /&gt;
&lt;br /&gt;
=== Thursday, September 17, 2009 ===&lt;br /&gt;
&lt;br /&gt;
* Nathan Yergler (nathany) [CC Staff]&lt;br /&gt;
* Alex Kozak (akozak) [CC Staff]&lt;br /&gt;
* Nathan Kinkade (nkinkade) [CC Staff]&lt;br /&gt;
* Greg Grossmeier (greg-g) [CC Staff]&lt;br /&gt;
* Michelle Thorne [CC Staff]&lt;br /&gt;
* Parker Phinney (pyrak) [Former CC Intern]&lt;br /&gt;
&lt;br /&gt;
=== Friday, September 18, 2009 ===&lt;br /&gt;
&lt;br /&gt;
* Nathan Yergler (nathany) [CC Staff]&lt;br /&gt;
* Alex Kozak (akozak) [CC Staff]&lt;br /&gt;
* Nathan Kinkade (nkinkade) [CC Staff]&lt;br /&gt;
* Greg Grossmeier (greg-g) [CC Staff]&lt;br /&gt;
* Aurelia J. Schultz [CC Staff]&lt;br /&gt;
* Parker Phinney (pyrak) [Former CC Intern]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25546</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25546"/>
				<updated>2009-08-07T21:26:12Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: /* Sample Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Project&lt;br /&gt;
|Description=LicenseChooser.js provides a lightweight method for integrating license selection into web applications.&lt;br /&gt;
|Bug tracker=http://code.creativecommons.org/issues/&lt;br /&gt;
|Code repository=http://code.creativecommons.org/viewsvn/jswidget/&lt;br /&gt;
|Mailing list=http://lists.ibiblio.org/mailman/listinfo/cc-devel&lt;br /&gt;
}}&lt;br /&gt;
{{Project}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget (LicenseChooser.js) provides an additional, lightweight method for integrating license selection into web applications.  The widget is used by TypePad, as well as [[WpLicense]].&lt;br /&gt;
&lt;br /&gt;
'''LicenseChooser.js is nearly ready!  Please try the [http://code.creativecommons.org/viewsvn/jswidget/tags/0.97/ 0.97 preview].'''&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
* [[WpLicense]] uses LicenseChooser.js to provide a license selector for WordPress&lt;br /&gt;
* TypePad provides [http://everything.typepad.com/cc/ a widget] for adding a license to hosted blogs.&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html CC License selector only]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-openness.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage (all options visible)]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?show_jurisdiction_chooser=n to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?default_option=no-license&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?show_no-license_option=n to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* Jswidget uses javascript magic to pull in a stylesheet, whether you want it to or not.  Luckily, it puts the stylesheet at the very top of the header, so that you can easily override styles by including your own style sheet.  We encourage you to write your own style sheet that builds on the one we've provided and personalized the look and feel of the widget to match your web app.&lt;br /&gt;
&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
=== Full List of Query String Variables ===&lt;br /&gt;
&lt;br /&gt;
* show_jurisdiction_chooser=(y/n)&lt;br /&gt;
**show/hide jurisdiction chooser&lt;br /&gt;
* show_cc0_option=(y/n);&lt;br /&gt;
**show/hide &amp;quot;CC0&amp;quot; option&lt;br /&gt;
* show_cc-license_option=(y/n);&lt;br /&gt;
**show/hide &amp;quot;CC license&amp;quot; option&lt;br /&gt;
* show_no-license_option=(y/n);&lt;br /&gt;
**show/hide &amp;quot;No license&amp;quot; option&lt;br /&gt;
*default_option=(cc0/cc-license/no-license);&lt;br /&gt;
**choose which option is present to the user first&lt;br /&gt;
*locale=(locale, ie 'en_US')&lt;br /&gt;
**choose language&lt;br /&gt;
&lt;br /&gt;
You can specify as many of these options as you like by simply putting an '&amp;amp;' between them.&lt;br /&gt;
&lt;br /&gt;
==== Examples: ====&lt;br /&gt;
&lt;br /&gt;
*complete.js?locale=en_US&amp;amp;amp;show_jurisdiction_chooser=n&amp;amp;amp;default_option=cc-license&amp;amp;show_no-license_option=n&lt;br /&gt;
**Selector defaults to CC license chooser, is in US English, does not include a jurisdiction chooser, and does not include a &amp;quot;No license&amp;quot; option&lt;br /&gt;
*?locale=en_US&amp;amp;default_option=no-license&amp;amp;show_cc0_option=n&lt;br /&gt;
**Selector in US English which defaults to the &amp;quot;No license&amp;quot; option and doesn't include the cc0 option&lt;br /&gt;
&lt;br /&gt;
==== Defaults ====&lt;br /&gt;
&lt;br /&gt;
Currently, by default everything is displayed, and the CC license chooser is the default option.  Thus, this query will return the exact same widget as the empty &amp;quot;complete.js&amp;quot;&lt;br /&gt;
&lt;br /&gt;
complete.js?show_jurisdiction_chooser=y&amp;amp;show_cc0_option=y&amp;amp;show_cc-license_option=y&amp;amp;show_no-license_option=y&amp;amp;default_option=cc-license&lt;br /&gt;
&lt;br /&gt;
(note that in this case, Apache content negotiation will be used to determine which language to use)&lt;br /&gt;
&lt;br /&gt;
You might consider passing query string variables that assert settings that would be true due to default behavior anyway--this ensures that on the off chance that default behavior changes, your widget's behavior does not.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25545</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25545"/>
				<updated>2009-08-07T21:13:48Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Project&lt;br /&gt;
|Description=LicenseChooser.js provides a lightweight method for integrating license selection into web applications.&lt;br /&gt;
|Bug tracker=http://code.creativecommons.org/issues/&lt;br /&gt;
|Code repository=http://code.creativecommons.org/viewsvn/jswidget/&lt;br /&gt;
|Mailing list=http://lists.ibiblio.org/mailman/listinfo/cc-devel&lt;br /&gt;
}}&lt;br /&gt;
{{Project}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget (LicenseChooser.js) provides an additional, lightweight method for integrating license selection into web applications.  The widget is used by TypePad, as well as [[WpLicense]].&lt;br /&gt;
&lt;br /&gt;
'''LicenseChooser.js is nearly ready!  Please try the [http://code.creativecommons.org/viewsvn/jswidget/tags/0.97/ 0.97 preview].'''&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
* [[WpLicense]] uses LicenseChooser.js to provide a license selector for WordPress&lt;br /&gt;
* TypePad provides [http://everything.typepad.com/cc/ a widget] for adding a license to hosted blogs.&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Jswidget-0.2-screenshot.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html CC License selector only]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-openness.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage (all options visible)]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?show_jurisdiction_chooser=n to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?default_option=no-license&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?show_no-license_option=n to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* Jswidget uses javascript magic to pull in a stylesheet, whether you want it to or not.  Luckily, it puts the stylesheet at the very top of the header, so that you can easily override styles by including your own style sheet.  We encourage you to write your own style sheet that builds on the one we've provided and personalized the look and feel of the widget to match your web app.&lt;br /&gt;
&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
=== Full List of Query String Variables ===&lt;br /&gt;
&lt;br /&gt;
* show_jurisdiction_chooser=(y/n)&lt;br /&gt;
**show/hide jurisdiction chooser&lt;br /&gt;
* show_cc0_option=(y/n);&lt;br /&gt;
**show/hide &amp;quot;CC0&amp;quot; option&lt;br /&gt;
* show_cc-license_option=(y/n);&lt;br /&gt;
**show/hide &amp;quot;CC license&amp;quot; option&lt;br /&gt;
* show_no-license_option=(y/n);&lt;br /&gt;
**show/hide &amp;quot;No license&amp;quot; option&lt;br /&gt;
*default_option=(cc0/cc-license/no-license);&lt;br /&gt;
**choose which option is present to the user first&lt;br /&gt;
*locale=(locale, ie 'en_US')&lt;br /&gt;
**choose language&lt;br /&gt;
&lt;br /&gt;
You can specify as many of these options as you like by simply putting an '&amp;amp;' between them.&lt;br /&gt;
&lt;br /&gt;
==== Examples: ====&lt;br /&gt;
&lt;br /&gt;
*complete.js?locale=en_US&amp;amp;amp;show_jurisdiction_chooser=n&amp;amp;amp;default_option=cc-license&amp;amp;show_no-license_option=n&lt;br /&gt;
**Selector defaults to CC license chooser, is in US English, does not include a jurisdiction chooser, and does not include a &amp;quot;No license&amp;quot; option&lt;br /&gt;
*?locale=en_US&amp;amp;default_option=no-license&amp;amp;show_cc0_option=n&lt;br /&gt;
**Selector in US English which defaults to the &amp;quot;No license&amp;quot; option and doesn't include the cc0 option&lt;br /&gt;
&lt;br /&gt;
==== Defaults ====&lt;br /&gt;
&lt;br /&gt;
Currently, by default everything is displayed, and the CC license chooser is the default option.  Thus, this query will return the exact same widget as the empty &amp;quot;complete.js&amp;quot;&lt;br /&gt;
&lt;br /&gt;
complete.js?show_jurisdiction_chooser=y&amp;amp;show_cc0_option=y&amp;amp;show_cc-license_option=y&amp;amp;show_no-license_option=y&amp;amp;default_option=cc-license&lt;br /&gt;
&lt;br /&gt;
(note that in this case, Apache content negotiation will be used to determine which language to use)&lt;br /&gt;
&lt;br /&gt;
You might consider passing query string variables that assert settings that would be true due to default behavior anyway--this ensures that on the off chance that default behavior changes, your widget's behavior does not.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25544</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25544"/>
				<updated>2009-08-07T21:11:35Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: /* Full List of Query String Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Project&lt;br /&gt;
|Description=LicenseChooser.js provides a lightweight method for integrating license selection into web applications.&lt;br /&gt;
|Bug tracker=http://code.creativecommons.org/issues/&lt;br /&gt;
|Code repository=http://code.creativecommons.org/viewsvn/jswidget/&lt;br /&gt;
|Mailing list=http://lists.ibiblio.org/mailman/listinfo/cc-devel&lt;br /&gt;
}}&lt;br /&gt;
{{Project}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget (LicenseChooser.js) provides an additional, lightweight method for integrating license selection into web applications.  The widget is used by TypePad, as well as [[WpLicense]].&lt;br /&gt;
&lt;br /&gt;
'''LicenseChooser.js is nearly ready!  Please try the [http://code.creativecommons.org/viewsvn/jswidget/tags/0.97/ 0.97 preview].'''&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
* [[WpLicense]] uses LicenseChooser.js to provide a license selector for WordPress&lt;br /&gt;
* TypePad provides [http://everything.typepad.com/cc/ a widget] for adding a license to hosted blogs.&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Jswidget-0.2-screenshot.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html CC License selector only]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-openness.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage (all options visible)]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?show_jurisdiction_chooser=n to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?default_option=no-license&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?show_no-license_option=n to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* Jswidget uses javascript magic to pull in a stylesheet, whether you want it to or not.  Luckily, it puts the stylesheet at the very top of the header, so that you can easily override styles by including your own style sheet.  We encourage you to write your own style sheet that builds on the one we've provided and personalized the look and feel of the widget to match your web app.&lt;br /&gt;
&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
=== Full List of Query String Variables ===&lt;br /&gt;
&lt;br /&gt;
* show_jurisdiction_chooser=(y/n)&lt;br /&gt;
**show/hide jurisdiction chooser&lt;br /&gt;
* show_cc0_option=(y/n);&lt;br /&gt;
**show/hide &amp;quot;CC0&amp;quot; option&lt;br /&gt;
* show_cc-license_option=(y/n);&lt;br /&gt;
**show/hide &amp;quot;CC license&amp;quot; option&lt;br /&gt;
* show_no-license_option=(y/n);&lt;br /&gt;
**show/hide &amp;quot;No license&amp;quot; option&lt;br /&gt;
*default_option=(cc0/cc-license/no-license);&lt;br /&gt;
**choose which option is present to the user first&lt;br /&gt;
*locale=(locale, ie 'en_US')&lt;br /&gt;
**choose language&lt;br /&gt;
&lt;br /&gt;
You can specify as many of these options as you like by simply putting an '&amp;amp;' between them.&lt;br /&gt;
&lt;br /&gt;
== Examples: ==&lt;br /&gt;
&lt;br /&gt;
*complete.js?locale=en_US&amp;amp;amp;show_jurisdiction_chooser=n&amp;amp;amp;default_option=cc-license&amp;amp;show_no-license_option=n&lt;br /&gt;
**Selector defaults to CC license chooser, is in US English, does not include a jurisdiction chooser, and does not include a &amp;quot;No license&amp;quot; option&lt;br /&gt;
*?locale=en_US&amp;amp;default_option=no-license&amp;amp;show_cc0_option=n&lt;br /&gt;
**Selector in US English which defaults to the &amp;quot;No license&amp;quot; option and doesn't include the cc0 option&lt;br /&gt;
&lt;br /&gt;
== Defaults ==&lt;br /&gt;
&lt;br /&gt;
Currently, by default everything is displayed, and the CC license chooser is the default option.  Thus, this query will return the exact same widget as the empty &amp;quot;complete.js&amp;quot;&lt;br /&gt;
&lt;br /&gt;
complete.js?show_jurisdiction_chooser=y&amp;amp;show_cc0_option=y&amp;amp;show_cc-license_option=y&amp;amp;show_no-license_option=y&amp;amp;default_option=cc-license&lt;br /&gt;
&lt;br /&gt;
(note that in this case, Apache content negotiation will be used to determine which language to use)&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25543</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25543"/>
				<updated>2009-08-07T20:53:21Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: /* Namespacing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Project&lt;br /&gt;
|Description=LicenseChooser.js provides a lightweight method for integrating license selection into web applications.&lt;br /&gt;
|Bug tracker=http://code.creativecommons.org/issues/&lt;br /&gt;
|Code repository=http://code.creativecommons.org/viewsvn/jswidget/&lt;br /&gt;
|Mailing list=http://lists.ibiblio.org/mailman/listinfo/cc-devel&lt;br /&gt;
}}&lt;br /&gt;
{{Project}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget (LicenseChooser.js) provides an additional, lightweight method for integrating license selection into web applications.  The widget is used by TypePad, as well as [[WpLicense]].&lt;br /&gt;
&lt;br /&gt;
'''LicenseChooser.js is nearly ready!  Please try the [http://code.creativecommons.org/viewsvn/jswidget/tags/0.97/ 0.97 preview].'''&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
* [[WpLicense]] uses LicenseChooser.js to provide a license selector for WordPress&lt;br /&gt;
* TypePad provides [http://everything.typepad.com/cc/ a widget] for adding a license to hosted blogs.&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Jswidget-0.2-screenshot.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html CC License selector only]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-openness.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage (all options visible)]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?show_jurisdiction_chooser=n to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?default_option=no-license&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?show_no-license_option=n to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* Jswidget uses javascript magic to pull in a stylesheet, whether you want it to or not.  Luckily, it puts the stylesheet at the very top of the header, so that you can easily override styles by including your own style sheet.  We encourage you to write your own style sheet that builds on the one we've provided and personalized the look and feel of the widget to match your web app.&lt;br /&gt;
&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
=== Full List of Query String Variables ===&lt;br /&gt;
&lt;br /&gt;
* show_jurisdiction_chooser = (y/n)&lt;br /&gt;
**show/hide jurisdiction chooser&lt;br /&gt;
* show_cc0_option = (y/n);&lt;br /&gt;
**show/hide &amp;quot;CC0&amp;quot; option&lt;br /&gt;
* show_cc-license_option = (y/n);&lt;br /&gt;
**show/hide &amp;quot;CC license&amp;quot; option&lt;br /&gt;
* show_no-license_option = (y/n);&lt;br /&gt;
**show/hide &amp;quot;No license&amp;quot; option&lt;br /&gt;
*default_option = (cc0/cc-license/no-license);&lt;br /&gt;
**choose which option is present to the user first&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25542</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25542"/>
				<updated>2009-08-07T20:35:42Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: /* Extra features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Project&lt;br /&gt;
|Description=LicenseChooser.js provides a lightweight method for integrating license selection into web applications.&lt;br /&gt;
|Bug tracker=http://code.creativecommons.org/issues/&lt;br /&gt;
|Code repository=http://code.creativecommons.org/viewsvn/jswidget/&lt;br /&gt;
|Mailing list=http://lists.ibiblio.org/mailman/listinfo/cc-devel&lt;br /&gt;
}}&lt;br /&gt;
{{Project}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget (LicenseChooser.js) provides an additional, lightweight method for integrating license selection into web applications.  The widget is used by TypePad, as well as [[WpLicense]].&lt;br /&gt;
&lt;br /&gt;
'''LicenseChooser.js is nearly ready!  Please try the [http://code.creativecommons.org/viewsvn/jswidget/tags/0.97/ 0.97 preview].'''&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
* [[WpLicense]] uses LicenseChooser.js to provide a license selector for WordPress&lt;br /&gt;
* TypePad provides [http://everything.typepad.com/cc/ a widget] for adding a license to hosted blogs.&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Jswidget-0.2-screenshot.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html CC License selector only]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-openness.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage (all options visible)]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?show_jurisdiction_chooser=n to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?default_option=no-license&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?show_no-license_option=n to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* Jswidget uses javascript magic to pull in a stylesheet, whether you want it to or not.  Luckily, it puts the stylesheet at the very top of the header, so that you can easily override styles by including your own style sheet.  We encourage you to write your own style sheet that builds on the one we've provided and personalized the look and feel of the widget to match your web app.&lt;br /&gt;
&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25541</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25541"/>
				<updated>2009-08-07T20:19:43Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: /* Disabling jurisdiction selection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Project&lt;br /&gt;
|Description=LicenseChooser.js provides a lightweight method for integrating license selection into web applications.&lt;br /&gt;
|Bug tracker=http://code.creativecommons.org/issues/&lt;br /&gt;
|Code repository=http://code.creativecommons.org/viewsvn/jswidget/&lt;br /&gt;
|Mailing list=http://lists.ibiblio.org/mailman/listinfo/cc-devel&lt;br /&gt;
}}&lt;br /&gt;
{{Project}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget (LicenseChooser.js) provides an additional, lightweight method for integrating license selection into web applications.  The widget is used by TypePad, as well as [[WpLicense]].&lt;br /&gt;
&lt;br /&gt;
'''LicenseChooser.js is nearly ready!  Please try the [http://code.creativecommons.org/viewsvn/jswidget/tags/0.97/ 0.97 preview].'''&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
* [[WpLicense]] uses LicenseChooser.js to provide a license selector for WordPress&lt;br /&gt;
* TypePad provides [http://everything.typepad.com/cc/ a widget] for adding a license to hosted blogs.&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Jswidget-0.2-screenshot.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html CC License selector only]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-openness.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage (all options visible)]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?show_jurisdiction_chooser=n to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?want_a_license= no_license_by_default&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?want_a_license=definitely to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* You can use the example style provided in the example application to get you going.  We '''urge''' you to put this file on your own web server and not rely on the copy hosted on labs.creativecommons.org.&lt;br /&gt;
* What we really want you to do is to change the style of our divs and spans and so-forth to make them fit in to your application.  To do that, you should copy the example style file into one of your own CSS files and modify it until you really like it.&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25535</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25535"/>
				<updated>2009-08-07T18:44:33Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: /* Sample Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Project&lt;br /&gt;
|Description=LicenseChooser.js provides a lightweight method for integrating license selection into web applications.&lt;br /&gt;
|Bug tracker=http://code.creativecommons.org/issues/&lt;br /&gt;
|Code repository=http://code.creativecommons.org/viewsvn/jswidget/&lt;br /&gt;
|Mailing list=http://lists.ibiblio.org/mailman/listinfo/cc-devel&lt;br /&gt;
}}&lt;br /&gt;
{{Project}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget (LicenseChooser.js) provides an additional, lightweight method for integrating license selection into web applications.  The widget is used by TypePad, as well as [[WpLicense]].&lt;br /&gt;
&lt;br /&gt;
'''LicenseChooser.js is nearly ready!  Please try the [http://code.creativecommons.org/viewsvn/jswidget/tags/0.97/ 0.97 preview].'''&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
* [[WpLicense]] uses LicenseChooser.js to provide a license selector for WordPress&lt;br /&gt;
* TypePad provides [http://everything.typepad.com/cc/ a widget] for adding a license to hosted blogs.&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Jswidget-0.2-screenshot.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html CC License selector only]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-openness.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage (all options visible)]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?jurisdictions=disabled to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?want_a_license= no_license_by_default&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?want_a_license=definitely to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* You can use the example style provided in the example application to get you going.  We '''urge''' you to put this file on your own web server and not rely on the copy hosted on labs.creativecommons.org.&lt;br /&gt;
* What we really want you to do is to change the style of our divs and spans and so-forth to make them fit in to your application.  To do that, you should copy the example style file into one of your own CSS files and modify it until you really like it.&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25534</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25534"/>
				<updated>2009-08-07T18:41:08Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Project&lt;br /&gt;
|Description=LicenseChooser.js provides a lightweight method for integrating license selection into web applications.&lt;br /&gt;
|Bug tracker=http://code.creativecommons.org/issues/&lt;br /&gt;
|Code repository=http://code.creativecommons.org/viewsvn/jswidget/&lt;br /&gt;
|Mailing list=http://lists.ibiblio.org/mailman/listinfo/cc-devel&lt;br /&gt;
}}&lt;br /&gt;
{{Project}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget (LicenseChooser.js) provides an additional, lightweight method for integrating license selection into web applications.  The widget is used by TypePad, as well as [[WpLicense]].&lt;br /&gt;
&lt;br /&gt;
'''LicenseChooser.js is nearly ready!  Please try the [http://code.creativecommons.org/viewsvn/jswidget/tags/0.97/ 0.97 preview].'''&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
* [[WpLicense]] uses LicenseChooser.js to provide a license selector for WordPress&lt;br /&gt;
* TypePad provides [http://everything.typepad.com/cc/ a widget] for adding a license to hosted blogs.&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Jswidget-0.2-screenshot.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html CC License selector only]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-openness.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?jurisdictions=disabled to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?want_a_license= no_license_by_default&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?want_a_license=definitely to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* You can use the example style provided in the example application to get you going.  We '''urge''' you to put this file on your own web server and not rely on the copy hosted on labs.creativecommons.org.&lt;br /&gt;
* What we really want you to do is to change the style of our divs and spans and so-forth to make them fit in to your application.  To do that, you should copy the example style file into one of your own CSS files and modify it until you really like it.&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25533</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25533"/>
				<updated>2009-08-07T18:34:56Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Project&lt;br /&gt;
|Description=LicenseChooser.js provides a lightweight method for integrating license selection into web applications.&lt;br /&gt;
|Bug tracker=http://code.creativecommons.org/issues/&lt;br /&gt;
|Code repository=http://code.creativecommons.org/viewsvn/jswidget/&lt;br /&gt;
|Mailing list=http://lists.ibiblio.org/mailman/listinfo/cc-devel&lt;br /&gt;
}}&lt;br /&gt;
{{Project}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget (LicenseChooser.js) provides an additional, lightweight method for integrating license selection into web applications.  The widget is used by TypePad, as well as [[WpLicense]].&lt;br /&gt;
&lt;br /&gt;
'''LicenseChooser.js is nearly ready!  Please try the [http://code.creativecommons.org/viewsvn/jswidget/tags/0.97/ 0.97 preview].'''&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
* [[WpLicense]] uses LicenseChooser.js to provide a license selector for WordPress&lt;br /&gt;
* TypePad provides [http://everything.typepad.com/cc/ a widget] for adding a license to hosted blogs.&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Jswidget-0.2-screenshot.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?jurisdictions=disabled to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?want_a_license= no_license_by_default&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?want_a_license=definitely to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* You can use the example style provided in the example application to get you going.  We '''urge''' you to put this file on your own web server and not rely on the copy hosted on labs.creativecommons.org.&lt;br /&gt;
* What we really want you to do is to change the style of our divs and spans and so-forth to make them fit in to your application.  To do that, you should copy the example style file into one of your own CSS files and modify it until you really like it.&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25399</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25399"/>
				<updated>2009-07-30T21:30:14Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[content starts here]&lt;br /&gt;
TODO:&lt;br /&gt;
*new screenshot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Jswidget-0.2-screenshot.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?jurisdictions=disabled to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?want_a_license= no_license_by_default&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?want_a_license=definitely to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* You can use the example style provided in the example application to get you going.  We '''urge''' you to put this file on your own web server and not rely on the copy hosted on labs.creativecommons.org.&lt;br /&gt;
* What we really want you to do is to change the style of our divs and spans and so-forth to make them fit in to your application.  To do that, you should copy the example style file into one of your own CSS files and modify it until you really like it.&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25398</id>
		<title>Jswidget new</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Jswidget_new&amp;diff=25398"/>
				<updated>2009-07-30T21:27:53Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: Created page with ' [content starts here]  == Sample Usage ==  &amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt; Image:Jswidget-0.2-screenshot.png &amp;lt;/div&amp;gt;  You can read the source of these examples; they demonstr…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[content starts here]&lt;br /&gt;
&lt;br /&gt;
== Sample Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Jswidget-0.2-screenshot.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read the source of these examples; they demonstrate some (but not all) of the combinations for advanced usage described below.&lt;br /&gt;
&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/ Basic usage]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/inside_form.html Basic usage from inside another form tag]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/default-is-no-license.html Selector where &amp;quot;no license&amp;quot; is the starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/without-jurisdiction.html Selector without a jurisdiction choice]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed.html Selector with a specific license used as a starting point]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-without-jurisdiction.html Selector with a specific license as a starting point with no jurisdiction selector, always using the &amp;quot;seeded&amp;quot; jurisdiction]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/with-seed-old-version.html Selector where an old license version was given as the seed]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/language-detect.html Selector that relies on Apache Content Negotiation for translations]&lt;br /&gt;
* [http://labs.creativecommons.org/jswidget/tags/0.97/example_web_app/definitely-want-license.html Selector without the choice of &amp;quot;No license&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
You can play with a 0.97 pre-release right now!&lt;br /&gt;
* 2009-04-29: [http://mirrors.creativecommons.org/software/licensechooser-js/licensechooser-js-0.97.tar.gz Released 0.97].  '''This is the latest preview that is very close to 1.0.'''  This release allows you to embed LicenseChooser.js inside a form tag. Thanks to John Horigan for reporting this issue and providing a patch (which we merged with some changes).&lt;br /&gt;
* 2009-03-16: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.96]. The help text for &amp;quot;Share alike&amp;quot; was wrong, mistakenly giving you the non-commercial help text. Fixed! This is an important update.&lt;br /&gt;
* 2008-09-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.95].  An anonymous bug reporter indicated that we overwrite the first JavaScript file found, even if it is not LicenseChooser.js. Fixed!  This is an important update.&lt;br /&gt;
* 2008-08-27: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.94].  Stylistic issue found: image not always properly aligned with text in pop-up describing e.g. Share-Alike.  We no longer user document.write() (yuck) to insert the HTML of the widget into the document; we now modify the innerHTML of a div we create ourselves.  We may further harden the JS against namespace collisions with [http://kentbrewster.com/badges Kent Brewster's badges] strategy.&lt;br /&gt;
* 2007-10-10: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.92]. Stylistic updates: Alex has gone to town on the chooser and styled it.  It only shows jurisdictions that have launched. There are no known pending technical or visual issues.&lt;br /&gt;
* 2007-08-23: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.91]. The license selector allows one to remove the jurisdiction selector.  There is a &amp;quot;No license&amp;quot; choice.  Translation is done using JavaScript and not hidden DOM elements.  Application developers have more control over the defaults, including &amp;quot;no license&amp;quot; being choosable as the default.&lt;br /&gt;
* 2007-08-09: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.9].   We've changed the plan to add some features before 1.0 based on talking with potential users. All DOM elements are '''really''' prefixed with cc_js_ this time, and all strings '''really''' are available for translation this time.  Documentation is updated for the 0.9 release, including a way to have the application developer specify only a single jurisdiction for the license.  JSON output is validated before being sent to a web browser.  Removed dependency on prototype.js.  Server code changes to improve performance.  Massive reduction of unused JS and CSS (this process began with 0.4).&lt;br /&gt;
* 2007-08-06: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.4]. All DOM elements are prefixed with cc_js_.  The widget works in Opera and Safari and works with degraded functionality in Konqueror.&lt;br /&gt;
* 2007-08-01: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.3].  This release introduces Internet Explorer compatibility, Apache Content Negotiation to handle user language selection even if the server doesn't provide it for us, a hopefully-stable API for selecting a license, and license seeding.&lt;br /&gt;
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.&lt;br /&gt;
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&amp;amp;package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.&lt;br /&gt;
&lt;br /&gt;
== Extra features ==&lt;br /&gt;
=== &amp;quot;Seeding&amp;quot; ===&lt;br /&gt;
* If the user has already selected a license through some other means, and you want to &amp;quot;seed&amp;quot; the JavaScript widget with the choices the user has already made, just create a hidden form field whose ID is cc_js_seed_uri with the URI of the license you want to start with.&lt;br /&gt;
** NOTE that whatever license version you provide, we always upgrade it to the most recent version the jurisdiction offers.  We do display a '''Message''' underneath the license icon saying we did this.&lt;br /&gt;
=== Forcing a particular jurisdiction ===&lt;br /&gt;
To force the user to choose a license in a particular jurisdiction:&lt;br /&gt;
* First, use the &amp;quot;seeding&amp;quot; feature to seed the Attribution (&amp;quot;by&amp;quot;) license in your jurisdiction&lt;br /&gt;
* Then, disable jurisdiction selection&lt;br /&gt;
=== Disabling jurisdiction selection ===&lt;br /&gt;
If you want to not offer the user a choice of jurisdictions:&lt;br /&gt;
* just append ?jurisdictions=disabled to the complete.js call.&lt;br /&gt;
&lt;br /&gt;
=== Setting the license chooser to no license by default ===&lt;br /&gt;
If you want to set the license chooser to no license by default:&lt;br /&gt;
* just append ?want_a_license= no_license_by_default&lt;br /&gt;
&lt;br /&gt;
=== Removing the &amp;quot;No license&amp;quot; option ===&lt;br /&gt;
If you want to not offer the user the option of selecting &amp;quot;no license:&lt;br /&gt;
* just append ?want_a_license=definitely to the query string&lt;br /&gt;
=== Language selection ===&lt;br /&gt;
* You can append ?locale=XX to your call to complete.js to choose a language.  The example distributed as index.html in the distribution package sets the language to US English this way.&lt;br /&gt;
* If omitted, Apache Content Negotiation will select the most appropriate language based on the user's preferences, defaulting to US English.&lt;br /&gt;
=== Extracting results ===&lt;br /&gt;
All of these result extraction systems are demonstrated in the examples.&lt;br /&gt;
* There are two hidden form fields called '''cc_js_result_uri''' and '''cc_js_result_name''' that respectively store the URI and name of the license selected by the user.  Just do &amp;lt;code&amp;gt;document.getElementById(&amp;quot;cc_js_result_uri&amp;quot;).value&amp;lt;/code&amp;gt; (or &amp;quot;cc_js_result_name&amp;quot; instead) and you'll have the license information.&lt;br /&gt;
* There is an extra hidden form field containing the link to the image used.  Simply get the element whose ID is '''cc_js_result_img''' and you will have a URL that is a permanent image.  [http://en.wikipedia.org/wiki/Inline_linking Hotlink]ing these images is allowed and encouraged.&lt;br /&gt;
&lt;br /&gt;
=== Styling ===&lt;br /&gt;
* You can use the example style provided in the example application to get you going.  We '''urge''' you to put this file on your own web server and not rely on the copy hosted on labs.creativecommons.org.&lt;br /&gt;
* What we really want you to do is to change the style of our divs and spans and so-forth to make them fit in to your application.  To do that, you should copy the example style file into one of your own CSS files and modify it until you really like it.&lt;br /&gt;
=== Namespacing ===&lt;br /&gt;
* All LicenseChooser.js HTML elements that have IDs or classes start with &amp;quot;cc_js_&amp;quot; to avoid namespace collisions.&lt;br /&gt;
* Similarly, all LicenseChooser.js JavaScript functions start with cc_js_.  This is '''not''' true for the bundled Prototype.js library.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
The following list of general goals to remind us what we want out of LicenseChooser.js.  You can expect most of it for 1.0.&lt;br /&gt;
&lt;br /&gt;
See [[JsWidget/Plan]] to see what features are planned for what versions.&lt;br /&gt;
&lt;br /&gt;
* Generate HTML suitable for use in a form which presents the basic license selector&lt;br /&gt;
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]&lt;br /&gt;
* Provide up to date license information by&lt;br /&gt;
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.&lt;br /&gt;
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.&lt;br /&gt;
* Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public&lt;br /&gt;
&lt;br /&gt;
== Version expectations ==&lt;br /&gt;
=== Zero point something (like 0.4) ===&lt;br /&gt;
There are no guarantees, but we'd like to keep to the same promises as a 1.0 release&lt;br /&gt;
=== Something point zero (like 1.0) ===&lt;br /&gt;
We guarantee (outside of really urgent situation where we exercise a judgement call) that these will '''not''' change:&lt;br /&gt;
* The programmatic interface for the widget will not change&lt;br /&gt;
* The user interface for selecting licenses will not change&lt;br /&gt;
&lt;br /&gt;
The following are the only things that '''may'' change:&lt;br /&gt;
* As new translations become available, the text may become increasingly internationalized&lt;br /&gt;
* As jurisdictions offer new licenses, the engine will update the choices available to a user&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://code.creativecommons.org/viewsvn/jswidget/ LicenseChooser.js development in Subversion]&lt;br /&gt;
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]&lt;br /&gt;
* [[JsWidget/Security|Security considerations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Integration]]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=CcValidator&amp;diff=24355</id>
		<title>CcValidator</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=CcValidator&amp;diff=24355"/>
				<updated>2009-06-29T21:07:49Z</updated>
		
		<summary type="html">&lt;p&gt;Gameguy43: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Tools]]&lt;br /&gt;
&lt;br /&gt;
ccValidator is an on-line service which parses Creative Commons licenses, validates the RDF and displays their contents in human readable form.  It is useful for ensuring that your license accurately reflects the rights you wish to reserve (or not).  The service is available from the Creative Commons website, at http://validator.creativecommons.org.&lt;br /&gt;
&lt;br /&gt;
This service was first created in response to a list of [[Developer Challenges|developer challenges]] published by the Creative Commons and totally revamped during Google Summer of Code 2008.  Suggestions and bug reports are always welcome.  You can e-mail them to software@creativecommons.org.  &lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
The validator consists of a Pylons web app called &amp;quot;validator&amp;quot; and a Python support module called &amp;quot;libvalidator.&amp;quot; libvalidator handles RDF in many formats; RDF in a comment, RDFa, or inline RDF/XML. HTML is processed by html5lib, and the RDF is passed on to RDFlib. The CC RDF information is accessed via the cc.license Python module that wraps the Creative Commons RDF data.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The current implementation is available in git. Setting up the validator requires three modules:&lt;br /&gt;
&lt;br /&gt;
* cc.license&lt;br /&gt;
* libvalidator&lt;br /&gt;
* validator&lt;br /&gt;
&lt;br /&gt;
(If you are not familiar with our git repository, read our [[Source Repository Information#git|documentation on our source repositories]].)&lt;br /&gt;
&lt;br /&gt;
If you don't mind cluttering up your PYTHONPATH, the easiest way to get going to is to clone each of these and run &amp;quot;python setup.py install&amp;quot;. After that, read the README in the validator repository; you can easily launch the validator web application, by default listening on localhost port 5000.&lt;br /&gt;
&lt;br /&gt;
== Demonstration ==&lt;br /&gt;
&lt;br /&gt;
The validator can validate both our old RDF-in-a-comment and the recommendation from here on out, RDFa. The validator's [http://validator.creativecommons.org/ front page] links to these sample documents.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
&lt;br /&gt;
'''Bug reports''' should be submitted via the [http://code.creativecommons.org/issues CC issue tracker].&lt;br /&gt;
&lt;br /&gt;
* Historical development notes are in [[User:NathanYergler|Nathan Yergler's]] blog; the ccValidate-specific archive is located [http://yergler.net/blog/category/projects/ccvalidator/ here]. The historical ccValidator code is currently unavailable, but that codebase is unrelated to the current codebase (whose history is preserved in git).&lt;br /&gt;
* Hugo's posts about Google Summer of Code development process:&lt;br /&gt;
** [http://labs.creativecommons.org/2008/05/26/license%E2%80%91oriented-metadata-validator-and-viewer-the-development-has-just-started/ Start of summer post announcing Hugo's plans]&lt;br /&gt;
** [http://labs.creativecommons.org/2008/07/08/license-oriented-metadata-validator-and-viewer-libvalidator/ Middle of summer post explaining the separation of libvalidator]&lt;br /&gt;
** [http://labs.creativecommons.org/2008/08/16/license-oriented-metadata-validator-and-viewer-summertime-is-winding-up/ Beta release at the end of GSoC]&lt;/div&gt;</summary>
		<author><name>Gameguy43</name></author>	</entry>

	</feed>