Hello!
I've built this recursive function and put it in the hook showthread_start:
PHP Code:
function is_parent_forum_is_341_categoty($forum)
{
//Returns True if parentid is a 341 category, false otherwise
global $vbulletin;
if ($forum['forumid'] == 341)
return true;
if ($forum['parentid'] == -1)
return false;
$parent = $vbulletin->forumcache[$forum[parentid]];
return is_parent_forum_is_341_categoty($parent);
}
$show_ads_in_this_forum = !is_parent_forum_is_341_categoty($foruminfo);
Now i also want to use in the hook postbit_display_start, but it seems that this hook, doesn't acknlowledge the function i built above, or the variable $show_ads_in_this_forum, what strange is, that when i tried to implment this function is postbit_display_start, i had ad error which said that is function is already implemented somewhere else in the code, and even if i change its name, something that's really weird.
Can you please help? Thanks.