PDA

View Full Version : Remove post count for a specific user...


thuffner
11-11-2005, 08:18 AM
Found this in the 3.0 forum...Wondering if anyone knows how to do this for 3.5...?

Is there a way to do this so I can eliminate only a specific user post count? Here is the scenario:

I have a forum where a bot posts rss news feeds. I don't want the bot to accumulate posts for these messages. However, I do leave the ability for others to respond to these posts and post their own messages as well in this particular forum. I would like all users except for my two bots to be able to increase their post counts.

Make sense? Can anyone can provide a hack for me on this? Greatly appreciated.

Thanks! :)

TCM
11-11-2005, 11:31 AM
I coded something like this for vB 3 (I never released it, I considered it too small, it was just something I use on my forums). I'll see if I can do the same for 3.5.

telc
11-26-2005, 05:39 PM
I can't find where post counts are incremented in 3.5.1.

In 3.0.x it was in includes/functions_newpost.php

$doposts = 'posts = posts + 1,';

Does anyone know where it is done in 3.5.1? I would like to know also.

Chris M
11-26-2005, 05:49 PM
/includes/class_dm_threadpost.php
if ($this->info['forum']['countposts'])
{
$user->set('posts', 'posts + 1', false);

Chris

telc
11-26-2005, 06:18 PM
/includes/class_dm_threadpost.php
if ($this->info['forum']['countposts'])
{
$user->set('posts', 'posts + 1', false);

Chris


Thanks Chris!

thuffner
11-30-2005, 06:19 PM
How do you make it not count a specific user though? Chris, where in that code do you specify a User ID or something identifying the person you dont want their posts to count?

Thanks. :)

telc
11-30-2005, 07:56 PM
How do you make it not count a specific user though? Chris, where in that code do you specify a User ID or something identifying the person you dont want their posts to count?

Thanks. :)

Try this:


Change:
$user->set('posts', 'posts + 1', false);

To:

if($this->registry->userinfo['userid'] != 9999)
{
$user->set('posts', 'posts + 1', false);
}


Replace 9999 with the proper userid.