Hi!
I want to make it so that if I remove an entire thread (Not just a post) then no-body's post counts go down. As I really need to tidy up some of my boards but this will half some of my member's post counts. Is this possible, and if so, how?
Thanks :)
Surprisingly simple actually...
In RemoveTopic.php
Search for:
function removeMessage($message, $decreasePostCount = true)
{
Replace with:
function removeMessage($message, $decreasePostCount = false)
{
You can always change that back later if you need to.
Quote from: Oldiesmann on April 20, 2004, 01:38:36 PM
Surprisingly simple actually...
In RemoveTopic.php
Search for:
function removeMessage($message, $decreasePostCount = true)
{
Replace with:
function removeMessage($message, $decreasePostCount = false)
{
You can always change that back later if you need to.
Thanks although that is for removing a certain persons post in a thread. I want to have it so that when I remove an entire thread no-ones post counts go down....
Ok, so you want the removeTopics function instead...
Find:
function removeTopics($topics, $decreasePostCount = true)
{
Replace:
function removeTopics($topics, $decreasePostCount = false)
{
Quote from: Oldiesmann on April 20, 2004, 01:53:45 PM
Ok, so you want the removeTopics function instead...
Find:
function removeTopics($topics, $decreasePostCount = true)
{
Replace:
function removeTopics($topics, $decreasePostCount = false)
{
THANKS YOU :) It worked :)
No problem. It's amazing how simple these things can be...
another thing you could do is enable the thread recycling system and have a hidden board where all deleted topics go. it wouldnt reduce the post count (i dont believe), and it saves you the heartache of permanently deleting the wrong thing by accident.
Quote from: nave on April 20, 2004, 02:25:51 PM
another thing you could do is enable the thread recycling system and have a hidden board where all deleted topics go. it wouldnt reduce the post count (i dont believe), and it saves you the heartache of permanently deleting the wrong thing by accident.
That's a pretty good idea :) Thanks Nave :)
your welcome. its a wonderful feature that has saved my behind several times already. and its nice that if a mod deletes a thread, it can go into a board only admins can see, and then judge whether or not it should have been deleted, and no other members can see it. its very handy.
Quote from: nave on April 21, 2004, 04:12:48 AM
your welcome. its a wonderful feature that has saved my behind several times already. and its nice that if a mod deletes a thread, it can go into a board only admins can see, and then judge whether or not it should have been deleted, and no other members can see it. its very handy.
Cool! This system really is great, I have it on my forum now! Thanks :)
It's also a good move for administration. Not only can the staff see and judge the removal, but you also have a record of any previous violations on your board. It's nice if you like to try and give second chances like I often do. It also lets you know the ones to keep an eye on for future problems just in case. That's not even mentioning the fact that if someone tries to challenge your decision, you have the original information right there in your hand.
I am using the recycling system but when I remove a topic (it goes to the recyling forum) members posts do go down. Am I missing something here?
James
Using Beta 5
there is a setting to not count posts in certain boards. perhaps your recycle bin is set to not count posts.
Quote from: Jack.R.Abbit on August 09, 2004, 04:19:02 PM
there is a setting to not count posts in certain boards. perhaps your recycle bin is set to not count posts.
I thought that too at first but then checked the setting:
Count Posts
Makes new replies and topics raise members' post counts.I have it checked ??? Does that only count for new posts
created within the recycling board?
When a post is sent to the recycle bin, the user's post count is decreased.
-[Unknown]
maybe it should only do that if the recycle bin board is set to not count posts?
Quote from: Jack.R.Abbit on August 10, 2004, 09:13:34 AM
maybe it should only do that if the recycle bin board is set to not count posts?
I'd agree with this method. That way you can still do maintenance on the forum and still keep users happy.
I don't think you understand. I'll try once again to explain:
Step 1. You delete a post, and it checks to see if it should use the recycle bin - it should.
Step 2. It checks if the current board counts posts, and if it does, it decreases the poster's post count.
Step 3. The message is moved to the recycle bin board.
This much you are understanding. Now, let's get to the part you are missing:
Step 4. You delete the post from the recycle bin.
Step 5. It checks to see if this post was recycled, and if it was, does NOT reduce the post count.
Step 6. The post is deleted.
This is the only way to handle post counts AS EXPECTED when deleting posts, ESPECIALLY when you have moderators who do not know even of the existance of the recycle bin. The post count is decremented oncem when it is initially "deleted" - even if only to the recycle bin.
-[Unknown]
I do understand that part - as that is exactly what is happening with my board. A mod removes a topic - post count goes down. The post is in the Recycle board and when I delete from there nothing happens to post count. It makes sense but I've got a couple of members who post freqently in one of the boards on timely topics (sort of notifications, news items, that kind of thing). After the times have passed these are no longer needed and so we remove the topic - this devestates the post count and you know how people can be about post counts ;)
It is not a huge concern but I wanted to make sure there was not a way for me to prevent the post counts from going down if simply moving a topic to the recycle board...I guess not. I suppose I could manually move the topic into the recycle board rather than use the REMOVE TOPIC option....hmmm.
So, you're saying you don't want the post count decreased... nothing to do with the recycle bin at all!
I'm just saying that there is no problem with the way the recycle bin interfaces with postcount decreasing...
-[Unknown]
Sort of. I guess what I am saying is that it seems to me that a good way to manage it would be to have post count decrease only when the topic is deleted from the recycle board. That way, topics that are removed from the normal boards don't affect post count until you later decide as moderator that the the topic was truly garbage and delete it from the recycle board.
Hopefully this is a more clear example of what I thought the recycle bin did:
Step 1. You delete a post, and it checks to see if it should use the recycle bin - it should.
Step 2. Nothing happens to post count at this time since the post is still on the forum (in recycle board)
Step 3. You decide to delete the post (from the recycle board) -- this decreases the poster's post count.
Step 3. The message gone.
But, what if...
- you use the recycle bin only for admins, and you don't want your moderators getting confused when they delete people's posts?
- you want to (like we do here) use the recycle bin to just BULK STORE all the deleted posts until they are reviewed for important information or possible legal problems?
- you turn off the recycle bin feature and delete it?
-[Unknown]
I can see both sides to this. So you use the "count post" setting of what ever the recycle bin board is. If you think the moderators will get confused and that is more important than maintaining people's true post count (or you just use it for bulk storage), then set the recycle bin to not count posts. Otherwise, you set it to count posts, maintain true post count and deal with moderator confusion another way...
Scenerio #1
Step 1. You delete a post, and it checks to see if it should use the recycle bin - it should.
Step 2. It checks to see if post in the recycle bin should count - it should
Step 3. Nothing happens to post count at this time since the post is still on the forum (in recycle board)
Step 4. You decide to delete the post (from the recycle board), it checks to see if recycle bin posts counted, they do so decreases the poster's post count.
Step 5. The message gone
Scenerio #2
Step 1. You delete a post, and it checks to see if it should use the recycle bin - it should.
Step 2. It checks to see if post in the recycle bin should count - it should not
Step 3. Post count is reduced
Step 4. You decide to delete the post (from the recycle board), it checks to see if recycle bin posts counted, they don't, so don't decrease the poster's post count (it already was).
Step 5. The message gone.
Scenerio #3
Step 1. You delete a post, and it checks to see if it should use the recycle bin - it should not.
Step 3. Post count is reduced
Step 3. The message gone.
Scenerio #4
Step 1. You delete a post, and it checks to see if it should use the recycle bin - it should.
Step 2. It checks to see if post in the recycle bin should count - it should
Step 3. Nothing happens to post count at this time since the post is still on the forum (in recycle board)
Step 4. You decide to delete the recycle board, it checks to see if recycle bin posts counted, they did so decrease the poster's post count. (Wouldn't this happen anytime you removed a board anyway?)
Step 5. The recycle bin and all messages gone
Scenerio #5
Step 1. You delete a post, and it checks to see if it should use the recycle bin - it should.
Step 2. It checks to see if post in the recycle bin should count - it should not
Step 3. Post count is reduced
Step 4. You decide to delete the delete the recycle board, it checks to see if recycle bin posts counted, they don't, so don't decrease the poster's post count (it already was).
Step 5. The recycle bin and all messages gone
Is there an updated function for this on SMF 1.1.2
I dont want people's post count to be reduced by deleted topics or posts....
(I have a vague memory, there was a switch for this somewhere in the admin panel.. but cant find it now :-\)
RemoveTopic.php
// Decrease the post counts.
if ($decreasePostCount)
{
$requestMembers = db_query("
SELECT m.ID_MEMBER, COUNT(*) 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__);
if (mysql_num_rows($requestMembers) > 0)
{
while ($rowMembers = mysql_fetch_assoc($requestMembers))
updateMemberData($rowMembers['ID_MEMBER'], array('posts' => 'posts - ' . $rowMembers['posts']));
}
mysql_free_result($requestMembers);
}
cant identify the false true thing in this file now.... and dont want to mess around with it :-\
Still need help with this?
Maybe this is what you are looking for? Post Count Changes (http://www.simplemachines.org/community/index.php?topic=138539.0).