Module development: Difference between revisions

Jump to navigation Jump to search
m
Line 300: Line 300:


{{ToTranslate}}
{{ToTranslate}}
== Définissez vos box ==
== Define your box ==
Pour cela, modifier les tableaux $this->boxes du fichier descripteur de module.
For this, modify the array $this->boxes into the module descriptor file.
Il suffit d'ajouter une ligne par fichier box qui se trouve dans le répertoire '''htdocs/includes/boxes'''
All you have to do is to add one line for each box file you will create into directory '''htdocs/includes/boxes'''


''Exemple:''
''Exemple:''
<source lang="php">
<source lang="php">
this->boxes[0][1]='mabox0.php'
this->boxes[0][1]='mybox0.php'
this->boxes[1][1]='mabox1.php'
this->boxes[1][1]='mybox1.php'
this->boxes[2][1]='mabox2.php'
this->boxes[2][1]='mybox2.php'
...
...
this->boxes[n][1]='maboxn.php'
this->boxes[n][1]='myboxn.php'
</source>
</source>


Ensuite creer les fichiers mabox0.php, mabox1.php... en prenant exemple sur des box existantes (dans le répertoire htdocs/include/boxes
Then create files mybox0.php, mybox1.php... by copying an example from an existing box file (into directory htdocs/include/boxes).


== Tester la présence de vos box dans Dolibarr ==
== Test if your box is detected by Dolibarr ==
Aller dans le menu '''Accueil - Configuration - Boite'''.
Disable and enabled module.
Vos boxs doivent apparaitre dans la liste des box activables. Avticer les, aller sur la page d'accueil et vérifier qu'elles s'affichent correctement.
Go into menu '''Home - Setup - Boxes'''.
Your boxes must appear in the list of boxes you can activated. Activate the box and go on home page to see if the box is showing correctly.


= [[File:Art.png]] Define your own export (optionnal) =
= [[File:Art.png]] Define your own export (optionnal) =

Navigation menu