Changes

Jump to navigation Jump to search
m
Line 13: Line 13:     
=== Name ===
 
=== 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)
+
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)
+
 
 +
If the module is for another software then Dolibarra, 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, ...)
 
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, ...)
Line 24: Line 25:     
{{TemplateModuleTreeSimple}}
 
{{TemplateModuleTreeSimple}}
 +
 +
Note: When you build your zip file, the directory '''mymodule''' must be in the root of the zip.
    
=== Custom directory management - Inclusion of main or master files ===  
 
=== Custom directory management - Inclusion of main or master files ===  
Line 29: Line 32:  
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.
 
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:
+
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*.
+
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''' with '''master.inc.php''' for command line scripts.
 
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).
 
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).
   Line 84: Line 87:  
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.
 
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.
   −
 
+
==== MetaPackages ====
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.
+
If your module is a "metapackage", so a module that includes 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:
+
For example, imagine your module is called "mymetapack". When installating this module, it should 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:
 
<source lang="php">
 
<source lang="php">
metapackage
+
# This file describes all the modules that are included in the zip module_metapackage-x.y.zip
 +
mymetapack
 
abd
 
abd
 
def
 
def
 
</source>
 
</source>
 +
 +
[[File:Warning.png]] Deploying a metapackage from the Dolibarr online deployer is possible only with Dolibarr v11+
    
==== Language ====
 
==== Language ====
Product description is mandatory in English
+
Product description on Dolistore is mandatory in English. If not defined for other languages, english will be used.
    
==== Support ====
 
==== 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)
+
If your module is not free, you have to give an email address for support (or a website that allow customers to contact you)

Navigation menu