10
LOL -- my beloved xoops, I am only taking a holiday at work.. Paid modules and so on, if that slacken off it will be back to xoops..
I need to add a HOOK so i will be doing this in version 2.6 of xoops, similar to a preload.. but that does some of the following..
/* This is a hook which will allow your modules to change a criteria anywhere
in the core from the module programming arean. In this example it
is a criteria in the module.php file in the kernel which if a hook was loaded in
the xoops_version.php of a module it will fire it at this point, the XoopsHook
Class will take advantage of the file based cache for speed and have
preloaded results. */
$criteria = new CriteriaCompo(new Criteria('uid', $GLOBALS['xoopsUser']->getVar('uid')));
$criteria = XoopsHook::criteriaHook($criteria, 'xoops.kernel.module', __CLASS__, __FUNC__);
or for object management:
/* This is a hook which will allow your modules to change a criteria anywhere
in the core from the module programming arean. In this example it
is a criteria in the module.php file in the kernel which if a hook was loaded in
the xoops_version.php of a module it will fire it at this point, the XoopsHook
Class will take advantage of the file based cache for speed and have
preloaded results. */
$object_handler =& xoops_getmodulehandler('object', 'objects');
$objects = $object_handler->getObjects(NULL, true);
$objects = XoopsHook::objectHook($objects, 'xoops.kernel.module', get_class($object_handler), __CLASS__, __FUNC__);