Module:CCLicense/doc
This is the documentation page for Module:CCLicense
This module processes Creative Commons parameter flags, constructs permissions and restrictions summaries, generates 32px icon strings, and passes metadata and attribution details to Template:License card.
Files are categorized based on the exact license names.
Usage
This module should not be directly used on content pages or files. Use Template:CCLicense or a specific wrapper template (such as
This file is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.
You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
) instead.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
zero / cc0 |
Boolean | false | Generates CC0 Universal Public Domain rights and metadata output. |
by |
Boolean | true (except CC0) | Adds Attribution requirement text (sets metadata attrreq="true").
|
nc |
Boolean | false | Adds NonCommercial restriction text (sets metadata nonfree="true").
|
sa |
Boolean | false | Adds ShareAlike condition text. |
nd |
Boolean | false | Adds NoDerivatives restriction text (removes "to remix" permission, sets metadata nonfree="true", and overrides ShareAlike).
|
version |
String | 4.0 | License version string. |
jurisdiction |
String | Ported country code (e.g., de, us).
| |
attr / attribution / author |
String | Custom attribution entity name passed as attr.
|
Emitted License Card Arguments
title: Formatted license link line (e.g.,This file is licensed under the [...] license.).description: Itemized breakdown of free uses and conditions.icons: Sequence of 32px formatted file links for CC badges.shortname/longname: Machine-readable strings for standard MediaWiki metadata viewers.attr: Passed through when present.
Testing
Run the unit test suite on Module:CCLicense/testcases using:
{{#invoke:CCLicense/testcases|run}}