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' "); }
- - -

. But what is the code the message automatically when you open a new room? for example: open new room and check the automated message .. $ username has opened room name



Comment