![]() |
How to Update Post Count for a Single User
It seems like there would be an easy way to do this. Anyone have any ideas?
Thanks in advance, Tim |
Edit the member. There is a place for post count.
|
Ok, but I need to know what the value should be.
Tim |
If you have phpMyAdmin, a real easy way would be to go into the post table and find all posts by that user. It then tells you in the query how many rows get returned. I think if you just want to make the query, it would be something like:
Code:
SELECT count(*) |
Yes, but that doesn't take into account forums that posts don't increment the post counter. As far as I can tell that option is stored in an option bitfield, which I can't decypher in mysql.
Tim |
AdminCP > Maintenance > Update Counters > Update Post Counts
READ MESSAGE GIVEN UNDER THE TITLE BEFORE YOU PROCEED |
Quote:
|
Quote:
Quote:
It seems like this shouldn't be this hard. Tim |
Updating all users post counts is the best way. Should only take 1-2 minutes.
|
I have a feeling it is going to take a lot longer than a few min. And I have custom post counts for some users that I can't lose.
If I wanted to simply update all the users I would have just done it and not posted looking for a solution to what I thought was a simple request. Tim |
Have you tried looking at the query in the admin cp for updating the post counts and thought of just substituting the userid for this one user? (The below code is from misc.php under do=updateposts and is for 3.6.8.)
First you have to get the forums (basically only get the forumids of those that allow post counts): Code:
$forums = $db->query_read(" Code:
$totalposts = $db->query_first(" |
All times are GMT. The time now is 05:31 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|