Documenation
Hooks
A hook is a point in the code (usually in the Model) where plugins can be inserted (hooked) to add or override functionality. See Plugins for information on how to use hooks.
List of available hooks
-
cache(/_plugins/classes/buffer.php)
Use to write HTML output to cache (see Buffer). -
clear_cache(/_model/model.class.php)
Clear the cache. -
dashboard(/_plugins/classes/dashboard.php)
Adds a link to the dashboard (see Dashboard). -
display_node(/_plugins/classes/nodes.php)
Display a node (see Node). -
email(/_model/model.class.php)
Use to send e-mails. -
end(/_model/model.class.php)
Use to include code at the bottom of each page. -
error(/_model/model.class.php)
Use to output errors. -
header(/_model/init.php)
Use to include code on top of each page. Skipped when$contr->standAloneis set. -
home(/index.php)
Use to change the home page. -
init(/_model/model.class.php)
Use to extend the Model. This hook is called on every page, when the Model (core code) is initialized. -
input_sanitize(/_model/model.class.php)
Use to filter user input (GET and POST). -
footer(/_model/model.class.php)
Use to include code at the bottom of each page. Skipped when$contr->standAloneis set. -
format_date(/_model/model.class.php)
Use to format a date. -
menu(/_plugins/classes/header.php)
Use to add a item to the main navigation menu. -
route(/_model/model.class.php)
Use to route URLs. Requires a/.htaccessfile witch matching settings. -
translate(/_model/model.class.php)
Use to translate strings. -
unit_tests(/unit_tests/index.php)
Use to add unit tests.
In most cases these hooks are all you need. If however you need to create a new hook, use $model->hook('hook_name')
(see Model).