Changes

Line 6: Line 6:  
* DOL_DATA_ROOT/monmodule for permanent files.  
 
* DOL_DATA_ROOT/monmodule for permanent files.  
 
* DOL_DATA_ROOT/monmodule/temp for temporary files.  
 
* DOL_DATA_ROOT/monmodule/temp for temporary files.  
To create these directories, you can use the function to create_exdir (DOL_DATA_ROOT/monmodule);
+
To create these directories, you can use the function  
 +
<source lang="php">
 +
dol_mkdir(DOL_DATA_ROOT.'/monmodule');
 +
</source>
    
To generate these files on the Dolibarr model, create the following files:
 
To generate these files on the Dolibarr model, create the following files:
Line 17: Line 20:     
To be able to download the files generated by using the mechanism of safety of Dolibarr, it is advisable to modify the files according to:  
 
To be able to download the files generated by using the mechanism of safety of Dolibarr, it is advisable to modify the files according to:  
# ''htdocs/html.form.class.php'' to add to it, in the method '''show_documents()''', the type of added document.
+
{{ToComplete}}
    
The model also needs to be inserted into the database, in the [[Table llx_document_model]] the type of document in the type field and the name of the corresponding class in includes/modules (starting with pdf_) in the name field.  
 
The model also needs to be inserted into the database, in the [[Table llx_document_model]] the type of document in the type field and the name of the corresponding class in includes/modules (starting with pdf_) in the name field.  
    
To know how to build a template, see page [[Create an ODT document template]] or [[Create a PDF document template]]. Building a pdf template requires PHP development knowledge, but building an ODT template does not.
 
To know how to build a template, see page [[Create an ODT document template]] or [[Create a PDF document template]]. Building a pdf template requires PHP development knowledge, but building an ODT template does not.