Version: , by (Guest)
Developer Last Online: Jan 1970
Version: Unknown
Rating:
Released: 12-26-2000
Last Update: Never
Installs: 0
No support by the author.
We have a "Chit Chat" forum on our boards where users can post anything. The problem is that some of our users complain because others get very high post counts by making useless posts to the Chit Chat forum. I'd really appreciate it if someone could tell me how to make the user post counts not go up in a specific forum.
Thanks
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Sure this is pretty easy to do. Just open up "newreply.php" and change the following code:
Code:
$DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
And replace it with this:
Code:
// Change the number 1 below to the forum you don't want posts to count in
if ($threadinfo[forumid]==1) {
$DB_site->query("UPDATE user SET posts=posts,$dotitle"."lastpost=".time()." WHERE userid=$userid");
} else {
$DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
}
Well thanks for the quick reply! It works great but I have a problem. What about new threads? I did the same change for the newthread.php but my post count increased when I posted a new thread. I'll be very happy if you could find a solution for the new threads.
Sorry about the oversight there, yes you should be able to make the same change to newthread.php as you did in newreply.php, the code for incrementing the post count is the same in both. I'm not sure why it still changed your post count, but you might want to empty your browser's cache file and try it again?
$DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
Change to:
Code:
//Wayne Luke 11/01/2000
//Exclude certain forums from post counts
if ($countposts) {
$DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
} else {
$DB_site->query("UPDATE user SET posts=posts,$dotitle"."lastpost=".time()." WHERE userid=$userid");
}
// End Modification.
$DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
Change to:
Code:
//Wayne Luke 11/01/2000
//Exclude certain forums from post counts
if ($countposts) {
$DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
} else {
$DB_site->query("UPDATE user SET posts=posts,$dotitle"."lastpost=".time()." WHERE userid=$userid");
}
// End Modification
THen if I want to exclude another forum in the future, I can just set the countposts column = 0 for that forum without touching the code.