Log in

View Full Version : Auto delete messages after x day


ExcErr
04-22-2011, 01:46 PM
Hello! Please help make the mod Auto delete messages. The user writes a message and puts a label 1) Helpful - this message is not removed, 2) per day - is removed in 24 hours 3) Week - removed a week 4) a month - is removed in a month. Thank you.

Tasking Mickey
04-22-2011, 02:02 PM
Hello! Please help make the mod Auto delete messages. The user writes a message and puts a label 1) Helpful - this message is not removed, 2) per day - is removed in 24 hours 3) Week - removed a week 4) a month - is removed in a month. Thank you.
This should be a Paid Request, but I think a cron job would do it, you would set the cron job to delete messages after -whatever- days, and the job would do it.

kh99
04-22-2011, 02:05 PM
I could see maybe making a new db table with post id and 'date to remove' columns, and write a record to it if a post is added with a removal date, then have a daily schedules task to remove any expired posts (or maybe add a plugin on an existing cleanup task).

ETA: ...wrote this before reading the above, but yeah, same idea.

--------------- Added 1303496531 at 1303496531 ---------------

Also - unless you want to pay someone to develop it for you, you shouldn't put it "Paid Requests". You could put it in "Unpaid Requests" though.