WordPress Plugin: Simple Ajax Chat

[ Simple Ajax Chat ] Simple Ajax Chat displays a fully customizable Ajax-powered chat box anywhere on your site. SAC 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 for easy styling.

Simple Ajax Chat is based on Jalenack’s Wordspew (aka AJAX Shoutbox), which I’ve been using on my sites since the plugin was released back in 2005 (ish). Wordspew works great even today, but it hasn’t been updated in seven years, so I decided to adopt and improve the plugin with fresh code, clean markup, better control, and more features. Here’s a screenshot showing the plugin used for an imaginary, rather egocentric chat:

[ Simple Ajax Chat: Chat Box ]
Screenshot of chat-box display (view more screenshots)

Features

Simple Ajax Chat uses Ajax to enable new chats to appear without refreshing the page. The form works great even without JavaScript, but the page is refreshed for each new message. Here is an overview of the plugin’s main features:

  • Plug-n-play functionality, no configuration required
  • Display on any post or page with the shortcode
  • Display anywhere in your theme template with the template tag
  • Includes default CSS styles and enables custom CSS from the settings
  • JavaScript/Ajax goodness loads new chats without refreshing the page
  • Also works when JavaScript is not available on the user’s browser
  • Clean markup makes it easy to style the appearance as you please
  • New chat messages fade-in with custom duration and color
  • Includes manage-chats panel for editing and deleting chats
  • Links included in chats include `_blank` target attributes
  • Includes complete map of all available CSS hooks
  • Includes built-in banned-phrases list
  • Automatic smileys supported :)
  • On-demand restoration of all default settings
  • Super-slick toggling settings page

One of my favorite new features is the built-in chat blacklist, where you can add any phrase from the settings page and have it magically disappear from the username, chat input, or URL (if enabled). With the old plugin, I had to modify the source code to block stuff, but now it’s all handled from the comfort of the WP Admin.

Customize everything

The Wordspew plugin included a minimal set of options, which is one of the reasons I found it so useful. So I wanted to keep that simplicity while adding some much-needed features. It’s a balance that I think stays true to the original. Here’s a list of things you can customize with Simple Ajax Chat:

  • Customize the update interval for the Ajax-requests
  • Customize the fade-duration for new chat messages
  • Customize the intro and outro colors for new chats
  • Option to require login/registration to participate
  • Option to enable/disable URL field for usernames
  • Option to use textarea for larger input field
  • Customize the default message and admin name
  • Customize the appearance with your own CSS
  • Option to enable/disable custom styles
  • Option to load the JavaScript only when the chat box is displayed
  • Add custom content to the chat box and chat form
  • Built-in control panel to edit and delete chats
  • Built-in blacklist to ban specific phrases from the chat

Installation & Usage

Activate the plugin and visit the SAC settings page to customize your options. Once everything is customized as you like it, display the form anywhere using the shortcode or template tag.

Shortcode & Template Tag

Use this shortcode to display the chat box on a post or page:

[sac_happens]

Use this template tag to display the chat box anywhere in your theme template:

<?php if (function_exists('simple_ajax_chat')) simple_ajax_chat(); ?>

Screenshots

Here are some screenshots of Simple Ajax Chat in action (using default settings):

Demo

Online demo available at WP-Mix: Simple Ajax Chat DEMO

Download

Download Simple Ajax Chat from the WordPress Plugin Directory:

Download Simple Ajax Chat