To go to chat.php you need to go throught chatenter.php, because the chatenter.php will set some values into the database, and tell others who enters chat. But, this is kinda boring because that is going to happen everytime you change the room, or you go and come back.
Well, here is a simple code that is going to save you from that chatenter.php, just go to chat.php and enter it before addtochat($uid, $rid);
- - -
code:
$ison = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE uid='".$uid."' AND rid='".$rid."' "));
if ($ison[0] == "0")
{ $name = getnick_sid($sid);
mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='0', timesent='".time()."', msgtext='".$name." entered chat!', rid='".$rid."', exposed='0' "); }
- - -
Well, here is a simple code that is going to save you from that chatenter.php, just go to chat.php and enter it before addtochat($uid, $rid);
- - -
code:
$ison = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE uid='".$uid."' AND rid='".$rid."' "));
if ($ison[0] == "0")
{ $name = getnick_sid($sid);
mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='0', timesent='".time()."', msgtext='".$name." entered chat!', rid='".$rid."', exposed='0' "); }
- - -
Comment