Mickie D
10-14-2012, 05:22 PM
Hi all,
Looking for the right hook for my code.
Basically I am calling information from a forum field which is dependant on forumid.
But when I associate my code to hook location postbit complete it breaks the site.
But when I try and use showthread complete it does not show up... but does not break the forum
here is the code -- thanks very much for looking.
// Call Mysql Data from forum table
$results = $vbulletin->db->query_read("SELECT ultimate_ads FROM ".TABLE_PREFIX."forum WHERE forumid = $forumid");
// Put Mysql data in an array
$advert_code_last = mysql_fetch_row($results);
// Pull the data relevant to the forumid
$advert_code_last = $advert_code_last[0];
// If a Advert has not been assigned - give it a default advert
if ($advert_code_last == ''){
$advert_code_last = 'DEFAULT ADVERT CODE TO GO HERE';
}
// Register the Variable in the navbar template for use
vB_Template::preRegister('navbar',array('advert_co de_last' => $advert_code_last));
Looking for the right hook for my code.
Basically I am calling information from a forum field which is dependant on forumid.
But when I associate my code to hook location postbit complete it breaks the site.
But when I try and use showthread complete it does not show up... but does not break the forum
here is the code -- thanks very much for looking.
// Call Mysql Data from forum table
$results = $vbulletin->db->query_read("SELECT ultimate_ads FROM ".TABLE_PREFIX."forum WHERE forumid = $forumid");
// Put Mysql data in an array
$advert_code_last = mysql_fetch_row($results);
// Pull the data relevant to the forumid
$advert_code_last = $advert_code_last[0];
// If a Advert has not been assigned - give it a default advert
if ($advert_code_last == ''){
$advert_code_last = 'DEFAULT ADVERT CODE TO GO HERE';
}
// Register the Variable in the navbar template for use
vB_Template::preRegister('navbar',array('advert_co de_last' => $advert_code_last));