Customize Title, Welcome Message and Buttons in Ajax Chat 0.8.3

Blue Imps’ AJAX Chat script is easy to install and fairly well documented in terms of customization options.  It has a sleek, uncluttered design that adheres XHTML standards.  Judging by the topics on the support discussion board at SourceForge.net, it appears that users find Ajax Chat’s compatibility with their existing forum web software a big plus, too.

The examples below were successfully applied to the software in standalone mode…

Change the default title from “Ajax Chat” to something else.

  1. Open [two-letter language code].php located in /path/to/chat/lib/lang.  For example, /chat/lib/lang/en.php for an English translation.
  2. Edit line 11:

    $lang[‘title’] = Ajax Chat‘;

  3. Avoid using single quotes.
  4. Save changes.

Add a custom welcome message for chat room users.

  1. Open custom.js located in /path/to/chat/js.
  2. Add the following to the end of the file (related wiki entry):

    ajaxChat.customInitialize = function() {
        ajaxChat.addChatBotMessageToChatList(‘Welcome to our chat. Please follow the rules.‘);
    }

  3. Avoid using single quotes.
  4. Save changes.

Remove and disable “Quote”, “Code”, “URL” and “Image” Buttons.

  1. Open loggedIn.html located in /path/to/chat/lib/template.
  2. Comment out the appropriate input button tags in the bbCodeContainer division (starts at line 135).
  3. Save changes.
  4. Open config.js located in /path/to/chat/js.
  5. Comment out the respective array items in the list of allowed BBCodes (starts at line 118) making sure that the last item in the array is not followed by a trailing comma.
  6. Save changes.

Add and/or manage the admin account and other registered users.

  1. Open users.php located in /path/to/chat/lib/data.
  2. See examples (defaults) for administrator, moderator and user accounts.
  3. Modify a user’s name, password and/or access level.  Or, copy and paste the desired array code block to create a new user making sure to increment the array number per new user:

    $users[number] = array();
    $users[number][‘userRole’] = AJAX_CHAT_USER;
    $users[number][‘userName’] = ‘newuser‘;
    $users[number][‘password’] = ‘password’;
    $users[number][‘channels’] = array(0,1);

  4. Save changes.

On a side note, the mySQL database table ajax_chat_messages will grow quickly because it stores individual chat messages.  Instead of manually deleting the entries via phpMyAdmin, a cron job could be used to reset/truncate the data.

Advertisements

Tags: , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s


%d bloggers like this: