Message System: Clear Messages (SKINS)(LANG)

Version 1.47

Feature
Finished

Related forum thread: http://forum.directadmin.com/showthread.php?t=50410 http://forum.directadmin.com/showthread.php?t=48021 Ability to clear messages from the Message System based on the Subject and/or the Date of the message. Specific code to only do this one task, so should be quite speedy. Changes can be found on the bottom of the "Message System" as well as in the Brute Force Monitor (same table, different default selected value) ------------------ Other optimization found which will greatly speed up the Message System. Previous method would search each message ID directory for newest message or ticket date, for all files in that ticket # directory. This should now only apply to a ticket, and the need for this for a "message" has been removed. For messages, the newest message will always be the only message, and this st_mtime so happens to have already been loaded with the main 000.conf in the ConfigFile class. Optimization for each "message" prevents the need for directory read of it's files, plus the fstat on each file in that directory. That's all removed for each message ID which should greatly speed up any Message System that has many "Messages".. probably exponentially faster. ------------------ The above GUI system only applies to the ticket.list files. To delete the actual data from disk (data/tickets/0000*/*), the following directadmin.conf options are related: delete_messages_days=0 delete_tickets_days=0 which is the default, 0 meaning "never delete". To keep the disk clean, set the number of days you'd like each message type to last, in days. When finding the date of a ticket, DA will use the time of the last reply. So if you've got a ticket going on for 3 years, the time is based on the most recent message.. Meaning, if you replied yesterday to the ticket that was opened 3 years ago.. and the delete_ticket_days=365, then this ticket will not be deleted. Note, if you delete the data from disk, and the ticket number is still in the tickets.list file, that's fine. DA will now ignore missing tickets, and remove that bad entry from the tickets.list when noticed. (saves having to hunt through all User tickets.list files for any message disk directory deletion) ===================== SKINS --------- New internal text: lang/en/internal/clear_message_system_list.txt Format is the same as the security_questions.txt where index/line 1 must have a value of the last index name. Index/line 2 should be the wording for "-- anything --" Index/line 3 should be the wording for "Brute-Force Attack detected in service log" (as the BFM has the table, and defaults to index 3)... which is hardcoded, so don't translate index 3 or it won't be found. --------- user/ticket/main.html add table token: |CLEAR_MESSAGES_TABLE| also change the "email a copy" form to be something like this: <form action="CMD_TICKET" method="post"> <input type=hidden name=action value="email"> <input type=checkbox name=ON value="yes" |EMAILCHECKED|> Email a copy of all messages to <input size=30 type=text name=email value="|EMAIL|"><br> Automatically delete tickets older than <input type=text size=1 name=delete_tickets_days value="|DELETE_TICKETS_DAYS|"> days. (0 = never)<br> Automatically delete messages older than <input type=text size=1 name=delete_messages_days value="|DELETE_MESSAGES_DAYS|"> days. (0 = never)<br> <input type=submit name=save value="Save"> </form> --------- admin/brute_force_monitor.html add table token: |CLEAR_MESSAGES_TABLE| --------- ===================== LANG lang/en/internal/ticket.txt - up to 58 lang/en/user/ticket/main.html

Interested to try DirectAdmin? Get a 30-day Free Trial!