Head of Core Development
Posts: 222
Joined: 23 August 2009
Location: Rochdale, UK
|
With the release of 1.2, we're aiming to add in a lot more areas where modules can hook into. At the moment, hooks are not available in many of the areas needed to create more complex modules.
So if you find somewhere in the code that you think would be a good place to allow modules to hook onto, just post here with the name of the file & whereabouts the hook should go. Also provide a quick description of why it would be useful.
Note: Before requesting a hook, check the list of accepted hooks below to make sure its not already been added!
Accepted Hooks
- Next to reply, quote, etc buttons in topics. Usage: File = topic, Hook = post_buttons
- After user information on topic screen. Usage: File = topic, Hook = user_info
- After username on topic screen. Usage: File = topic, Hook = after_username
- After username in member_link function (global). Usage: File = member_link, Hook = after
- Before any template hook. Usage: File = template_hook, Hook = {file}_{template_hook}_before
({file} becomes the path to the file (with directory separators as hypens), e.g. forums-topic {template_hooks} becomes the name of the hook, e.g. start or 38)
- Same for after a template hook, except with after. Usage: File = template_hook, Hook = {file}_{template_hook}_after
- After adding a reply. Usage: File = addreply, Hook = reply_added
- After registration. Usage: File = register, Hook = register_done
Last edited by: Jonny
- Monday, Nov 02, 2009 15:19.
|
|
Top
|
|
|
Use the following URL to link to this post: http://community.novaboard.net/findpost/2332 |
Head of Security
Security Team
Posts: 601
Joined: 23 August 2009
Location: Heiloo
|
Before header, after footer?
|
|
Top
|
|
|
Use the following URL to link to this post: http://community.novaboard.net/findpost/2334 |
Coder
Posts: 94
Joined: 24 August 2009
Location: London
|
No idea what template (I can't remember!) but on each button panel in posts. Next to report/quote/reply etc. Could be useful for a reputation system or something along those lines.
|
|
Top
|
|
|
Use the following URL to link to this post: http://community.novaboard.net/findpost/2337 |
Head of Security
Security Team
Posts: 601
Joined: 23 August 2009
Location: Heiloo
|
Oh, below the Posts: Joined: Location: things, above and below the avatar, left and right of the username, etc..
|
|
Top
|
|
|
Use the following URL to link to this post: http://community.novaboard.net/findpost/2345 |
Red Giant
Posts: 155
Joined: 25 October 2009
Location: United Kingdom
|
end of page add after add before replace
|
|
Top
|
|
|
Use the following URL to link to this post: http://community.novaboard.net/findpost/2519 |
Head of Core Development
Posts: 222
Joined: 23 August 2009
Location: Rochdale, UK
|
Angelo  Before header, after footer?
Can be achieved by latching onto the 'start' and 'end' template hooks. So already available.
Putzy  No idea what template (I can't remember!) but on each button panel in posts. Next to report/quote/reply etc. Could be useful for a reputation system or something along those lines.
Done
Angelo  Oh, below the Posts: Joined: Location: things, above and below the avatar, left and right of the username, etc..
Done. Not sure about above/below the avatar. Done, added a hook into the member_link function and the topic template.
|
|
Top
|
|
|
|
|