Iliana
07-06-2001, 12:55 AM
Where exactly in the index.php file do I insert the following code for this hack?
//BEGIN CHAT HACK
if ($bbusername) {
$chatbulb = 'images/off.gif';
$numchattersa = $DB_site->query_first("SELECT count(username) AS username FROM c_users");
$numchatters = $numchattersa[username];
if ($numchatters == 0)
{
$chatbulb = 'images/off.gif';
$chatmessage = 'Chat room is currently empty';
} else {
$chatbulb = 'images/on.gif';
$chatmessage = "There are $numchatters people in the chat room";
}
eval("\$chatinfo .= \"".gettemplate("chatloggedin")."\";");
} else {
eval("\$chatinfo .= \"".gettemplate("chatloggedout")."\";");
}
//END CHAT HACK
//BEGIN CHAT HACK
if ($bbusername) {
$chatbulb = 'images/off.gif';
$numchattersa = $DB_site->query_first("SELECT count(username) AS username FROM c_users");
$numchatters = $numchattersa[username];
if ($numchatters == 0)
{
$chatbulb = 'images/off.gif';
$chatmessage = 'Chat room is currently empty';
} else {
$chatbulb = 'images/on.gif';
$chatmessage = "There are $numchatters people in the chat room";
}
eval("\$chatinfo .= \"".gettemplate("chatloggedin")."\";");
} else {
eval("\$chatinfo .= \"".gettemplate("chatloggedout")."\";");
}
//END CHAT HACK