Overriding a View Function
Jamroom Developers
TiG:Tomorrow I will investigate the catch-all of view-results. That seems to be the only option left.
the view_results function comes at the very end - AFTER the view has been processed, so that is not going to help you. Instead you need to move further up the routing to the parse_url function - that way you can watch for the module and option and CHANGE then to your module if they match - i.e.
function xxCustom_parse_url_listener($_data, $_user, $_conf, $_args, $event)
{
if (isset($data['module']) && $_data['module'] == 'jrBlog' && isset($_data['option']) && $_data['option'] == 'update') {
$_data['module'] = 'xxCustom';
$_data['option'] = 'update-blog';
}
return $_data;
}
The parse_url event is where Jamroom parses out the URL to see what needs to be run - so you can swap things around in there if you need to.
updated by @brian: 04/13/18 06:38:34AM