Hi All
Here are some instructions and the files attached in a zip file.
First of all you need to add a new field in the w3t_users table. I called it
ChatIcon VARCHAR(10) NULL DEFAULT 1000. (1000 is the default icon for DigiChat)
Then I made a small change to the ubbt_registerednav.tmpl. Right below the line:
code:
($template['members_link'])
I added the following code:
code:
|
<!-- 20020826 Chat Link New Start -->
<script langauge="javascript" type="text/javascript">function OpenChat()
{window.open('$phpurl/chat.php','','left=10,right=10,width=400,height=200');}
</script><a href="javascript: OpenChat()">Chat</a>
<!-- 20020826 Chat Link Read New End -->
(
NOTE: The script is in one line, I put some carriage returns for aesthetic purposes)
Third and most important I created the
chat.php file. This is the file that instantiates the java class and logs in the user. The programming is very simple:
code:
<?
// Require the library
require ("main.inc.php");
// -----------------
// Get the user info
$userob = new user;
$user = $userob -> authenticate("U_Email, U_Homepage, U_ChatIcon, U_Name");
$Username = $user['U_Username'];
$RealEmail = $user['U_Email'];
$Name = $user['U_Name'];
$Homepage = $user['U_Homepage'];
$ChatIcon = $user['U_ChatIcon']; // A new field that I added for my chat application
echo <<<UBBTPRINT
<TITLE>
FFFF Chat
</TITLE>
<FONT FACE="Verdana" SIZE="1" COLOR="navy">
If you are disconnected by accident, click on the Connect button to reconnect.<BR>
You can resize the chat window. Also you can talk in private to as many people as
you wish by double clicking on their username
</FONT>
<CENTER>
<APPLET NAME="DigiChat"
CODEBASE="http://ffff.niden.net/DigiChat/DigiClasses/"
CODE="com.diginet.digichat.client.DigiChatApplet.class"
WIDTH="200"
HEIGHT="100"
ALIGN="MIDDLE"
ARCHIVE="client.jar">
<PARAM NAME="siteID" VALUE="1000">
<PARAM NAME="roomID" VALUE="1001">
<PARAM NAME="cabbase" VALUE="Client.cab">
<PARAM NAME="nickname" VALUE="$Username">
<PARAM NAME="realname" VALUE="$Name">
<PARAM NAME="email" VALUE="$Homepage">
<PARAM NAME="realemail" VALUE="$RealEmail">
<PARAM NAME="iconID" VALUE="$ChatIcon">
<PARAM NAME="autopop" VALUE="true">
<PARAM NAME="RoomsTab" VALUE="false">
<PARAM NAME="background" VALUE="FFFFFF">
<PARAM NAME="textcolor" VALUE="000000">
DigiChat requires a Java Compatible web browser to run.
</APPLET>
</CENTER>
UBBTPRINT;
?>
The first line gives access to the database. Following that I retrieve the contents of the U_Username, U_Email, U_Name, U_Homepage and U_ChatIcon from the database. These are purely for constructing the profile for the user while in the chat room.
The rest are parameters that DigiChat accepts. There is a plethora of options for the users to use such as moderated rooms, locked rooms etc. One can extend the model with the help of the user groups to allow access to specific rooms.
For those who would like to give it a try, below is a link on a test board. User: test1, Password: test1 and User: test2, Password test2
Test Forum My next endeavour is to write a bot that will log into the chat invisible and check who is online. Following that it will update the w3t_online table on who is in the chat from the logged in users and the
Who's Online screen and hack will display that so that users know if someone is all alone and crying in the chat

- That however will require java knowledge which I don't have. Never mind, some experimentation wouldn't hurt
I hope this helps
Warm regards
Nikos