PDA

View Full Version : hooks in external page


Kungfu
02-18-2007, 03:15 AM
Possible? I cant seem to get a hook to work in an external page. I included the global file, is there anything else i need to include. I add a hook in vb.
In my external page i put
($customhook = vBulletinHook::fetch_hook('mycustomhook')) ? eval($customhook) : false;

But it always returns false.
I made a plugin on Vbulletin that is active. i tried echo "test hook"; i also tried $testhook = "testing hook"; type of thing. none of those work as it always returns false and wont evaluate.

Is there something im not doing? Thanks.

Delphiprogrammi
02-18-2007, 11:09 AM
you must create a file called hooks_yourproduct.xml (product can be set to "vbulletin") also vBulletinHook is defined in /includes/class_hook.php not global.php have a look at /includes/xml/hooks_vbulletin.xml on howto do that ...

Kungfu
02-18-2007, 03:42 PM
you must create a file called hooks_yourproduct.xml (product can be set to "vbulletin") also vBulletinHook is defined in /includes/class_hook.php not global.php have a look at /includes/xml/hooks_vbulletin.xml on howto do that ...
Ok well nevermind about this all you need is the global. I didnt enable plugins as this was a fresh install and i was just testing a plugin and never made a product yet. Im a moron.