Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
8 - 4 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Delete post but keep total amount
by Zjerre on 2005/5/29 18:00:44

Hi Pegasus00321
I'm using the latest newbb version, 2.0.2.
Re: Delete post but keep total amount
by pegasus00321 on 2005/5/29 16:44:36

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?
Delete post but keep total amount
by Zjerre on 2005/5/29 9:52:08

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.).

Who's Online

181 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits