Licenses

Summary: Markup to display licensing info on pages
Version: 20150821
Prerequisites: PmWiki 2.2.58
Status: Stable
License: GPLv2
Maintainer: Petko (original author: Pm)
Categories: Markup PHP72
Discussion: Licenses-Talk

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
Example 1
(:license by-nc-sa:)
Creative Commons License

WikiStyles can be used to alter the appearance and behavior of the directive, thus

Example 2
%rframe newwin% (:license pd:)
Public Domain Dedication

Notes

See other contributions and customizations of this recipe at Licenses-Talk.

History

  • 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

  • Pm, original author.
  • See other contributions at the Talk page.
  • Recipe maintained by Petko.

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.