Difference between revisions of "Module Dolistore Validation Rules"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
m (Protected "Module Dolistore Validation Rules" ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
Line 1: Line 1:
 
= [[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 [www.dolistore.com www.dolistore.com]
 
Here are the rules that will be apply by Dolibarr team on validation/activation of external module on [www.dolistore.com www.dolistore.com]
 +
 +
=== Structure ===
 +
All module files have to be insise module directory, check this template [https://github.com/rdoursenaud/dolibarr-module-template GitHub Dolibarr Module Template]
  
 
=== Inclusion ===  
 
=== Inclusion ===  

Revision as of 09:02, 29 May 2013

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 [www.dolistore.com www.dolistore.com]

Structure

All module files have to be insise module directory, check this template GitHub Dolibarr Module Template

Inclusion

  • To include a core file, use include_once/require_once/include/require DOL_DOCUMENT_ROOT.'/pathtofile';
  • To include to a module file from a module file, use include_once/require_once/include/require './mymodulefile';
  • To include to a module file from a core file (call by hook / trigger / speciales pages), use dol_include_once('/My_Module_directory/...');

Link

All link to generated by HTML should be done by getNomUrl object class method or at least using dol_buildpath

Custom directory

An external module can be use in htdocs/custom/mymodule as well as in htdocs/mymodule

Core file modifications

If core dolibarr files have to be modified for feature of your module :

  • They were be accepted si they are pushed to dolibarr dev branch on GitHub (add feature to standard class without risk of regression, html.form.class.php/function.lib.php,...)
  • They were be accepted if adding hook/trigger is pushed to dolibarr dev branch on GitHub to be sure that on next dolibarr version your next module version will not have to change dolibarr core code

In all cases:

  • If and only if they are test with
    if (!empty($conf->mymodule->enabled))