Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Elisa on June 13, 2004, 04:25:09 PM

Title: Number of post
Post by: Elisa on June 13, 2004, 04:25:09 PM
When I delete the topics, the number of the post of forum members diminish. I want that the number of post does not diminish.
Help!
(Sorry, I speak least English!)
Title: Re: Number of post
Post by: Meriadoc on June 13, 2004, 05:53:47 PM
this isn't solving your problem, sorry, but if you speak one of the languages that we have in our multi-lingual support board you may find it both more comfortable and easier :) We have a very international support base. Just a thought, might be helpful :)
Merry
Title: Re: Number of post
Post by: Chris Cromer on June 14, 2004, 12:32:40 AM
To do this you will have to modify the source code.

Open RemoveTopic.php and search for:
// Decrease the post counts.
if ($decreasePostCount)
{
$requestMembers = db_query("
SELECT m.ID_MEMBER, COUNT(m.ID_MSG) AS posts
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
WHERE m.ID_TOPIC $condition
AND b.ID_BOARD = m.ID_BOARD
AND m.icon != 'recycled'
AND b.countPosts = 0
GROUP BY m.ID_MEMBER", __FILE__, __LINE__);


and replace that with:

// Decrease the post counts.
$decreasePostCount = false;
if ($decreasePostCount)
{
$requestMembers = db_query("
SELECT m.ID_MEMBER, COUNT(m.ID_MSG) AS posts
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
WHERE m.ID_TOPIC $condition
AND b.ID_BOARD = m.ID_BOARD
AND m.icon != 'recycled'
AND b.countPosts = 0
GROUP BY m.ID_MEMBER", __FILE__, __LINE__);


That will stop post counts from going down when you delete topics.
Title: Re: Number of post
Post by: Elisa on June 14, 2004, 09:03:09 AM
Thank you
Title: Re: Number of post
Post by: Alexandre P. on June 14, 2004, 12:07:27 PM
That's not of my business, but why ?  Why don't you want the post count to decrease ?
Title: Re: Number of post
Post by: Cypher7 on June 14, 2004, 12:30:32 PM
I suppose, if you were deleting posts from a good few months ago that were old, and you were doing it to keep the size down or something, then it wouldn't be fair on the posters who got their count up for those posts... but I dont think you really need to delete posts...

IMO, if you delete a post cos it's inappropriate or whatever, then the count should go down with it...
Title: Re: Number of post
Post by: Chris Cromer on June 14, 2004, 12:32:52 PM
He wasn't deleting posts, he was deleting topics. When you delete topics it lowers the post count of every member that posted in that topic. He didn't want that to happen. Basically he wanted it to act the same way when deleting topics that YaBBSE did.
Title: Re: Number of post
Post by: Anguz on June 15, 2004, 03:32:24 AM
didn't YaBB SE lower the post count when removing topics? I'm almost sure it did (^^;)
Title: Re: Number of post
Post by: Chris Cromer on June 15, 2004, 05:50:03 AM
No, it only lowered it when deleteing posts. Members post counts remained the same when topics where deleted.
Title: Re: Number of post
Post by: Oldiesmann on June 15, 2004, 01:10:14 PM
There's an easier way to do it:

In Sources/Removetopic.php

For topics:
Find
function removeTopics($topics, $decreasePostCount = true, $ignoreRecycling = false)

Replace
function removeTopics($topics, $decreasePostCount = false, $ignoreRecycling = false)

For posts:
Find
function removeMessage($message, $decreasePostCount = true)

Replace
function removeMessage($message, $decreasePostCount = false)
Title: Re: Number of post
Post by: Alexandre P. on June 23, 2004, 12:58:31 PM
Is it possible to have the topics / posts deletion to decrease by default the post count except on certain topics / posts (manually selected by the admins or the (global) moderators when deleting) ?  Like having a selection box next to every post title that when it is selected won't lower the poster's post count ?

As a mod, maybe ?
Title: Re: Number of post
Post by: Oldiesmann on June 25, 2004, 10:48:38 AM
Probably wouldn't be too difficult to add as a mod.