My solution will work with new thread count because that table saves forum id for all threads. So adding forumid!=X will work for thread count in welcome panel hack.
However as for post count this solution does not work, because post count is retrieved from posts table and that table does not have any referrence to the forumid of the posts.
A work around might be using this trick:
Hack your gateway hack so that it posts with a special username (a fake username that does not belong to any member but a bot). Then you can exclude it in your query to get accurate results: Eg.
PHP Code:
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]' AND forumid!=X");
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]' AND username!=X");