1 (edited by *PM* 2008-05-06 03:17)

Topic: Disabling post count, how?

Hi, I am extremely new to punbb and was wondering if there is a way to turn the post count off in a particular forum/topic. For example I don't want posts in forum games to increase post count. Any help would be greatly appreciated and thanks in advance.

Re: Disabling post count, how?

It's only board wide and not category specific but it's in Admin > Options look for "User post count". NOTE: The admins can still see the post count.

~James
FluxBB - Less is more

3

Re: Disabling post count, how?

Dr.Jeckyl wrote:

It's only board wide and not category specific but it's in Admin > Options look for "User post count". NOTE: The admins can still see the post count.

Not quite what I mean. Like only disabling post count in forum games, i know it's possible cause of a punbb forum I'm a member on has disabled post count in certain topics, i just can't find out how.

Re: Disabling post count, how?

Open post.php

Find:

// 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());
        }

Replace with

$my_fid=4;   // Replace this with your forum id number

if(!$fid)
{
    $myresult = $db->query('select t.forum_id from '.$db->prefix.' posts p inner join '.$db->prefix.'topics t on p.topic_id = t.id where p.id='.$new_pid);
   $fid = $db->result($myresult);
}
// If the posting user is logged in, increment his/her post count
        if (!$pun_user['is_guest'] && $fid != $my_fid)
        {
            $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());
        }

Be sure to use your forum id on the first line

5 (edited by *PM* 2008-05-21 02:32)

Re: Disabling post count, how?

Lurker.boi wrote:

Open post.php

Find:

// 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());
        }

Replace with

$my_fid=4;   // Replace this with your forum id number

if(!$fid)
{
    $myresult = $db->query('select t.forum_id from '.$db->prefix.' posts p inner join '.$db->prefix.'topics t on p.topic_id = t.id where p.id='.$new_pid);
   $fid = $db->result($myresult);
}
// If the posting user is logged in, increment his/her post count
        if (!$pun_user['is_guest'] && $fid != $my_fid)
        {
            $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());
        }

Be sure to use your forum id on the first line

Thank you soo much, this worked perfectly. Is there any way i can disable it in more than 1 forum or will it only allow 1 forum to have the count disabled?