Licenses
Questions answered by this recipe
How can I allow authors to display a Creative Commons license in pages?
Description
This recipe enables a (:license:)
markup, which allows authors to embed common licensing links (such as Creative Commons licenses) into pages.
To install the recipe, simply download licenses.phpΔ into the cookbook/
directory, and then add the line below to a local customization file:
include_once('cookbook/licenses.php');
Once installed, the recipe enables the (:license:)
markup, which can be used to display a variety of licenses based on its parameter:
(:license by-nc-nd:) CC Attribution Non-commercial No Derivatives (:license by-nc-sa:) CC Attribution Non-commercial Share Alike (:license by-nc:) CC Attribution Non-commercial (:license by-nd:) CC Attribution No Derivatives (:license by-sa:) CC Attribution Share Alike (:license by:) CC Attribution (:license pd:) Public Domain (:license:) site default license, configured by $LicenseDefault
(:license by-nc-sa:) |
WikiStyles can be used to alter the appearance and behavior of the directive, thus
%rframe newwin% (:license pd:) |
Notes
See other contributions and customizations of this recipe at Licenses-Talk.
History
- 20231127 updated for PHP 8.2, updated links to the most recent 4.0 versions of the licenses, links to new SVG buttons, added $LicenseVersion and $LicenseFmt variables.
- 20180415: updated for PHP 7.2, replace all URLs with the https: protocol.
- 20150821: updated for PHP 5.5.
- 20070215: Corrected bug with 'pd' license. Allow either uppercase or lowercase specifications.
Comments
- It would also be nice if the recipe included links to other licenses, e.g. different GPL and BSD. chr
See discussion at Licenses-Talk.
See Also
Contributors
User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.