PDA

View Full Version : Mods called by multiple hooks


MrEyes
05-20-2008, 07:00 PM
I have a mod that I would like to be called at two different hook points.

The mod itself does some work on new thread post so I have hooked into:

newthread_post_start

However I would also like the same mod to be executed at the following hook point:

rssfeeddata_postsave

Can this be done?

Dismounted
05-21-2008, 07:11 AM
Create a plugin at that hook as well. AFAIK, you cannot assign two hook locations to one plugin.

MrEyes
05-21-2008, 05:11 PM
In the end I did what you suggested, created a plugin at each hook point I wanted and then got the plugin to require an external PHP file. It does mean that my mod is now a product file and a PHP file, however this is better than replicating the code in both hook points.