Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 34
User
User
Offline
Joined: Apr 2002
Posts: 34
I am running a contest on my forums right now. A lot of people are posting duplicate posts, which we are deleting.
The contest is based on user post count. How can I make is so when some of a user's posts are deleted their post count is automatically adjusted accordingly? I am getting tired of having to go in and manually count and update their post counts in the database.

Thanks, any help appreciated!

Connie

Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Offhand, I can't think of a good way of doing it automatically. Maybe a second post-delete could be added which decrements the post count. But you could use a query like this, which decrements the post-count for user 'Foo' by 17:

UPDATE w3t_Users
SET U_Totalposts = U_Totalposts - 17
WHERE U_Username = 'Foo'

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
You could just scare them into honesty by threatening to ban any users who are falsifying their posts or counts. Put a 24 hour ban on abusers, or a week, or something that will entice them not to 'cheat'. Also, just so you know, users can post, then delete the post, and their post count stays up. This is how threads works by default. So they can post and delete with no one the wiser and end up with an inflated post count.

Joined: Apr 2002
Posts: 34
User
User
Offline
Joined: Apr 2002
Posts: 34
Thanks Dave, but it is just as easy to go into the database and manually update the count. I need something automatic. Wouldn't be so bad if I wasn't paying for every 50 posts. If there was no payout I wouldn't really care.

You would think that this would be built in automatically. If it can add to the post count with new posts, then it should decrease the memberpost count when the post is deleted. No different than if you expire a bunch of posts, the count goes back down for total posts. But the user post stays the same.
I don't want to get into banning users, they are just getting a little overzealous. Not really doing things to be malicious. I want my forum to be a friendly place!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Sounds like it really ought to be built into the delete script... but I can see where people who delete "old" posts don't necessarily want users numbers to go down... if they are building a history.

There really should be a checkbox on the delete screen to decrease the post count or not.

Sponsored Links
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
The post counts are supposed to increase over time for users. That's their "history" and stature.

The only thing that would work is an additional field in the database that also tracks post counts for users but would be resetable by the admins and would also decrease with post deletions and expirations.

I think the majority of users expect their post count to always increase over time so changing the main post count to very wouldn't be what most expect to happen.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah... you don't want the count decreasing for getting rid of "old" our "outdated", but "legitimate" posts.
Sounds like you only want the number to decrease if you delete what you deem to be a bogus post.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
An admin/moderator only checkbox that would signify the decrease in post count for the user that made the post would be doable. I think there would be 3 files that would need modifying. Simply add a checkbox to the editpost.tmpl when an admin or moderator is editing a post and pass the value to the deletepost.php script telling it to decrease the count of the poster.


Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
Yep, and it would need to check to see if any of the replies to the post were made by the same person, and take away another from their post count. Gets kinda complicated, but still doable.

Or you could just have a text box appear for the admin/mod during deleting, and they can type in a number to remove from post count. This might be easier to write up.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)