phpBB

Development Wiki

Difference between revisions of "Listeners"

From phpBB Development Wiki

m (moved Hooks to Listeners)
Line 1: Line 1:
==What are hooks?==
+
==What are listeners?==
Hooks are a way of injecting or modifying code without having to edit the file. They are injected into points that we call [[Ledges]].
+
Listeners are a way of injecting or modifying code without having to edit the file. They are injected into points that we call [[Events]].
  
==Why are hooks helpful?==
+
Listeners might also be known as hooks.
 +
 
 +
==Why are listeners 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 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.
+
In 3.1 one of the aims was to make this easier. As such an installer was included in the core and the events & listeners 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?==
+
==How do I use a listener?==
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.
+
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. For more information see the [[Creating_Listeners]] page
  
[[Category:Ledges and Hooks]]
+
[[Category:Events and Listeners]]

Revision as of 10:59, 17 March 2012

What are listeners?

Listeners are a way of injecting or modifying code without having to edit the file. They are injected into points that we call Events.

Listeners might also be known as hooks.

Why are listeners 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 events & listeners 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 listener?

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. For more information see the Creating_Listeners page