Simple Ajax Chat

説明

The simplest possible persistent chat solution!

Simple Ajax Chat makes it easy for your visitors to chat with each other on your website. There already are a number of decent chat plugins, but I wanted one that is simple yet fully customizable with all the features AND outputs clean HTML markup.

This plugin collects voluntary user chat data (i.e., Name, Chat Message, and optional URL field). It also gives the administrator the option to collect or not collect user IP information. Aside from those two things, this plugin does not collect or store any user data. Further, this plugin does not set any cookies, and it does not connect to any third-party locations. Thus, with the exception of optional IP collection, this plugin does not affect user privacy in any way.

Simple Ajax Chat cleans up after itself. All plugin settings and chat messages will be removed from your database when the plugin is uninstalled via the Plugins screen.

Stopping spam

This plugin works in two modes:

“Open Air” mode – anyone can chat

“Private” mode – only logged-in users can chat

“Private” mode stops all automated spam, but registered users may still send “spammy” chat messages. Likewise, the “Open Air” mode is super effective at blocking automated spam, but some manual spam may get through. As a general rule, the longer your chat forum is online, the more of a target it will be for spam.

If you like Simple Ajax Chat, please take a moment to give a 5-star rating. It helps to keep development and support going strong. Thank you!

FAQ

How do I change the alert sound?

Open the directory /resources/audio/ and replace the files msg.mp3 and msg.ogg with your desired audio files. You will notice lots of alternate sound files included in that same directory. Simply rename any pair of files to replace the defaults.

Where can I find a complete list of CSS selectors for styling the form?

You can add that to the plugin setting, “Custom CSS styles” or your theme styles, wherever. If adding via the plugin setting, make sure that the associated setting, “Enable custom styles” also is enabled.

How do I hide the Name, URL, and Message labels on the chat form?

Add this CSS: #sac-form label { display: none; }

You can add that to the plugin setting, “Custom CSS styles” or your theme styles, wherever. If adding via the plugin setting, make sure that the associated setting, “Enable custom styles” also is enabled.

Is it able to remove the “say it” button and just have send when press enter?

Add CSS: #sac-user-submit { display: none; }

You can add that to the plugin setting, “Custom CSS styles” or your theme styles, wherever. If adding via the plugin setting, make sure that the associated setting, “Enable custom styles” also is enabled.

The form is not displaying correctly, it looks all messed up. How do I fix this?

Simple Ajax Chat is designed to look great on any of the default WP themes and most other themes as well. Even so, every theme is different, and it’s impossible to test on the hundreds of thousands of themes that are available. So if the chat form is not looking awesome on your theme, it’s because your theme for whatever reason is applying its own particular styles. If this is the case, you can try disabling the plugin setting to “Enable custom styles”. If that doesn’t help, you can include your own custom CSS, or customize the plugin’s default styles. Alternately, you may include custom CSS via your theme’s stylesheet, and/or modify your theme’s CSS as needed to make things display as desired. Tip: to see how the chat form should look, check it out using any of the default WP themes.

The chat form is visible but new chat messages are not displayed.

If this is happening, and/or if you are receiving a “Failed opening required” error message, most likely your site’s wp-load.php file is not located in the usual default location (i.e., it has been moved to a custom location). If this is the case, you will need to edit the paths in /simple-ajax-chat-core.php (line 4) and /resources/sac.php (line 10). At some point I will be revamping the plugin so that this modification won’t be necessary.

How do I fix weird characters displayed in the chat box?

If you are seeing question marks or other weird characters or symbols in chat messages, you can try one of the following solutions:

Uninstall (delete) the plugin, and then re-install. Note that this technique resets all settings and deletes all chat messages.

Or, if you don’t want to lose any settings or chat messages, you can run the following SQL command: ALTER TABLE wp_ajax_chat CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

Either of these techniques should resolve any weird character issues. Note that the SQL command assumes you are using the default database prefix, wp_. So make sure to edit that part of the command if you are using a custom database prefix.

How do I customize the login-required message?

By default, the login-required message is “You must be a registered user to participate in this chat.” To customize this message, check out this forum post.

Chat Box not working in certain browsers (e.g., Chrome)?

Certain plugins (e.g., Shield Security) may implement security headers that prevent SAC from working properly. To resolve this issue, visit the “HTTP Headers” tab and go to “Security Headers tab” (or similar depending on which plugin you are using). There you can set the “Referrer Policy” to “Same Origin” and then save changes. SAC immediately should start working properly, but you also may need to clear the browser cache and hard reload the page.

評価

Lightweight and easy to customise. By far the most flexible chat plugin on WP, well done mate. All the others try to do too much for you, actually making it impossible to get it to do what I need. Yours is a bare bones beauty 🙂