PDA

View Full Version : Custom Hook Location


Ross L
05-26-2013, 09:08 AM
Hi,

I've got a script that pulls status data from another server embedded in a page on my forum, which I need to run on a custom hook (as running it on the global_bootstrap_init_start causes my site to go offline if the other server has issues). How would I go about adding a custom hook location and causing it to call when it is on a page?

Thanks in advance.

Regards,

Ross

--------------- Added 1369566201 at 1369566201 ---------------

Create a XML file in the includes/xml file called hooks_customhook

<?xml version="1.0" encoding="ISO-8859-1"?>

<hooks>

<hooktype type="Custom Hook">
<hook>statusinc</hook>
</hooktype>

</hooks>

I then added this to the custom page php:

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


All fixed :) I had made a mistake. I have included the correct code above in case anyone else has the same issue.