Integrating FlashChat with phpBB v. 2.0.10

Welcome! This tutorial describes how to integrate FlashChat with your phpBB system. After the integration is completed, FlashChat will draw information from your phpBB user's database, so that only registered users of your site will be able to use FlashChat. In addition, phpBB administrators and moderators will automatically become moderators of the chat.

Step 1: Edit /inc/common.php to use the phpBB integration class

Before uploading to your server, you should locate the "common.php" file, which is located in the "inc" folder of FlashChat. There is one small edit that you must make to this file. In the block of statements which relate to CMS systems, only the line relating to the phpBB2CMS.php file should be uncommented. In other words, all of the other CMS-related lines should have "//" before them, as shown below (red arrow):

Step 2: Upload Files & Set File Permissions

Upload the FlashChat files to your phpBB server. You should have a folder called "mods" in your phpBB directory. If you do NOT have this folder, then create it. Then, within the "mods" folder, create a new folder called "flashChat", as shown below.

There are two FlashChat files which must be writable on your server: the "/inc/config.srv.php" file, and the appTime.txt file, within the "appdata" folder. These two files must be writable. On Unix and Linux servers, that means CHMODing the files to a writable format, like 755 or 777. As you can see from the directory structure below, there is a "mods" folder, and within that folder, the FlashChat files have been uploaded to a folder called "flashChat".

Step 3: Install FlashChat

Now, open your web browser to FlashChat's install.php file. This file is located in the "mods/flashChat" folder. If you did Steps #1 and #2 correctly, the values for Host, Login, Password, Database Name, and Table Prefix, should be automatically inputted for you. Thus, you only need to accept the default values. Your screen will probably look something like this (but with different values):

IMPORTANT: Some users have noted that the current phpBB2CMS.php file doesn't work with their version of phpBB (i.e., while running install.php, they do not see the phpBB database parameters, as they should). If you do not see the phpBB database info, try opening /inc/cmses/phpBB2CMS.php in a text editor, like TextPad (www.textpad.com) and change this line:

'pref' => $GLOBALS['table_prefix'] . "fc_",

To this:

'pref' => $GLOBALS['table_prefix'],

In other words, remove the extra "fc_" extension. Special thanks to Kelly - aka klj2000 - for pointing this out! For more information on this issue, visit the FlashChat bulletin board at http://www.tufat.com/phpBB2/

Step 4: Update the phpBB template with the FlashChat link

Locate the templates/subSilver subdirectory of the phpBB2 document root. If you are not using the subSilver template, then identify the directory of the template that you are using.

Now, you will need to edit the "overall_header.tpl" file within the "subSilver" template (or whichever template you are using). I recommend that you open this file in an advanced text editor like TextPad or EditPlus, but not Windows Notepad (or anything made my Microsoft, for that matter).

Locate this text:

<!-- END switch_user_logged_out -->

And add the following text IMMEDIATELY after it:

<!-- BEGIN switch_user_logged_in -->
&nbsp;<a href="mods/flashChat/flashchat.php" class="mainmenu" target="flashchat">
<img src="templates/subSilver/images/icon_mini_register.gif" width="12"
height="13" border="0" alt="Start FlashChat" hspace="3" />FlashChat</a></span>&nbsp;
<!-- END switch_user_logged_in -->

If you would like FlashChat to load into a new window every time the user clicks on this link, you may change the target="flashchat" to target="_blank". After making this change re-upload the overall_header.tpl file to your web server, and then refresh the phpBB page. if you are logged in, you'll see the new FlashChat link in the upper right corner of your screen, as shown below.

Step 5: Start Chatting!

When FlashChat loads, you should be automatically logged into the chatroom using your phpBB username. If you are an administrator of phpBB, then you will be logged into FlashChat as a moderator, which means that you can ban and boot other users.

Once you're logged into the chat, clicking on a user's "profile" option will load their phpBB profile page.

Please note that if a user or administrator logs into FlashChat, then closes the chat window, then immediately attempts to re-login, they will not be able to (they'll get "Another user is logged in with this username..."). The user must wait about 5 minutes before re-logging into the chat.