Code... well that's what i'm asking for. For now i've tested the following code:
file: "mytemplate.php", included in main.php of template.
global $EVENT_HANDLER;
$obj = NULL;
function my_action($data)
{
echo "<h1>MY ACTION</h1>"; exit(1);
}
$EVENT_HANDLER->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $obj, 'my_action');
But this could not work because it's included AFTER the action processing is done. This may work if i had a way to include it before.