Integrating FlashChat

This document describes the steps that you, the FlashChat administrator, should take to integrate FlashChat with a Content Management System (CMS).

What is a CMS?

"CMS" stands for "Content Management System", and generically it means any "out-of-the-box" web system. For example, the bulletin board from phpbb.com, or the ready-made websites from phpnuke.org and geeklog.net are examples of such systems. Even TUFaT.com has a nice little CMS called EasySite, which I highly recommend.

What will the result be like?

Successfully completing these steps should ensure that only registered users of your CMS system are allowed to chat in FlashChat. Users will be required to authenticate themselves via a simple login form if they are not already logged-in to your system. If they are already logged-in, then these steps will permit FlashChat to auto-load the chat interface without showing the login screen at all.

This integration tutorial will allow FlashChat to load in an new web browser window. This method was chosen because most of the time, users will wish to continue browsing your website while they chat. If you know a bit of HTML and Javascript, it's easy to make the chat load in a named window (by specifying the "target" attribute of the anchor tag) or a popup window, using Javascript's window.open() command.

What if it doesn't work?

There are often many versions of these CMS systems, and evern more server configurations. FlashChat has only been tested under specific versions of these CMS systems (usually the default installation) and in the most common PHP/MySQL setups. Of course, it's always possible for a web host to set very restrictive security settings which may prevent FlashChat from working. In such cases, it's best to post a message on the TUFaT.com forum regarding the incompatibility. If FlashChat doesn't correctly integrate with your system, then you can always use it in a stand-alone mode, which in my opinion is still worth $5. Or, you can try tweaking the integration file yourself, if you know a little PHP. The integration files are kept in the /inc/cmses/ folder, which comes with the FlashChat download.

IMPORTANT INFORMATION for Some Systems...

vBulletin: Please input your vBulletin license number in /inc/cmses/vbulletinCMS.php (for 3.0.3) or /inc/cmses/vbulletinCMS2.php (for 3.0.7) before running the installer.

WowBB: Please perform these steps in the Yellow Box, before running the installer.

phpBB: Previous versions of FlashChat installed it in the "mods" folder. The current integration of FlashChat with phpBB installs in the "chat" folder, which is one-level deep rather than two-levels deep.

Xoops: Previous versions of FlashChat installed as a module, in the "modules" sub-folder, but no more! For FlashChat 4.x, you should put FlashChat's files in teh Xoops root folder, in the "chat' sub-folder (i.e., one-level deep, instead of the previous two-levels deep).

Joomla: Gene Wells has created a short tutorial on Joomla integration, which you can use instead of this integration tutorial. Thanks, Geno!

Ok, Let's Get Started!

STEP 1: Uploading the Files

The first few steps are identical for all CMS systems. You have to upload the FlashChat files to your web server, to the base/root folder of your CMS system. For example, on TUFaT.com, phpBB is installed to this location

http://www.tufat.com/forum/

... so, I would upload the FlashChat program files, in the "chat" folder which comes with FlashChat, to here:

http://www.tufat.com/forum/chat/

In fact, you can actually click on this link to access FlashChat, but as you can see, you will need to be a registered phpBB user on the TUFaT.com forum.

Once the files have been uploaded, you should start the FlashChat installer, by opening the "install.php" file in your web browser. For example, if you have uploaded the "chat" folder to your server at this location:

http://{your domain}/chat/

... then, to begin the installation, you should open this file with your web browser:

http://{your domain}/chat/install.php

This will result in the screen shown below. If you do not see this screen, then please review the previous steps to ensure that they have been done correctly. Be sure to upload the files using binary FTP, and be sure that ALL files have been uploaded.

You must CHECK the box, circled in red below, that says "Check here if you wish to integrate FlashChat...". This will direct you to a special part of the FlashChat installer, which will perform the integration with your CMS system's user database.

Of course, it goes without saying that all items in this step should say "Yes" to the right of them. If they do not, then there is something wrong with your setup. If you are on a Windows server, it may be necessary to contact your web host to change the permissions of files and folders. If you are on a Unix or Linux server, then you can do this using your FTP program, like Absolute FTP or WS FTP or CuteFTP or any of a thousand other such programs. You should consult yor FTP program documentation for information on changing files and folders via FTP.

STEP 2: Installer Integration Step

Now, let's finish the wizard. Assuming that your server environment checks out OK, click on "Continue" to proceed to the next step, shown below. You should choose the system that matches yours.

