![]() |
|
|
#1
|
|||
|
|||
|
What are Code Hooks?
Code Hooks are locations in the MonkeyCMS base code that provide a basic application programming interface (API) to add further custom functionality. As of version 1.5.0 there are 14 different code hook locations, but these will be added to quickly in subsequent releases of the software. You can attach multiple pieces of code to a Code Hook and specify the order in which they are run. Code Hooks can be locked to specific versions of MonkeyCMS by the author - this is a recommended practice as it will mean that hooks can be checked against new versions of MonkeyCMS before they are activated and will not run until updated. Code Hook can also be disabled globally in the MonkeyCMS security settings and the software ships with hooks disabled by default. Current Code Hooks (as of Version 1.5.0) 1 index.php / Top 2 index.php / Bottom 3 content.php / Top 4 content.php / Bottom 5 sendmail.php / Top 6 sendmail.php / Bottom 7 affiliatelink.php / Top 8 affiliatelink.php / Additional Link Processing 9 search.php / Top 10 global.php / Additional Skin Overrides 11 content.php / Post Content Load 12 admincp/affiliatemanager.php - Form Post Action 13 admincp/flushcaches.php / After Cache Flush 14 admincp/functions.php / After Content Upload What do Code Hooks do? A Code Hook is actually just any PHP that you want to run - it can contain additional functions that build on the MonkeyCMS core, or it could contain specific actions that are triggered at certain points during the running of the software. This post will be updated with examples as further functionality is added |
![]() |
| Thread Tools | |
| Display Modes | |
|
|