Topic: How to stop the posts counter in some subforum?

Hi all!
Houston we got a problem... and the problem is:

I need to stop counters in some forum section, because it's a computer'about forum and we got two subforums for "flood" and "talk about nothing"... Some users are "guru" in status just because there are professional floodres tongue

How can I stop the counter of posts in "flood" subforums?

Thanks in advance!

Re: How to stop the posts counter in some subforum?

nobody knows? sad

3 (edited by seva 2006-08-27 08:15)

Re: How to stop the posts counter in some subforum?

yes, of coure

open post.php, find this code:

        // If the posting user is logged in, increment his/her post count
        if (!$pun_user['is_guest'])
        {
            $low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
            $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());
        }

And replace it with:

        // If the posting user is logged in, increment his/her post count
        if (!$pun_user['is_guest'])
        {            
            $low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
            if (in_array($fid, '1,2,3'))
                $db->query('UPDATE '.$low_prio.$db->prefix.'users SET last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());                
            else
                $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());                        
        }

look at this: if (in_array($fid, '1,2,3'))
replace the array '1,2,3' with the numbers (id-s) of your flood-forums

p.s. am i right? >:)

Hm... every pixel has it's own destiny

Re: How to stop the posts counter in some subforum?

seems like it would work cept '1,2,3' isnt an array,

replace that line with
if(in_array($fid, array('1','2','3')))

Re: How to stop the posts counter in some subforum?

???????? seva and thanks gizzmo! smile

I'll test it right now!

thanks again smile

6

Re: How to stop the posts counter in some subforum?

oh, yep, Gizzmo, u r right:)

Hm... every pixel has it's own destiny