If you cannot find the system that matches yours, you may try choosing the closest one, but be aware that the integration might not work. CMS providers are constantly changing their system architectures, and the developers of FlashChat have not always been able to keep up with those changes. If you report the error on the TUFaT.com Forum, then it's likely that an update will be made available, however. Updates are sometimes posted by myself or other users on the FlashChat resources page.

Next, you will be asked for the database information.

IMPORTANT: The items in this step should be automatically entered for you. If they are not, then there is a problem, since it means that FlashChat isn't able to read your MySQL login information from the CMS configuration files. You should NOT change these values (except for the room list).

In the event that you make a mistake and have to re-start the installation, you can restart the installer by again opening the "install.php" file in your web browser. However, you will also need to manually remove any MySQL database tables that the FlashChat installer created. phpMyAdmin or phpFlashMyAdmin can be used for that. For security and safety reasons, the FlashChat installer does not make any attempt to remove tables from your database. So, if you re-start the installer, you may get a "table XYZ exists" error.

The FlashChat installer creates the the following tables for you (these are the tables that you will need to remove if you have to re-start the installer):

[prefix]bans
[prefix]bot
[prefix]bots
[prefix]connections
[prefix]conversationlog
[prefix]dstore
[prefix]gmcache
[prefix]gossip
[prefix]ignors
[prefix]messages
[prefix]patterns
[prefix]rooms
[prefix]templates
[prefix]thatindex
[prefix]thatstack

Please note that some of these tables are created by the "bot" system in the second half of the installer, so depending on how far along you are in the installer, you may have all or only some of these tables. [prefix] is, of course, the table prefix that you specified in Step 2, and is likely to be different depending on the CMS choice that you specified.

STEP 3: Finish Installer & Test Integration

In the next step of the FlashChat installer, you may add an AIML "bot" to FlashChat. This step can take a long time (5 - 20 minutes) depending on your server speed and the number of knowledge bases that you load into FlashChat. It may add about 10 MB of data to your database. A "bot" is an Artificial Intelligence (AI) entity which you can chat with. Only an administrator can add/start/kill bots.

When you've completed the installer - with or without the bot step - you can test your integration by doing the following: Load the "flashchat.php" file which comes with FlashChat, and input your CMS login - i.e., a valid login for a registered user of the CMS system.

Thus, if you installed FlashChat here:

http://{your domain}/chat/

... then, you would open this file using your web browser:

http://{your domain}/chat/flashchat.php

This will allow you to skip the HTML interface for FlashChat, and directly load the Flash interface. If you are already logged in to your CMS system, then FlashChat should immediately load the chat, without presenting the login prompt. If you are NOT already logged in to your CMS system, then you will receive a login prompt.

Assuming that you are able to login to FlashChat - either via auto login or by providing your CMS login credentials at the login prompt, you should now see the FlashChat main interface. Administrators of your CMS system should automatically become moderators of FlashChat (they will have an "A" or "M" next to their name, most likely). Only administrators are permitted to start "bots", and perform special administrative tasks like kick/ban users.

In addition, clicking on a user's name in the room list will present a "profile" option, which is not available when using FlashChat in so-called "stateless" mode (whereby users can chat without registering). This option should load the CMS system profile in a new window, as shown below. This screenshot was taken after FlashChat was integrated with the MD-Pro CMS system, so this profile window is the MD-Pro profile.

STEP 4: Adding FlashChat to the CMS Interface (optional)

At this point, FlashChat is integrated with your CMS system's user database!

The final step is to add a link to FlashChat to the menu or interface of your CMS system. This step will differ based on which CMS system you are using. Most systems have some form of HTML administrative interface whereby links can be quickly to user menus. If you are using a system which does not have such an interface (like AZDG Dating), then you may add a link by directly inserting HTML code to your system's template.

Click on the links below to find out how to do this for your system.

CPG-Nuke e107
EasySite GreekLog
IPB (Invision Power Board) LunaByte (Enigma)
Mambo MD-Pro
phpBB PHP-Fusion 4 / PHP-Fusion 6
PHP-Nuke POST-Nuke
Simple Machines (SMF) vBulletin
WowBB XMB
Xoops Joomla
osDate (coming soon!) MyBB
Integration classes are also available for aeDating, osDate, and Dating Pro.

All done! I hope that you enjoy FlashChat. If you have any feedback on these integration instructions, please post them on the TUFaT.com forum. If you have made an update or improvement to one of the CMS integrations, or if you have created an integration class for a system not listed here, I encourage you to post it on the FlashChat resources page.

Thanks!
Darren