Rights & licenses badges

 Link See a live example.

 DownloadView and download source code in CONTENTdm Cookbook Demo Site.

 

 

Creative Commons and RightsStatements.org publish documents summarizing the access terms for digital content. In addition to these legal statements, both these organizations have also derived a badge system for making these rights/licenses quickly recognizable. If you have added the URIs for these license providers to your CONTENTdm metadata, this recipe will render the corresponding badge and text descriptions to make the access constraints clearer to end users.

This recipe has multiple pieces, but most of them are hosted on a shared OCLC site to keep the installation process simpler. The files used by this recipe can be viewed and downloaded from the CONTENTdm Cookbook download portal under the Rights & Licenses Badges section.

Because both Creative Commons and RightsStatements.org have provided extensive translations of their rights/licenses, this recipe has been internationalized. This means that if your end users change their UI language the text associated with the badge will change to that language.

The overall installation process for this recipe looks like this:

  1. Upload the language and configuration file that describes all the rights/license statements.
  2. Upload the custom JavaScript file that inserts the appropriate badge based on the URIs found in the item metadata.

Step 1: Upload the language file

All text and badge image information is kept in a single JSON file called rights-1.1.json. Note, this is an updated file from the original release of this recipe. The 1.1 version is not compatible with the previous version of the recipe.

Download the rights-1.1.json and upload it to a directory named js in the Website Configuration Tool on the Global Settings > Custom > Custom Pages dialog using the manage files tool.

Step 2: Add the custom JS file

This recipe uses a JavaScript file to:

This JavaScript file is called rights_licenses-1.1.js and can be downloaded from this recipe on the Cookbook recipe portal. This file is version 1.1 and must be used with version 1.1 of the JSON file in step 1.

If you have no other custom JavaScript running on your website, upload the rights_licenses-1.1.js file in the Website Configuration Tool on the Custom > Custom Scripts dialog. If you already have a JavaScript file added on the Custom Scripts page, you will need to modify that JavaScript file and copy the entire contents of rights_licenses-1.1.js into the main custom JS file for your CONTENTdm site. The code in rights_licenses-1.1.js is contained in a single function so can safely live alongside other JavaScript code. If you are using the Load multiple JavaScript files recipe, you can add rights_licenses-1.1.js to your list of files to be loaded.

After you have uploaded rights_licenses-1.1.js, Save and Publish in the Website Configuration Tool to complete the installation of the recipe.

Verification

To verify this recipe, open your browser and navigate to a CONTENTdm item on your website that you know has a Creative Commons license URI or RightsStatements.org URI in one of the metadata fields. You should see the badge image and other summary text rendered into the metadata section of the item page.