Page 1 of 1

Module dependencies

Posted: Mon Aug 07, 2006 8:24 am
by quadracer
I'm going my first steps on php coding for CMSms.

Is it possible a module that's depending more than one other module (for example cmsmailer and captcha) ?

Re: Module dependencies

Posted: Mon Aug 07, 2006 1:20 pm
by Elijah Lofgren
quadracer wrote: I'm going my first steps on php coding for CMSms.

Is it possible a module that's depending more than one other module (for example cmsmailer and captcha) ?
Looks like it is possible.

Here is the example code that is in the example module skeleton:  http://dev.cmsmadesimple.org/projects/skeleton

Code: Select all

	/*---------------------------------------------------------
	   GetDependencies()
	   Your module may need another module to already be installed
	   before you can install it.
	   This method returns a list of those dependencies and
	   minimum version numbers that this module requires.
	   
	   It should return an hash, eg.
	   return array('somemodule'=>'1.0', 'othermodule'=>'1.1');
	  ---------------------------------------------------------*/
	function GetDependencies()
	{
		return array();
	}

Hope this helps,

Elijah