omardealo
04-08-2013, 06:18 AM
Hello ,
that's code make a count thread for any forum
$getforumcount = $db->query_read("SELECT forumid, threadcount, replycount FROM " . TABLE_PREFIX . "forum");
while ($forumcount = $db->fetch_array($getforumcount))
{
$vbulletin->forumcache[$forumcount['forumid']]['threadcount'] = $forumcount['threadcount'];
}
in template i use :
{$vbulletin->forumcache['x']['threadcount']}
x = forum id
that code worked well , but i want also count thread for a category and all sub-forums in it by same use {$vbulletin->forumcache['x']['threadcount']}
Any ideas , thnx
that's code make a count thread for any forum
$getforumcount = $db->query_read("SELECT forumid, threadcount, replycount FROM " . TABLE_PREFIX . "forum");
while ($forumcount = $db->fetch_array($getforumcount))
{
$vbulletin->forumcache[$forumcount['forumid']]['threadcount'] = $forumcount['threadcount'];
}
in template i use :
{$vbulletin->forumcache['x']['threadcount']}
x = forum id
that code worked well , but i want also count thread for a category and all sub-forums in it by same use {$vbulletin->forumcache['x']['threadcount']}
Any ideas , thnx