PDA

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


DarkReaper
Sat 20th Oct '01, 9:22pm
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
Wed 24th Oct '01, 12:40am
No comments :(

neogeniseva
Wed 24th Oct '01, 1:01am
nice, glad someone thought of doing it... i guess i am to lazy to.. heh:rolleyes: