Adding FlashChat to the WowBB v. 1.6.x user interface
The steps in this yellow box should be done BEFORE running "install.php"! Open the lib.php file, which is located in the WowBB root folder. In other words, you will need to download this file from your web server, to your desktop, then open it with a text editor. I strongly recommend that you do NOT use Windows Notepad or Wordpad to do your text editing. Instead, you should use a more advanced text editor, like TextPad (www.textpad.com). Within the lib.php file, located this text: if (init()) { if ((!defined("NO_LANGUAGE_FILES")) and (USER_LANGUAGE != LANGUAGE)) require("languages/" . USER_LANGUAGE . "/lg_main.php"); $TEMPLATES = extract_templates("themes/" . USER_THEME . "/main_templates.txt"); } ... and replace it with this text: if (init()) { if ((!defined("NO_LANGUAGE_FILES")) and (USER_LANGUAGE != LANGUAGE)) require("languages/" . USER_LANGUAGE . "/lg_main.php"); $TEMPLATES = extract_templates(dirname(__FILE__)."/themes/" . USER_THEME . "/main_templates.txt"); } Here's what the lib.php file might look like after this edit is done: |
Editing the WowBB template
Open the main_templates.txt file, located in the "themes" directory on your web server, and find the following text:
<SPAN DIR="$text_direction">$logged_in_as - <A CLASS="nummessages" HREF="$base_dir/pm.php?folder_id=100">$num_messages</A> [<A CLASS="nummessages" HREF="$base_dir/login.php?out=1">%logout</A>]</SPAN>
Replace it with this text. If you installed FlashChat to a server folder other than "chat", then you will need to adjust the href=".." path accordingly.
<SPAN DIR="$text_direction">$logged_in_as - <A CLASS="nummessages" HREF="$base_dir/pm.php?folder_id=100">$num_messages</A> <A target="_blank" LASS="nummessages" HREF="chat/flashchat.php">FlashChat</A> [<A CLASS="nummessages" HREF="$base_dir/login.php?out=1">%logout</A>]</SPAN>
This will add the FlashChat link to your WowBB template. Please note that the target="_blank" attribute will cause FlashChat to open into a new browser window.
Now, repeat this process for EVERY template that you are using. If you only use the "default" template, then you only need to do this once. The templates are located in the "themes" folder, as shown below:
Here's what my main_templates.txt file looked like after making this edit:
Now, on the WowBB homepage, a new link will appear with the text "FlashChat". This link will only be visible to users who are logged-in to your system. Clicking on this link will open FlashChat in a new window (because of target="_blank" in the HTML that was added).
This should link to the "flashchat.php" file of FlashChat. When FlashChat loads, you should be automatically logged into the chatroom using your WowBB username. If you are an administrator of WowBB, then you will be logged into FlashChat as a moderator, which means that you can ban and boot other users.