PostNuke Help |
||
|---|---|---|
Previous |
Next |
|
register a hook function
bool pnModRegisterHook(hookobject, hookaction, hookarea, hookmodule, hooktype, hookfunc);
pnModRegisterHook() registers a hook function.
The hook object - either 'item' or 'category'
The action the hook is called for - one of 'create', 'delete', 'transform', or 'display'
The area of the hook (either 'GUI' or 'API')
The name of the hook module
The name of the hook type ('user' or 'admin')
The name of the hook function
This function returns true on success. This function returns void if an exception was raised.
This function raises DATABASE_ERROR if an error occurs while querying data.
The list of hook actions is constantly being refined. Check the source code for a current list. TODO: Have an official online hook action registry.
// Set up module hooks
if (!pnModRegisterHook('item',
'display',
'GUI',
'Ratings',
'user',
'display')) {
return false;
}
Previous |
Next |