Are CELs just hooks?

TheJoker

Member
I am just curious, are Code Event Listeners the same as hooks (as in other forumware)? If not, what's the difference between the two?
 
I'm not sure of other forum's hook system as I never gave them much thought. XenForo uses listeners so add-ons can extend or implement objects, and class instances.
 
I am just curious, are Code Event Listeners the same as hooks (as in other forumware)? If not, what's the difference between the two?
No they can't be the same thing...there are hooks in the software and you can use a CEL as you put it to listen for a hook.

If you have a document that you want loaded when a specific hook is encountered and it is located at:
/library/microsuck/addon1/documentName.php​
you would create a template hook and set it to fire
class: microsuck_addon1_documentName​
with a method of (::)
templateHook​

in the documentName.php file you would create a function that fires when a particular hook name is come across



hopefully that is not a completely horrible explanation
 
Back
Top Bottom