Functions is the userapi need to be named <module>_userapi_function. The function then takes an arguments array.
So the function looks like
function <yourmodulename_userapi_yourfunctioname($args)
{
// Get arguments from argument array - all arguments to this function
// should be obtained from the $args array, getting them from other
// places such as the environment is not allowed, as that makes
// assumptions that will not hold in future versions of PostNuke
extract [28]($args);
......
}
The function is then called using a call to pnModAPIFunc('modulename', 'type', 'func', argsarray) having first loaded the user
API
loading and calling a function is
......
// Load API. All of the actual work for the creation of the new item is
// done within the API, so we need to load that in before we can do
// anything. If the API fails to load an appropriate error message is
// posted and the function returns
if (!pnModAPILoad('module', type')) {
pnSessionSetVar('errormsg', _LOADFAILED);
return $output->GetOutput();
}
// call the apu function
$mid = pnModAPIFunc('module',
'type',
'function',
array('parameter1' => $paramter1,
'parameter2' => $paramter2,
etc..... ));
.......
-Mark</module>