1
"Add two new events":
https://github.com/XOOPS/XoopsCore25/pull/941Please could you give more explanation ?
1 - First event : core.include.common.auth.success
Quote:
Event is triggered when the establishment, or re-establishment, of the current user is complete.
At this point valid security decisions can be made based on the state of the current user.
Does it means, after that, you could launch action for the user ?
An example please ?
How XOOPS did it before ?
2 - core.class.template.new event
Quote:
This event is triggered when a new XoopsTpl (an extended Smarty object) is created. This allows customization of the Smarty environment from within a module.
One possible use would be to support a module based plugin library. An simplified example event listener:
public static function eventCoreClassTemplateNew($arg)
{
$smartyObject = $arg[0];
$smartyObject->plugins_dir[] = __DIR__;
}
and Mamba continues with this :
Smarty Translate function:
https://github.com/XOOPS/XoopsCore25/pull/840/files function smarty_function_translate($params, $smarty)
{
function smarty_function_translate($params, $smarty)
{
$key = isset($params['key']) ? $params['key'] : '';
$dirname = isset($params['dir']) ? $params['dir'] : ''; //Mtools
$utility = '\Xoopsmodules\' . ucfirst($dirname) . '\Utility';
return $utility::translate($key, $dirname);
}
}
I read "Mtools", so it's a method to use plugin from Mtools in modules ?
Like XMF, but it's another thing, another way ?
Please, could you explain that for a non developper like me ?
Thank you !
Alain