Simple Ajax Chat Pro (SAC Pro) enables automatic clearing of all chat messages. This is useful for sites with heavy chat activity, to avoid excessive database usage. Also useful for things like scheduled chats, timed chats, chat demos, and so forth. This quick tutorial explains how to enable auto-clearing, and optionally send email alerts for each auto-clear event.
Enable auto-clear chats
If you haven’t already done so, create a chat box. For example:
[sacpro form_id="123"]
To enable automatic clearing of chat messages, add the auto_clear
attribute:
[sacpro form_id="123" auto_clear="eight_hours"]
The value of auto_clear
can be any of the following:
one_week
— clears messages every weekthree_days
— clears messages every three daysone_day
— clears messages once per dayeight_hours
— clears messages every eight hourssixty_minutes
— clears messages every sixty minutesthirty_minutes
— clears messages every thirty minutesthree_minutes
— clears messages every three minutessixty_seconds
— clears messages every sixty secondsnull
— deletes the auto-clear schedule and disables auto-clearing
auto_clear
value on the shortcode, reload the page to view latest chats.Send auto-clear email alerts
When you’re managing chat rooms, it can be useful to receive an email alert whenever chat messages are auto-cleared. To enable alerts, add the auto_clear_alert
attribute:
[sacpro form_id="123" auto_clear="eight_hours" auto_clear_alert="email@example.com"]
That will send an alert to email@example.com
for each auto-clear event. That way you can keep a close eye on things. Obviously you’ll want to change the email address to one of your own. At this time, only one address is supported.