Quote:
Originally Posted by kh99
You need to create a new plugin using the posted code, and also edit the SHOWTHREAD template and insert the code where you want the list to appear. If you've done both of those and still aren't seeing anything, first of course make sure you're looking at a thread that you know people have subscribed to, then double check that the plug and template edit are correct.
|
I put the code in the SHOWTHREAD as per post #21.
Here's my plugin code
PHP Code:
$res = $vbulletin->db->query_read_slave("SELECT subscribethread.userid, username, usergroupid, infractiongroupid, displaygroupid FROM " . TABLE_PREFIX . "subscribethread AS subscribethread
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(subscribethread.userid = user.userid)
WHERE threadid = $thread[threadid]");
$subscribed_count = 0;
$subscribers = array();
while ($row = $db->fetch_array($res))
{
$subscribed_count++;
fetch_musername($row);
$row['is_last'] = ($subscribed_count == $db->num_rows($res));
$subscribers[] = $row;
}
vB_Template::preRegister('SHOWTHREAD', array('subscribed_count' => $subscribed_count, 'subscribers' => $subscribers));
GOT IT!!!!
Thanks!! For your help