PDA

View Full Version : [Release - MiniHack] Make update user info update post counts


DarkReaper
10-20-2001, 10:00 PM
I've run into the problem where post counts become b0rked several times while tinkering with my vBulletin, and always was annoyed when I went to update the counters and they didn't fix it. So I went and took a look at the file, and guess what! It doesn't update post counts! Doh!

In /admin/misc.php, find this:

// update user stuff
if ($user[customtitle]==0)


Add this before it:

$totalposts=$DB_site->query_first("SELECT COUNT(postid) AS posts FROM post WHERE userid='$userid'");
$DB_site->query("UPDATE user SET posts='$totalposts[posts]' WHERE userid='$userid'");


Now whenever you update the counters for users, it will update their post counts as well!

DarkReaper
10-24-2001, 02:40 AM
No comments :(

Neo
10-24-2001, 03:01 AM
nice, glad someone thought of doing it... i guess i am to lazy to.. heh:rolleyes:

Arathorn
01-18-2002, 05:49 PM
Isn't this a feature in v2.2.1 already? I installed this hack, just to be sure anyway. :) Thanks.

Shenlong
01-18-2002, 06:05 PM
nice hack, thanx reaper

Admin
01-19-2002, 04:47 AM
Yup, this is already a feature in v2.2.x.

[closing...]