PDA

View Full Version : PHP Hook not working


mcyates
07-05-2006, 02:10 PM
I have a hook on vb 3.5 which is the following:

product: vbulletin

hook location: ajax_start

Title: adverts

Plugin PHP code:

<?php
ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
include ('myfootball-ads.php');
echo $ad_network;
?>

Plugin Active: Yes

and this works fine when i put the $ad_network code in the footer, but its not showing up when i put it on the new version of vb version 3.6 BETA 4.

Why is this?

Thanks in advance.

Paul M
07-05-2006, 05:24 PM
No idea, the hook hasn't moved - it does however seem a very odd hook to use for adding things to your footer ?

mcyates
07-09-2006, 03:01 PM
No idea, the hook hasn't moved - it does however seem a very odd hook to use for adding things to your footer ?

All i need to do is include the file myfootball-ads.php which is it the forums root directory.

I've created a php file called ads.php and put the code (in the first post) into it and it works. I just don't understand why it doesn't work now?

Is it all correct for it to be displayed in the footer template?

i've put the code above into a file www.myfootballforum.com/ads.php and it works fine so why isn't the hook above working? Its doing my head in.

Paul M
07-09-2006, 05:45 PM
Sorry but I'm still confused, why are you using (or trying to use) the hook ajax_start ?

Kirk Y
07-09-2006, 08:21 PM
Isn't that the first hook location given to you? I'd imagine that he didn't select a location, rather just left it as is. I believe the correct hook location for you would be global_start, assuming you want whatever you're trying to display on every footer of every page.