1
Zjerre
Delete post but keep total amount
  • 2005/5/29 9:52

  • Zjerre

  • Just popping in

  • Posts: 69

  • Since: 2003/9/6 1


Hi, I've got next question for you: trying to get the most posts at our site is a competition between the members. As the admin I have to remove some old topics and irrelevant comments, although I don't want that the total amount of posts changes. When I delete a post now, it reflects immediately in the total post ranking. How can I keep order and keep the posts ranking alone at the same time?
Thanks, Z.

Edit: I'm talking about newbb posts and all other kinds of comments (tinycontent, xcgallery, etc.).

2
pegasus00321
Re: Delete post but keep total amount

It requires modifying the code for newbb
And if you want it to be like that for when you delete comments as well, then you'll need to modify the code for that.

Class/xoopscomments.php
$sql = sprintf("UPDATE %s SET posts = posts-1 WHERE uid = %u", $this->db->prefix("users"), $arr[$i]['user_id']);
if ( !$result = $this->db->query($sql) ) {
echo "Could not update user posts.";
}

Which version of newbb are you using?

3
Zjerre
Re: Delete post but keep total amount
  • 2005/5/29 18:00

  • Zjerre

  • Just popping in

  • Posts: 69

  • Since: 2003/9/6 1


Hi Pegasus00321
I'm using the latest newbb version, 2.0.2.

Login

Who's Online

367 user(s) are online (293 user(s) are browsing Support Forums)


Members: 0


Guests: 367


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits