Topic: Not incrementing posts in a certain forum

I have one forum where I don't want a user's num_posts to go up when they post there.  I changed line 322-ish from

                $db->query('UPDATE '.$low_prio.$db->prefix.'users SET num_posts=num_posts+1, last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());

to

            if ($fid != 7)
                $db->query('UPDATE '.$low_prio.$db->prefix.'users SET num_posts=num_posts+1, last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());

The id of the forum I want is 7, but the post count is still increasing.  Where did I mess up?

Re: Not incrementing posts in a certain forum

is $fid even a variable?

Re: Not incrementing posts in a certain forum

Try using $cur_posting['id] instead.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Not incrementing posts in a certain forum

Thanks, that fixed it.

Doh!  I just realized that it should have been $tid.  Wow, I'm dumb.  This works too, though.

Re: Not incrementing posts in a certain forum

No, $tid is set when the user is posting a reply, $fid is set when the user is posting a new topic. $cur_post['id'] is always set to the forum ID.

"Programming is like sex: one mistake and you have to support it for the rest of your life."