*** Untested ***
To make this work with the welcome module of CMPS:
In welcomeblock.php
FIND
PHP Code:
$getnewposts = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post WHERE dateline >= " . $vbulletin->userinfo['lastvisit']);
REPLACE that with
PHP Code:
$getnewposts = $db->query_first("
SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post AS post
" . iif($vbulletin->userinfo['excludeforumsgnp'], "LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid=post.threadid)") . "
WHERE post.dateline >= " . $vbulletin->userinfo['lastvisit'] . "
" . iif($vbulletin->userinfo['excludeforumsgnp'], "AND thread.forumid NOT IN (0," . $vbulletin->userinfo['excludeforumsgnp'] . ")") . "
");
(The query might need some optimization though)