This could be useful:
Quote from: Spuds – Remember Elk also has several "generic" hooks which allow you to act on almost every action and subaction ... a few that I use are:
call_integration_hook('integrate_action_' . $hook . '_before', array($this->_function_name));
call_integration_hook('integrate_action_' . $hook . '_after', array($this->_function_name));
call_integration_hook('integrate_sa_' . $this->_name, array(&$subactions));
call_integration_hook('integrate_list_' . $listOptions['id'], array(&$listOptions));
The first two are in the Site Dispatcher, allowing you to act both before and after an action is initiated. One minor thing to note and something that is being worked on, is the _after hook is not always guaranteed to fire ... for example an action with an exit / die / fatal etc inside of it. So pretty much anywhere a ?action=xyz is called, these hooks are called.
The third is in the Action.class allowing you integrate before a sub-action is called from a controller. This allows you to easily add your own subActions to a controller, or simply act / trigger at the start of any subAction. So wherever you see $action->initialize() in a controller, that hook is being called (~55 times)
The last is called wherever you see a createList(); call, it allows you to add / modify to any list / form that gets displayed, this is super useful as we really implemented createList (~170 times)
Edited:
I did found these (but now sure what it is for) in ManageScheduledTasks.controller.php::
call_integration_include_hook('integrate_autotask_include');
// We need to find what's the action. call integrate_sa_manage_scheduled_tasks
$subAction = $action->initialize($subActions, 'tasks');
Otherwise, looking at the code, we could add a hook somewhere in the end of this line:
public function action_index()
{
global $context, $txt;
loadLanguage('ManageScheduledTasks');
loadTemplate('ManageScheduledTasks');
$subActions = array(
'taskedit' => array($this, 'action_edit', 'permission' => 'admin_forum'),
'tasklog' => array($this, 'action_log', 'permission' => 'admin_forum'),
'tasks' => array($this, 'action_tasks', 'permission' => 'admin_forum'),
);
// Control those actions
$action = new Action('manage_scheduled_tasks');
// Now for the lovely tabs. That we all love.
$context[$context['admin_menu_name']]['tab_data'] = array(
'title' => $txt['scheduled_tasks_title'],
'help' => '',
'description' => $txt['maintain_info'],
'tabs' => array(
'tasks' => array(
'description' => $txt['maintain_tasks_desc'],
),
'tasklog' => array(
'description' => $txt['scheduled_log_desc'],
),
),
);
// We need to find what's the action. call integrate_sa_manage_scheduled_tasks
$subAction = $action->initialize($subActions, 'tasks');
// Page details
$context['page_title'] = $txt['maintain_info'];
$context['sub_action'] = $subAction;
// Call the right function for this sub-action.
$action->dispatch($subAction);
}
As in my last comparison, SMF 2.1 Beta did put this hook there:
call_integration_hook('integrate_manage_scheduled_tasks', array(&$subActions));
// Call it.
call_helper($subActions[$context['sub_action']]);
Whether that hook add is necessary or otherwise, I don't know.