=== Name ===
All modules that are
dolibarr modules must be called '''module_mymodulename-VERSION.zip''' (where VERSION is version can be x or x.y or x.y.z) If the module is for another software, the name of zip must be '''moduleothersoftware_mymodulename-VERSION.zip''' (for example moduleprestashop_mymodulename-1.0.zip)
The packages that are Android application, PDF or ODx documents are free to use the name of their choice. The extension however must follow the type of file (.app, .txt, .pdf, .odt, ...)
=== Custom directory management - Inclusion of main or master files ===
An external module called '''mymodule''' can be installed into '''htdocs/custom/mymodule''' (the default) as well as in '''htdocs/mymodule'''. It must works in both cases. Because all modules must work correctly when they are installed into root directory or into a personalized custom subdirectory.
For this reason, when you try to load the Dolibarr environment by including the
*main.inc.php * or *master.inc.php * file, you must include 2 ways to include them:
We recommend to use the method suggested in the examples in htdocs/modulebuilder/*.php files and presented here to load the
*main.inc.php *, but you can replace the *main.inc.php * into *master.inc.php *.
This portion of code is known to work in all situations (using Apache, Nginx, IIS, using virtual host of sub-directories, after a proxy redirect or not, if the web root is auto-detected or forced by conf file, and any combination of this).
First, you must check you are able to publish your module using the feature "Deploy an external module" of Dolibarr (available in menu Home - Setup - Modules). If not, just don't try to publish it on DoliStore, your module will be refused.
If your module is a "metapackage", so a module that
include several modules, you must include a file called *metapackage.conf * into the main directory with name of list of all other modules provided by your package.For example, image your module is called "mymetapack". When installating this module, it also install the module "abc" and "def". So you must include in the zip of your package a file *mymetapack/metapackage.conf* with the following content:
==== Language ====
Product description is mandatory in English
==== Support ====
If your module is not free you have to give
a email address for support (or a website that allow customers to contact you)