Difference between revisions of "Module Dolistore Validation Rules"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
m (Import interlang links (links to translated versions of this page in other languages) from Multi Language Manager table.)
Tag: 2017 source edit
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
<!-- You can edit this section but do NOT remove these comments
 
<!-- You can edit this section but do NOT remove these comments
 
     Links below will be automatically replicated on translated pages by PolyglotBot -->
 
     Links below will be automatically replicated on translated pages by PolyglotBot -->
[[fr:Module_Dolistore_Validation_Regles]]
+
[[fr:Module_Dolistore_Règles_de_Validation]]
 
[[es:Módulo_Dolistore_Reglas_Validación]]
 
[[es:Módulo_Dolistore_Reglas_Validación]]
 
<!-- END interlang links -->
 
<!-- END interlang links -->
Line 8: Line 8:
 
= [[File:Art.png]] Enabling/activation condition of external module on DoliStore =
 
= [[File:Art.png]] Enabling/activation condition of external module on DoliStore =
 
Here are the rules that will be apply by Dolibarr team on validation/activation of external module on https://www.dolistore.com
 
Here are the rules that will be apply by Dolibarr team on validation/activation of external module on https://www.dolistore.com
 +
 +
=== 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, ...)
 +
 +
The rest of the document applies for Dolibarr modules only.
  
 
=== Structure ===
 
=== Structure ===
Line 28: Line 36:
 
</source>
 
</source>
  
=== Link ===  
+
=== Link to Dolibarr core object ===  
All link to a page of a standard dolibarr object (an invoice, an order, a bank account, ...) should be included into your module page using the '''getNomUrl''' method of the class of the object.
+
All link to a page of a standard dolibarr object (an invoice, an order, a bank account, ...) should be included into the code using the '''getNomUrl''' method of the class of the object.
  
 
=== Custom directory management ===  
 
=== Custom directory management ===  
An external module called '''mymodule''' can be installed into '''htdocs/custom/mymodule''' as well as in '''htdocs/mymodule'''. It must works in both cases
+
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.
 +
 
 +
=== No writing in standard tree===
 +
The module must not write in Dolibarr's "'''programs'''" but only into files located into the directory "'''documents'''". Including for temporary files. It should be remembered that on a proper secured installation of Dolibarr, the entire program tree (with the exception of the custom directory) is set to read-only.
  
 
=== Core file modifications ===
 
=== Core file modifications ===

Latest revision as of 20:30, 6 October 2019


Art.png Enabling/activation condition of external module on DoliStore

Here are the rules that will be apply by Dolibarr team on validation/activation of external module on https://www.dolistore.com

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, ...)

The rest of the document applies for Dolibarr modules only.

Structure

All modules must follow a structure similar to the one provided into htdocs/modulebuilder/template

Inclusion

  • To include a core file, use
include_once/require_once/include/require DOL_DOCUMENT_ROOT.'/pathtofile';
  • To include a file of module into a file of same module, use
include_once/require_once/include/require './mymoduledir/...';
  • To include a file of another external module into a module file, use
dol_include_once('/otherextmoduledir/...');

Link to Dolibarr core object

All link to a page of a standard dolibarr object (an invoice, an order, a bank account, ...) should be included into the code using the getNomUrl method of the class of the object.

Custom directory management

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.

No writing in standard tree

The module must not write in Dolibarr's "programs" but only into files located into the directory "documents". Including for temporary files. It should be remembered that on a proper secured installation of Dolibarr, the entire program tree (with the exception of the custom directory) is set to read-only.

Core file modifications

Your module MUST NOT change or overwrite any files provided by standard Dolibarr distribution. If some Dolibarr core files need to me modified to have your module working, you must submit this change to core team. They will be accepted :

  • If they are pushed to dolibarr develop branch on GitHub
  • If what you push is adding hooks or triggers, or optionnal parameter to existing functions, it should be accepted with no condition. For other change, it may depends if change keeps old code compatible and is interesting for everybody.

Mandatory data on record

Language

Product description is mandatory in English

Support

If your module is not free you have to give a email adress for support (or a website that allow customers to contact you)