PostNuke Help

Previous
Building Your Module

Home
up

Next
Administration Functions


Initialisation Functions

Module initialisation functions are required for three separate actions. These actions are initialisation of the module's tables and configuration, upgrade of the module's tables and configuration, and deletion of the module's tables and configuration. Each of these items are generally only ever called once, although if a site administrator desires they should be able to initialise and delete a module as many times as they wish. It should be assumed that whenever these functions are called the PostNuke system has already loaded the relevant information from pntables.php and it is available in the information returned by pnDBGetTables().

An annotated copy of the template pninit.php file is available in the standard PostNuke distribution as part of the Template solution.

Test Your Initialisation Routines

Once the database structure and initialisation files are in place they should be tested by using the modules administration area of your PostNuke system to test initialising and deleting your module. You should manually check that the database table created is correct, and that deleting a module removes all of the relevant configuration variables and database tables. Once you are happy that the module initialisation functions are working correctly you should carry out an initialisation so that work on the administration and user functions can proceed with suitable database tables in place.


Previous
Building Your Module

Home
up

Next
Administration Functions