Quote:
Originally posted by mister
The way it works now, this hack counts threads & posts in EVERY forum, private forums included.
Is there an easy way to not count those forums the user doesn't have access to?
Some of my users are confused, because it says 12 threads, but they're only getting 10 back (2 are in private forums).
|
Easy fix, here is your solution

into your SQL request, use this instead of original code:
Code:
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]' and forumid <> 'id of your private forum'");
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post,thread WHERE post.dateline > '$bbuserinfo[lastvisit]' and thread.threadid=post.threadid and thread.forumid <> 'id of your private forum'");
Of course, this is only a temp solution, and it should have to be improved for the vb3 environement.
(auto don't count for all private forum by adding a checkbox, etc...)