31,003
edits
mNo edit summary |
|||
| Line 17: | Line 17: | ||
== Create your module descriptor == | == Create your module descriptor == | ||
The first step is to create a file descriptor for the module. To do this go into the directory dev/skeletons and copy the file modMyModule.class.php in the directory htdocs/includes/modules. | |||
Then change the contents of this file to replace: | |||
* all "modMyModule" with a value which corresponds to the vocation of your module. This value must always start with 'mod'. | |||
* $this->numero = 10000 by a number of free module (Go to Home page -> System Information -> Dolibarr to know id the list of modules used). | |||
* $this->const_name = 'MAIN_MODULE_MYMODULE' by $this-> const_name = 'MAIN_MODULE_XXX' where XXX must match the value chosen to replace MyModule and put in capitalized. | |||
* $dir = DOL_DOCUMENT_ROOT.'/mysql/tables/mymodule/'; by $dir = DOL_DOCUMENT_ROOT.'/mysql/tables where xxxxxxxx is the name of your module (without spaces). | |||
* | * Modify any other variables defined in the constructor (see comment in the code skeleton for their meaning). | ||
* $this->numero = | |||
* $this->const_name = 'MAIN_MODULE_MYMODULE' | |||
* $dir = DOL_DOCUMENT_ROOT.'/mysql/tables/mymodule/'; | |||
* | |||
Your file descriptor for your module is ready. | |||
== Tester votre descripteur == | == Tester votre descripteur == | ||