31,003
edits
No edit summary |
|||
| Line 401: | Line 401: | ||
=== Define your box === | === Define your box === | ||
For this, modify the array $this->boxes into the module descriptor file. | For this, modify the array $this->boxes into the module descriptor file. | ||
All you have to do is to add | All you have to do is to add 2 lines for each box file you will create into directory '''htdocs/mymodule/core/boxes''' | ||
''Example:'' | ''Example:'' | ||
<source lang="php"> | <source lang="php"> | ||
this->boxes[0][ | $this->boxes[0]['file']='mybox0.php@mymodule' | ||
this->boxes[ | $this->boxes[0]['note']='My box 0' | ||
this->boxes[ | ... | ||
$this->boxes[n]['file']='myboxn.php@mymodule' | |||
this->boxes[n][ | $this->boxes[n]['note']='My box n' | ||
</source> | </source> | ||
Then create files mybox0.php, mybox1.php... by copying an example from an existing box file (into directory htdocs/core/boxes). | Then create files '''htdocs/mymodule/core/boxes/mybox0.php''', '''htdocs/mymodule/core/boxes/mybox1.php'''... by copying an example from an existing box file (found into directory '''htdocs/core/boxes'''). | ||
=== Test if your box is detected by Dolibarr === | === Test if your box is detected by Dolibarr === | ||