Module management

9.3. Module management

For reasons of order, the modules are managed through the files present in the subdirectories that contain them, every module has its own folder in the interior of the folder "modules".

In order to be loaded, the module files get included in the modules.php file by passing it the aproppriate parameters. The main page of each module must be called index.php, the other possibly pages possibly present in the module will have an additional variable in the inside of parameter strings by which they are called..

For example in the AvantGo module (see Chapter 6) in order to load the index.php file, it is enough to pass the module name to the parameter string (by default, the file that will be searched for is index.php):


If we instead wanted to call a page other than the default index.php (say, print.php), the string we will have to pass is :


that is the file variable with a value (print) that corresponds to the name of the file we want to load without the .php extension.

Inside the folder modules/nameofmodule there is also a subfolder called "language". In this fashion we manage in a simple and immediate way the multilanguage functionality inside the modules.

The modules.php file works this way:

  • Includes mainfile.php

  • Verifies whether the module is active or not

  • Verifies whether the string passes a file name different from index.php

  • Verifies the permissions of the module (whether everybody can see it, or only registered users, or only the administrator).


Site Info v2.2.2

Last SeenLast Seen
Server TrafficServer Traffic
  • Total: 347,873,643
  • Today: 4,062
Server InfoServer Info
  • Feb 19, 2018
  • 01:52 am PST

Daily Inspiration