FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » autodelete feature
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
autodelete feature [message #28261] Sat, 15 October 2005 12:39 Go to next message
JanRei is currently offline  JanRei   Germany
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 #28300 is a reply to message #28261] Sun, 16 October 2005 16:59 Go to previous messageGo to next message
JanRei is currently offline  JanRei   Germany
Messages: 361
Registered: October 2005
Location: Germany
Karma: 0
Senior Member
Contributing Core Developer
Translator
Oh, I didn't expect a “technical” answer...

I'm a member of a forum, where we have the following problem: The old forum had an autodelete feature, but since the switch to FUDforum the mods have to delete the topics from the "play area" manually, which results in losses in the post count.

Before I make a suggestion to the admin of the forum, I want to know whether your suggestion considers the wishes I expressed in the post above.


Thank you
JanRei
Re: autodelete feature [message #28303 is a reply to message #28300] Mon, 17 October 2005 03:09 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 #28360 is a reply to message #28261] Wed, 19 October 2005 17:49 Go to previous messageGo to next message
JanRei is currently offline  JanRei   Germany
Messages: 361
Registered: October 2005
Location: Germany
Karma: 0
Senior Member
Contributing Core Developer
Translator
Is it possible to store the post count for each user in the database?

If a mod / admin deletes a topic by clicking on "delete" reduce the post count.
If a user submits a message increase the post count.
But if a topic is deleted by autodelete or topic prunning simply don't touch the post count.

Re: autodelete feature [message #28361 is a reply to message #28360] Wed, 19 October 2005 22:12 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 #28363 is a reply to message #28261] Thu, 20 October 2005 05:04 Go to previous messageGo to next message
JanRei is currently offline  JanRei   Germany
Messages: 361
Registered: October 2005
Location: Germany
Karma: 0
Senior Member
Contributing Core Developer
Translator
Wouldn't it be possible then to build a "autodelete feature" that doesn't affect the post count?

Do you have writen the message delete code only once for the whole forum?
Or can I find it in the topic prunning code (admprune.php) too?
Re: autodelete feature [message #28370 is a reply to message #28363] Thu, 20 October 2005 14:05 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous messageGo to next message
JanRei is currently offline  JanRei   Germany
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous messageGo to next message
JanRei is currently offline  JanRei   Germany
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 #28383 is a reply to message #28261] Thu, 20 October 2005 20:31 Go to previous messageGo to next message
JanRei is currently offline  JanRei   Germany
Messages: 361
Registered: October 2005
Location: Germany
Karma: 0
Senior Member
Contributing Core Developer
Translator
Is it possible to integrate that schedule in the forum:
The admin can specify after what period the topic prunning should be run (with the specified settings).


Re: autodelete feature [message #28386 is a reply to message #28383] Thu, 20 October 2005 21:18 Go to previous message
Ilia is currently offline  Ilia   Canada
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Full posts for approval by email & reply back to be approved
Next Topic: Totally stop email to members feature
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Dec 03 18:07:28 GMT 2024

Total time taken to generate the page: 0.02560 seconds