TheJoker Member Mar 5, 2013 #1 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 am just curious, are Code Event Listeners the same as hooks (as in other forumware)? If not, what's the difference between the two?
L Lawrence Well-known member Mar 5, 2013 #2 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'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.
EQnoble Well-known member Mar 5, 2013 #3 Microsuck said: 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? Click to expand... 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.phpyou would create a template hook and set it to fire class: microsuck_addon1_documentNamewith 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
Microsuck said: 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? Click to expand... 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.phpyou would create a template hook and set it to fire class: microsuck_addon1_documentNamewith 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