About Module License Info

Add a License Information to Module Info

Category 1Admin Helpers
Admin helper modules are those that provide helpful tools, UI enhancements or optimizations to the admin panel (excluding Fieldtype or Inputfield modules).
Category 2Development Tools
Modules that have more to do with assisting development of a site rather than managing its content.
Category 3Other Modules
Modules that have a unique purpose not covered by existing categories.
Release StateStable
Should be safe for use in production environments. *
Authorkixe
Module Version1.0.4
Class NameProcessModuleLicense
Compatibility2.4, 2.5, 2.6, 2.7, 3.0
Date AddedOctober 13, 2014
Last UpdatedDecember 7, 2016
Recommended ByNew recommendations may take up to 1 day to appear.

Instructions

This module's files should be placed in /site/modules/ProcessModuleLicense/
How to install or uninstall modules

README

MODULE LICENSE INFO

For Module Developers. This module makes license information visible in module info if set in ModuleInfo array

Use

if installed the two elements license and hreflicense could be added to any module.

public static function getModuleInfo() {

	return array(
		// other stuff
		'license' => 'CC-BY',
		'hreflicense' => 'http://creativecommons.org/licenses/by/4.0/'
	);
}

license

Shortcut of license name. I recommend to use a consistent Syntax.

Some Examples:

  • GNU-GPL
  • GNU-GPLv2
  • CC-BY-NC
  • OPL
  • MIT
  • EPL

hreflicense

Link to detailed license information. Will only be displayed if license is set.

You have 2 Options.

  • absolute url like

    'hreflicense' => 'http://creativecommons.org/licenses/by/4.0/'

  • relative url to repository file (stored in the modules folder)

    'hreflicense' => 'license.txt'

Displayed translatable linktext: read more

Screenshot

screenshot of module info

Wishlist & Roadmap

Implementation of this feature in core would be much easier. Read more:

processwire.com/talk/topic/5906-display-module-license-in-modules-directory

License

GNU-GPLv3

Author

kixe (Christoph Thelen)

Comments

No comments yet. Be the first to post!

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.