Are you using 2.0? That code is based on vB1.1.5, so they could've changed around the way things work in 2.0. If you want to ignore that then use:
Code:
require( "global.php" );
if( $bbuserid ) {
$user = $DB_site->query_first( "SELECT username
FROM users
WHERE userid = $bbuserid" );
$bbusername = $user[ username ];
print( "<APPLET align=middle code=\"digi.digichat.DigiChatApplet\" codeBase=\"http://www.yourdomain.com/path/to/digichat/\" width=\"600\" height=\"480\" align=\"middle\" ARCHIVE=\"client.jar\" nickname=\"$bbusername\">
<PARAM NAME=\"siteID\" VALUE=\"1000\">
<PARAM NAME=\"cabbase\" VALUE=\"Client.cab\">
<PARAM NAME=\"background\" VALUE=\"FFFFFF\">
<PARAM NAME=\"textcolor\" VALUE=\"000000\">
<PARAM NAME=\"url\" VALUE=\"http://forums.fanhome.com/member.php?action=getinfo&userid=$bbuserid\">
<PARAM NAME=\"openProfileURL\" VALUE=\"true\">
<PARAM NAME=\"room\" VALUE=\"$room\">
<PARAM NAME=\"embedded\" VALUE=\"true\">
FanHome Chat requires a Java Compatible web browser to run.
</APPLET>\n" );
} else {
print( "<font face=\"TREBUCHET MS,ARIAL,HELVETICA\">Sorry, you must be logged in to use FanHome Chat!</font><br>" );
} // end if