Here is the php code for it
PHP Code:
// update views counter
if ($vbulletin->options['threadviewslive'])
{
// doing it as they happen; for optimization purposes, this cannot use a DM!
$db->shutdown_query("
UPDATE " . TABLE_PREFIX . "thread
SET views = views + 1
WHERE threadid = " . intval($threadinfo['threadid'])
);
}
else
{
// or doing it once an hour
$db->shutdown_query("
INSERT INTO " . TABLE_PREFIX . "threadviews (threadid)
VALUES (" . intval($threadinfo['threadid']) . ')'
);
}
You can find that in showthread.php