Kier
07-15-2002, 10:00 PM
This is a bit of a silly hack, but a few of my moderators wanted it, so I thought I'd share it with you people.
What it does is when a user posts, the system checks against a list of user IDs, and if the user is in that list, their post count goes down by one, rather than going up by one post. Very silly I know, but anyway...
1) run the following query:INSERT INTO setting (settinggroupid, title, varname, description, displayorder) VALUES
(6, 'Users with inverse post counters', 'decrementusers',
'Users in this list will have their post count decremented when they post. Separate user IDs with a comma', 100)
2) in functions.php, add the following code somewhere near the bottom of the file:function incrementposts($userid) {
static $decrementusers;
if (!is_array($decrementusers)) {
$decrementusers = explode(',', $GLOBALS['decrementusers']);
}
if (in_array($userid, $decrementusers)) {
return 'posts=posts-1,';
} else {
return 'posts=posts+1,';
}
}
3) in newreply.php and newthread.php, find this code:".iif ($foruminfo[countposts],"posts=posts+1,","")."and replace with this:".iif ($foruminfo[countposts], incrementposts($bbuserinfo['userid']), '')."
Then go into your control panel and edit the new setting, inserting something like 1001,2544 to set users 1001 and 2544 to have inverse post counters.
Have fun :classic:
What it does is when a user posts, the system checks against a list of user IDs, and if the user is in that list, their post count goes down by one, rather than going up by one post. Very silly I know, but anyway...
1) run the following query:INSERT INTO setting (settinggroupid, title, varname, description, displayorder) VALUES
(6, 'Users with inverse post counters', 'decrementusers',
'Users in this list will have their post count decremented when they post. Separate user IDs with a comma', 100)
2) in functions.php, add the following code somewhere near the bottom of the file:function incrementposts($userid) {
static $decrementusers;
if (!is_array($decrementusers)) {
$decrementusers = explode(',', $GLOBALS['decrementusers']);
}
if (in_array($userid, $decrementusers)) {
return 'posts=posts-1,';
} else {
return 'posts=posts+1,';
}
}
3) in newreply.php and newthread.php, find this code:".iif ($foruminfo[countposts],"posts=posts+1,","")."and replace with this:".iif ($foruminfo[countposts], incrementposts($bbuserinfo['userid']), '')."
Then go into your control panel and edit the new setting, inserting something like 1001,2544 to set users 1001 and 2544 to have inverse post counters.
Have fun :classic: