PostNuke Help |
||
|---|---|---|
Previous |
Next |
|
check if a module is available
bool pnModAvailable(modname);
pnModAvailable() confirms whether a module is available to be used within the PostNuke system.
The well-known name of a module to check
This function returns true if the module is available for use, false if the module is not available for use. This function returns void if an exception was raised.
This function raises BAD_PARAM if you pass an invalid parameter. This function raises DATABASE_ERROR if an error occurs while querying data.
A module that is loaded into the PostNuke system but which is inactive or uninitialised is defined as not available for use.
For more information on well-known names of modules please refer to the documentation for pnModGetVar()
// See if News module is available
if (pnModAvailable('News')) {
// Load the News module
if (!pnModAPILoad('News', 'user')) {
die('Could not load News module API');
}
}
Previous |
Next |