Quote:
Originally Posted by Mattwhf
Would you mind sharing details/codes for this way?
I can solve this but it can not be a professional way thus that's why I ask this question here.
Thanks
|
Okay, I would do something like this:
PHP Code:
$replycounts = array();
// Edit the following line to contain all threadids you wish to include.
$threadids = '674,4563,4895,7894';
$threads= $vbulletin->db->query_read("SELECT thread.*
FROM " . TABLE_PREFIX . "thread AS thread
WHERE threadid IN (" . $threadids . ")
");
while ($thread = $db->fetch_array($threads))
{
$replycounts[$thread['threadid']] = $thread['replycount'];
}
Now you can pass the $replycounts array to your template, and then display them from your template with:
{vb:raw replycounts.674}
{vb:raw replycounts.4563}
{vb:raw replycounts.4895}
{vb:raw replycounts.7894}
etc.
Does this make sense?