Line 310: |
Line 310: |
| | | |
| == Add your own setup page (optional) == | | == Add your own setup page (optional) == |
− | '''When''': If your module need to ask user several parameters. | + | '''When''': If your module needs parameters, which are to be provided by the user, for proper setting up of the module. |
| | | |
| === Create your page to edit parameters === | | === Create your page to edit parameters === |
− | If your module need several parameters to be setup, you must create a page to edit options (these options will be saved in the [[Table llx_const|table '''llx_const''']]). | + | If your module needs several parameters to be setup, you must create a page to edit options (these options will be saved in the [[Table llx_const|table '''llx_const''']]). |
| Create a page named '''mymodule_setuppage.php''' that shows a form for possible options to update them into the above mentioned table. | | Create a page named '''mymodule_setuppage.php''' that shows a form for possible options to update them into the above mentioned table. |
| It is necessary to take an example from a page of the directory '''/admin''' that will show you the way to read/save your parameters. | | It is necessary to take an example from a page of the directory '''/admin''' that will show you the way to read/save your parameters. |
| Put this PHP page into the directory '''/admin''' of your module (e.g. mymodule/admin/mymodule_setuppage.php). | | Put this PHP page into the directory '''/admin''' of your module (e.g. mymodule/admin/mymodule_setuppage.php). |
| + | |
| + | === Modify the descriptor file of your module === |
| Then, within the descriptor file of your module, modify the variable config_page_url to set name of this PHP page (without the path, which is not necesary if the page is inside directory admin). | | Then, within the descriptor file of your module, modify the variable config_page_url to set name of this PHP page (without the path, which is not necesary if the page is inside directory admin). |
| <source lang="php"> | | <source lang="php"> |