Version: , by WEBDosser
Developer Last Online: Apr 2020
Version: Unknown
Rating:
Released: 08-12-2001
Last Update: Never
Installs: 0
No support by the author.
i have this installed on my site but would like to know if there is a way of telling people that some is in the chatroom, say like there username changes colour or something like that. or even the link to it on the main forum page adds the number or name of the people in there..
I think this would be a great hack.
Thnx..
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I decided to go with the hack already posted and see if I could alter it enough to get it to work. I am showing "Nobody in the chat room at this time" which is correct, but I am pretty sure I still have something messed up.
// CHAT HACK
// Ok Get Users and Stats
$location=$loggedin['location'];
if ($location['forumid']==105) { //chatuser hack
$chatuser=$loggedin['username'];
}
if ($chatuser=$DB_site->fetch_array($loggedins))
{
$numchatusers = $DB_site->query("SELECT DISTINCT session.userid,username,invisible FROM session LEFT JOIN user ON (user.userid=session.userid) WHERE session.userid>0 AND forumid='$foruminfo[105] AND session.lastactivity>$datecut ORDER BY invisible ASC, username ASC");
$numchatuser = $numchatusers[chatcount];
$chatusername=$chatuser[username];
$activechatusers=$chatusername;
while ($chatuser=$DB_site->fetch_array($loggedins)) {
$chatusername=$chatuser[username];
$activechatusers.=", ".$chatusername;
}
if ($numchatuser == 1) {
$numchatuser = "There is ".$numchatuser." person in the chat room";
} else {
$numchatuser = "There are ".$numchatuser." people in the chat room";
}
$lightbulb = 'on';
} else {
$lightbulb='off';
$numchatuser = "Nobody is in the chat room at this time.";
}
eval("\$chatinfo .= \"".gettemplate("chatloggedin")."\";");
// END CHAT HACK
I will probably have to make the chat room live before I can tell if this is working, but it's a start. I think I need to majorly crack open some PHP books and start learning!
Just fyi....if you are looking at jpilot, there is an add-on i just found and implemented on my site that ROCKS for jpilot....
http://jirc.webt.dk there is the site for downloading it, and Here is my implementation of it.
It is an outstanding front end, plus gives you the required code to let your users auto generate code to add chat room access to your chat to their own sites (great traffic builder).
Just thought i would throw that in, while everyone was discussing Jpilot