PostNuke Help

Previous
Starting Your Module

Home
up

Next
Design Your Module!


Read the Manuals!

Obtain a Copy of The PostNuke API Reference Guide

A copy of the PostNuke API reference guide is essential when developing a module. This guide covers all of the core functionality that the PostNuke system provides and provides example code for every API function available.

The PostNuke API Command Reference is included in this help system.

Understand the Following Areas

Function Return Codes

Every well-defined module function must return the appropriate return codes. Return codes are the main way in which a module communicates with the PostNuke core, and as such it is vital that the correct return codes are used.

The following return codes should be used when returning control to the PostNuke core from any module function:

text string

Returning a text string implies that the module function has finished its work and has output to be displayed in the appropriate place on the PostNuke web page. PostNuke will take the returned output and display it as appropriate. Note that all output from modules is displayed verbatim, with no escaping of HTML characters. This is to allow for formatted output from the module functions.

true

Returning boolean true implies that the module function has finished its work and set up an appropriate redirect to send the user to a page that will have display output. The PostNuke core will take no further action as far as this module is concerned.

false

Returning boolean false implies that the module function has finished its work but not set up an appropriate redirect to send the user to a page that will have display output. The PostNuke core will set an appropriate redirect for this module.

Note that none of these functions carry any information about the success or failure of the attempted operation that the module function was undertaking.

Where Modules Fit in PostNuke

Modules cover two separate areas of PostNuke. The first is administration of core functions, (e.g. users, permissions), and the second is extension of system functionality (e.g. downloads, web links). As each of these areas are not core this implies two things. First is that no module is actually required - the PostNuke system would work without anything in its modules directory, although its functionality would be severely limited and there would be no configuration options available. Second is that modules should not remove any core functionality when they are installed, operated, or removed.


Previous
Starting Your Module

Home
up

Next
Design Your Module!