Hi
Anyone know of a plugin or some code that can expire/delete messages after a specific time?
My site is getting cluttered with old inbox/sent messages which I'd like to be able to have automatically deleted after a specific time set by me as admin.
Anyone got an ideas/suggestions?
Mark
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Steve Clay@steve_clay

Steve Clay - 0 likes
- Team Webgalli@webgalli

Team Webgalli - 0 likes
- Purus@Purus

Purus - 0 likes
- Team Webgalli@webgalli

Team Webgalli - 0 likes
- Mark@MarkyMark

Mark - 0 likes
- Cash@costelloc

Cash - 0 likes
You must log in to post replies.From a usability/data integrity standpoint, I wonder if it would be better to periodically merge all old messages into a single "Archived Site Messages" text file (private to the user). Sorry can't suggest any working code.
Use cron to remove read messages. Also use the same thing to remove messages with time_created > X hours
@Webgalli: I am aware to auto-trigger the cron jobs automatically from cpanel. I believe this will trigger the actions that are alrady active within ELGG.
Is there any documentation on how to create a cron for creating these kind of actions in ELGG?
@Purus : yes, its already documented. Check the documentation.
Thanks Webgalli - can you help me with the cron command I'd need to use? Or point me in the right direction on the Elgg documentation?
http://docs.elgg.org/ - do a search on "cron". There are docs for setting up cron to hit your site at periodic times. Then take a look at the log_rotate plugin for an example of doing something on a schedule. Then look at the documentation for elgg_get_entities() in the code for how to get all messages older than some time stamp.