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.

Tip: Just getting started with SAC Pro? Check out the Quick Start Guide »

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 week
  • three_days — clears messages every three days
  • one_day — clears messages once per day
  • eight_hours — clears messages every eight hours
  • sixty_minutes — clears messages every sixty minutes
  • thirty_minutes — clears messages every thirty minutes
  • three_minutes — clears messages every three minutes
  • sixty_seconds — clears messages every sixty seconds
  • null — deletes the auto-clear schedule and disables auto-clearing
Important: When auto-clearing is enabled, you may need to reload the page that displays your chat form in order to view latest chat messages. Likewise if you change the 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=""]

That will send an alert to 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.

Tip: For more ways to customize your chat forms, check out the SAC Pro Shortcode Reference »