Module development: Difference between revisions

Jump to navigation Jump to search
m
Line 121: Line 121:
To create a new user screen, create a subdirectory of '''htdocs''' (if not already done) for your module (in '''htdocs/monmodule''' for example) to store the pages you will create.
To create a new user screen, create a subdirectory of '''htdocs''' (if not already done) for your module (in '''htdocs/monmodule''' for example) to store the pages you will create.


Copy, into that directory, the file '''skeletons_page.php''' that will serve as a starting point for your page file and also file '''pre.inc.php'''.
Copy, into that directory, the file '''skeletons_page.php''' that will serve as a starting point for your page file.
Edit the file '''pre.inc.php''' to have a correct relative path to the main.inc.php file.
Edit the file to have a correct relative path to the main.inc.php file.
<source lang="php">
<source lang="php">
include("../../main.inc.php)";
include("../../main.inc.php)";
</source>
</source>
This depends on the depth of the directory in which the file is pre.inc.php (Add or remove "../").  
This depends on the depth of the directory in which the file is (Add or remove "../").  
It's in the main.inc.php file that is loaded technical environment variables and permissions. The following variables are objects positioned in this file:
It's in the main.inc.php file that is loaded technical environment variables and permissions. The following variables are objects positioned in this file:


Navigation menu