autodelete feature [message #28261] |
Sat, 15 October 2005 12:39 |
JanRei
Messages: 361 Registered: October 2005 Location: Germany
Karma: 0
|
Senior Member Contributing Core Developer Translator |
|
|
I want to suggest an "autodelete" feature that deletes topics, when the last message is a certain period ago. (similiar to "topic prunning" just automatically)
I would appreciate if that
* wouldn't affect the post count
* could be limited to certain forums, specified by the admin
|
|
|
Re: autodelete feature [message #28281 is a reply to message #28261] |
Sat, 15 October 2005 17:58 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
What you are trying to do would be best done via a separate script running via cron. I suggest taking the code from admprune.php for this purpose.
FUDforum Core Developer
|
|
|
|
Re: autodelete feature [message #28303 is a reply to message #28300] |
Mon, 17 October 2005 03:09 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
If you want a message/topic to be removed and your post count to remain as before, then this is not possible.
I'd suggest your admins move old messages to a separate read-only archive forum, thus retaining old messages while speeding up main forums. This would also allow retaining of post counts.
FUDforum Core Developer
|
|
|
|
Re: autodelete feature [message #28361 is a reply to message #28360] |
Wed, 19 October 2005 22:12 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The forum already stores the user's post count in the users table on a per-user basis. But, when someone removes a message this value is update to reflect the reduced message count. You can adjust the message delete code to not touch this value.
FUDforum Core Developer
|
|
|
|
Re: autodelete feature [message #28370 is a reply to message #28363] |
Thu, 20 October 2005 14:05 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The admprune.php script cheats it just deletes the messages and topic and relies on consistency checker to "fix-up" the rest. Otherwise it would be way too slow when deleting many messages.
If you wanted to prevent post count from being reduced on normal delete (not via prunning) you'd need to modify the delete() method inside imsg_edt.inc.t
FUDforum Core Developer
|
|
|
Re: autodelete feature [message #28377 is a reply to message #28261] |
Thu, 20 October 2005 19:35 |
JanRei
Messages: 361 Registered: October 2005 Location: Germany
Karma: 0
|
Senior Member Contributing Core Developer Translator |
|
|
I think modifications to the imsg_edt.inc.t would affect all kinds of deleting a message (that includes clicking on the "delete" button). Am I right?
I don't want to delete many messages at a time, maybe 1-5 topics.
And I want to run this script once a day, this shouldn't slow down the forum.
Would it possible to rewrite the topic prunning code so that it considers the following:
- really delete the messages with a own message delete code, without post count modifications
- limitation for the prunning (only one forum)
Thank you
[Updated on: Thu, 20 October 2005 19:36] Report message to a moderator
|
|
|
Re: autodelete feature [message #28378 is a reply to message #28377] |
Thu, 20 October 2005 19:43 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
JanRei wrote on Thu, 20 October 2005 15:35 | I think modifications to the imsg_edt.inc.t would affect all kinds of deleting a message (that includes clicking on the "delete" button). Am I right?
|
Correct, it will affect all message removal operations.
Quote: |
I don't want to delete many messages at a time, maybe 1-5 topics.
And I want to run this script once a day, this shouldn't slow down the forum.
Would it possible to rewrite the topic prunning code so that it considers the following:
- really delete the messages with a own message delete code, without post count modifications
- limitation for the prunning (only one forum)
Thank you
|
Topic prunning control panel already allows you to delete messages in just the specified forum and/or category. It also does not update counts as it stands now.
FUDforum Core Developer
|
|
|
Re: autodelete feature [message #28381 is a reply to message #28378] |
Thu, 20 October 2005 19:51 |
JanRei
Messages: 361 Registered: October 2005 Location: Germany
Karma: 0
|
Senior Member Contributing Core Developer Translator |
|
|
Ilia wrote on Thu, 20 October 2005 21:43 |
Topic prunning control panel already allows you to delete messages in just the specified forum and/or category. It also does not update counts as it stands now.
|
That simplifies the thing. I was confused, because of your answer, that deleting messages can't be done without updating the post counts.
So the only thing to be done is to schedule the running of the script.
[Updated on: Thu, 20 October 2005 20:29] Report message to a moderator
|
|
|
|
Re: autodelete feature [message #28386 is a reply to message #28383] |
Thu, 20 October 2005 21:18 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Not really, since schedualing requires access to system tools like cron etc...
FUDforum Core Developer
|
|
|