Jump to content

Display module license in modules directory


teppo
 Share

Recommended Posts

Small(ish) request related to modules directory: could we get a field for selecting license used by the module?

At the moment it's often very unclear what's the licensing policy for an individual module. I'm hoping that this would -- in addition to making this information more obvious when browsing modules -- also give module authors a slight (and much needed, I'm afraid) nudge towards actually defining which license the module is distributed under.

A simple text field would be enough for the time being, but a list of possible / most common licenses like GitHub has implemented would, of course, be even better.

  • Like 1
Link to comment
Share on other sites

A very good idea.

If it were baked into the information in the module file near Author etc then it could even pick it up automatically, but manually might be best as some people (my included) just don't even think to specify a license.

What do you do in the event someone doesn't specify one by the way? Assume it inherits GPL from ProcessWire?

  • Like 1
Link to comment
Share on other sites

What do you do in the event someone doesn't specify one by the way? Assume it inherits GPL from ProcessWire?

From legal perspective you can't really assume that, especially since we have already established that ProcessWire modules aren't automatically under same license as ProcessWire itself. There was a rather lengthy discussion about this here. Can't have it both ways, I'm afraid.

Code that doesn't specify a license is simply protected by copyright law, meaning in essence that you can't use it legally without the authors consent. I'm no expert in (especially international) copyright law, so please don't take my word for it, though. Luckily more trustworthy sources, such as GitHub, have written tons of good articles about this :)

Link to comment
Share on other sites

In which case developers should really be required to pick a license (and include it in their repo - you have to include the full text somewhere don't you?) before a module is approved. A bit of a pain for those already on there, but I'm sure we could check them all between us.


That or a nice automated email from ryan to those who submitted the modules which lists their modules and asks them to include a license and update the module page, then perhaps go so far as to remind people who've not updated it within 60 days to do it again, then after another 60 days take them down?

Then again I've not had my coffee this morning yet so that's probably far too severe.

It would be fantastic for people to actively respond to such requests if we send them one - it would at least show who is looking after their own modules (though admittedly I can be slow with Github pull requests at times!).

  • Like 2
Link to comment
Share on other sites

It would be awesome if we could simply notify authors and they would update their content, but I'm also a bit skeptical if that would work, how many would react in given timeframe.. and how many modules we might end up losing in the process. Don't know if that's really worth the risk.

For the paranoid types (like me) seeing what license a module is under is very important, especially if I'm planning to use it in work projects and not just for fun, but in all honesty most authors probably won't be going after users of their modules with legal claims anyway :)

I don't really know what would be the best solution here and Ryan would probably be the right person to make that decision. In any case adding a way to define this info in the modules directory and sending an email like you mentioned would definitely be a good start.

Using a license usually means including license text somewhere and/or mentioning in your source code what license it's under. GNU licenses (GPL, LGPL) are only ones I know to especially state that you should include full license text in every source code file you've got under that license. That's a bit over-the-top, to say the least, and most authors simply skip that part.

For my own projects I've included LICENSE file within the repository and added PHPDoc @license tag (linking to text format license) to all PHP files -- that should at least make my intentions clear.

Link to comment
Share on other sites

  • 6 months later...

If you want to make license visible in your custom PW Installation, you could place the following few lines in /wire/modules/Process/ProcessModule.module
 

 if(!empty($moduleInfo['license'])) {
            $hreflicense = (!empty($moduleInfo['hreflicense']))?" - <a href='$moduleInfo[hreflicense]'>".$this->_('read more')."</a>":"";
            $table->row(array($this->_x('License', 'edit'), $moduleInfo['license'].$hreflicense));
        }

just behind this line (989)

  
 if(!empty($moduleInfo['author'])) $table->row(array($this->_x('Author', 'edit'), $moduleInfo['author']));

Now you can set license Name and link to license page in your Modules Info like.

public static function getModuleInfo() {

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

Would be nice to add this option to core.

 

post-1246-0-01061500-1413196075_thumb.jp

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...