Difference between revisions of "Listeners"
From phpBB Development Wiki
(→How do I use a hook?)
Revision as of 10:45, 17 March 2012
What are hooks?
Hooks are a way of injecting or modifying code without having to edit the file. They are injected into points that we call Ledges.
Why are hooks helpful?
In olympus one of the problems with phpBB was MOD installation was difficult. It required editing files and this could be done manually or you would have to download a tool separation. This made things hard for end users when updating and when installing multiple MODs they could conflict.
In 3.1 one of the aims was to make this easier. As such an installer was included in the core and the hooks system was recreated as the previous hooks system didn't fit the requirements of the MOD Authors Community. This means that file edits are no longer needed making MOD creation alot easier.
How do I use a hook?
You would create a file in your extension which would then use the identifier to hook into the code and inject the code you need into the core or modify the data you need.