- Moderated by:
- Support Team
-
- rank:
-
Professional
- registered:
- November 2003
- Status:
- online
- Posts:
- 1676
I noticed a modules useing a files called pnsomething.php that have functions called ModName_something_func($args), and are called with pnModFunc(ModName, something, func, array($args)). Well I thought this was brilliant for my now growing pncommon.php file.
Question is, is this acceptable and wil it continue to work for future versions of PostNuke? The answer tells me weather or not to just create a universal pncommon directory.
TIA
--
Under Construction! -
- rank:
-
Steering Committee
- registered:
- December 2002
- Status:
- offline
- last visit:
- 23.11.08
- Posts:
- 13415
The actual syntax is modname_type_func($args)
The type can be anything, but it is usually 'user' or 'userapi' - and each category of function is stored in pntype.php. If you need more functions than sensibly fit in a single file, then you can use more than one API file, for example, a common API.
pnModAPILoad('mymod', 'common');
pnModAPIFunc('mymod', 'common', 'func', array());
Further, you can split these functions into subdirectories into your module if you have enough files to warrant doing this.
--
Regards,
Simon
itbegins.co.uk - Zikula Consulting
Please read the Support Guide
