Difference between revisions of "FAQ Directory Custom external modules"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
(First draft from custom module skeleton)
 
(added template doc user)
Line 1: Line 1:
How to install a custom module
+
[[Category:Admin]]
-------
+
{{TemplateDocUser}}
 +
 
 +
= How to install a custom module =
 +
 
  
 
* Make sure Dolibarr is already installed and configured on your workstation or development server.
 
* Make sure Dolibarr is already installed and configured on your workstation or development server.

Revision as of 07:25, 30 September 2016

How to install a custom module

  • Make sure Dolibarr is already installed and configured on your workstation or development server.
  • In your Dolibarr installation directory, edit the htdocs/conf/conf.php file
  • Find the following lines:
   php
   //$dolibarr_main_url_root_alt ...
   //$dolibarr_main_document_root_alt ...
   
  • Uncomment these lines (delete the leading //) and assign a sensible value according to your Dolibarr installation
For example :
   * UNIX:
       php
       $dolibarr_main_url_root = 'http://localhost/Dolibarr/htdocs';
       $dolibarr_main_document_root = '/var/www/Dolibarr/htdocs';
       $dolibarr_main_url_root_alt = '/custom';
       $dolibarr_main_document_root_alt = '/var/www/Dolibarr/htdocs/custom';
       
   * Windows:
       php
       $dolibarr_main_url_root = 'http://localhost/Dolibarr/htdocs';
       $dolibarr_main_document_root = 'C:/My Web Sites/Dolibarr/htdocs';
       $dolibarr_main_url_root_alt = '/custom';
       $dolibarr_main_document_root_alt = 'C:/My Web Sites/Dolibarr/htdocs/custom';
       
You may have to create the htdocs/custom directory first if it doesn't exist yet.
  • Unzip the custom module zip file in the htdocs/custom directory
  • You should now have a htdocs/custom/modulename directory
  • Refresh your browser, Go to "Setup" -> "Modules"

The module displays in one of the sections, you could enable it and then start using it ;)

If the module is under development or experimental 
Got to "Setup" -> "Other setup" and set MAIN_FEATURES_LEVEL to 2
For more information about the conf.php file take a look at the conf.php.example file.