PDA

View Full Version : Hook locations


steadicamop
09-03-2006, 10:40 PM
I'm trying to turn a small hack into a product, but am having a few issues with hook locations, I believe both files have hooks, but aren't really in the right place for the code I have - I need to "push" the code down a little, is this possible?

I'm very new at all of this, I've checked through some tutorials but can't find anything!!

Thanks,

Jason

Guest190829
09-04-2006, 01:10 AM
I'm trying to turn a small hack into a product, but am having a few issues with hook locations, I believe both files have hooks, but aren't really in the right place for the code I have - I need to "push" the code down a little, is this possible?

I'm very new at all of this, I've checked through some tutorials but can't find anything!!

Thanks,

Jason

It really depends on the specific hook. Sometimes there are ways you can use the hook to make it do what you want, other times using hooks is simply not possible...

steadicamop
09-04-2006, 08:16 PM
I have a piece of code I've physically added to the includes/functions_newpost.php file, and it has a hook not far away from the place it needs to be, on line 352:

($hook = vBulletinHook::fetch_hook('newpost_process')) ? eval($hook) : false;

Then the piece of code I need to insert currently sits a line 380 & 381, which is some distance from the hook itself, but the code I've added needs to be run at that point, not at the hook point - is there any way around this?

Thanks for you help,

Jason

Kirk Y
09-05-2006, 12:55 AM
If it absolutely must be at that specific point, then no - there's no way to get around it, aside from requesting a new hook from vBulletin, which without good reason - won't be added.