The PostNuke API is a work-in-progress. There will be many functions that are missing from the API that developers would like. To this end, if a developer has a request for a particular function then they can submit it to the MDPro features request list on SourceForge at the PostNuke Homepage. The same system can be used for sending in updates of current functions or new functions. If you are a developer and currently either globals directly or accessing one of the core tables to obtain or update information then please consider sending in a feature request so that the MDPro team can develop an API to carry out the work instead. This will ensure that your code is more likely to continue working through future versions of MDPro without modification, and that
Please note that the main requirements for the core PostNuke API are stability and a relatively small footprint. Due to this it is possible that your request for a new or updated function will get refused on the grounds that it is too specific or can easily be built from other core API functions. In such situations the MDPro team will always try to provide a simple alternative, but please remember that submission of a new or updated part of the API does not guarantee inclusion.
$articles = pnModAPIFunc('News', 'user', 'getarticles'); |
The following pages have a complete PostNuke API reference. Any functions that are not listed in this section are to be considered internal and should not be used by developers.
This function returns an array of block information or void if an exception was raised.
bool pnBlockLoad(modname, block);
string modname, string block ;
BAD_PARAM
DATABASE_ERROR
ID_NOT_EXIST
MODULE_FILE_NOT_EXIST
This function returns true if the module loaded successfully, and void if an exception was raised.
// Load the past article block from the News module |
string pnBlockShow(modname, block, blockinfo);
string modname, , string block, , array blockinfo ;
BAD_PARAM
DATABASE_ERROR
ID_NOT_EXIST
MODULE_FILE_NOT_EXIST
The configuration variables available with this release of the API are as follows:
Other variables will be made available in future releases of the API.
// Set locale for this site |
// Remove locale setting |
pnDBGetConn() obtains database connection handles for direct querying of the MDPro database.
pnDBGetTables() obtains database table information for direct querying of the MDPro database.
pnDBInit() is normally called from within pnInit(), and as such should not be called by developers.