PHP Code:
// GET NUMBER OF NEW POSTS
$newposts = $db->query_first("SELECT count(*) AS count FROM " . TABLE_PREFIX . "post WHERE dateline > " . $vbulletin->userinfo['lastvisit']);
// DETERMINE IF "POSTS" IS SINGULAR OR PLURAL
if ($newposts['count'] == 1)
{
$newposts[plural] = "";
}
else
{
$newposts[plural] = "s";
}
// GET NUMBER OF NEW THREADS
$newthreads = $db->query_first("SELECT count(*) AS count FROM " . TABLE_PREFIX . "thread WHERE dateline > " . $vbulletin->userinfo['lastvisit']);
// DETERMINE IF "THREADS" IS SINGULAR OR PLURAL
if ($newthreads[count] == 1)
{
$newthreads[plural] = "";
}
else
{
$newthreads[plural] = "s";
}
$getnews = $db->query_first("SELECT threadid, title FROM ".TABLE_PREFIX."thread WHERE forumid=2 ORDER BY lastpost DESC LIMIT 1");
... but you could have easily done this yourself by looking at Brads list of changed Varnames