hello everybody! the function nick of chatting I work, I would signal that by chatting, but when I do not write, and you refresh the page, I always send the same message. as the system is the problem?
Function Nick Enters Chatting
Started on the old forum in January 2009 · view the original in the archive · old links redirect here
im guessing your saying eveytime the page refreshes and you dont say anything then it tells you ...you have entered chat. if so something like this should sort it out
$check = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chonline WHERE uid='".$uid."', rid='".$rid."'"));
if($check[0]!=$uid){
////////////then enters chat code
}
🙂 (make sure addtochat($uid, $rid) function is underneath this code tho)
QUOTE (something else @ Jan 24 2009, 03:21 PM) <{POST_SNAPBACK}>
im guessing your saying eveytime the page refreshes and you dont say anything then it tells you ...you have entered chat. if so something like this should sort it out
$check = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chonline WHERE uid='".$uid."', rid='".$rid."'")); if($check[0]!=$uid){ ////////////then enters chat code }🙂 (make sure addtochat($uid, $rid) function is underneath this code tho)
ill try this lol
I do not understand! in which file I must add? core.php? or chat.php? and where?
in chat.php 🙂 where your enter chat code is 🙂 i cant see your script so cant tell you exactly where 😛
addtochat($uid, $rid);
$timeto = 86400;
$timenw = time();
$timeout = $timenw-$timeto;
$rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
$rname = $rooms[1];
$nick = getnick_sid($sid);
$check = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chonline WHERE uid='".$uid."', rid='".$rid."'"));
if($check[0]!=$uid);
if ($action=="")
{
$me= getnick_uid($uid); mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='".$who."', timesent='".time()."', msgtext='$me entered the JAKENPOY Chat room', rid='".$rid."'");
mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', chatter='".$uid."', text='".$msg."'");
echo "<head>";
echo "<title>$rname</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'"));
if ($unreadpopup[0]<1)
{
echo "<meta http-equiv=\"refresh\" content=\"20; url=chat.php?time=";
echo "".date("dmHis")."";
echo "&sid=$sid&rid=$rid&rpw=$rpw\">";
does not work! Once you refresh the page always repeated the same message
Enter what ? lmao
if ($action=="")
{
$me= getnick_uid($uid); mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='".$who."', timesent='".time()."', msgtext='$me entered the JAKENPOY Chat room', rid='".$rid."'");
mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', chatter='".$uid."', text='".$msg."'");
}
if ($action=="nothing")
{
echo "<head>";
echo "<title>$rname</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'"));
if ($unreadpopup[0]<1)
{
echo "<meta http-equiv=\"refresh\" content=\"20; url=chat.php?time=";
echo "".date("dmHis")."";
echo "&sid=$sid&rid=$rid&rpw=$rpw\">";
make the script action=nothing
Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!
SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…
i give up on ppl learning to code always not listen or dont do it right or
just add and didnt care
Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!
SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…
$timeto = 86400;
$timenw = time();
$timeout = $timenw-$timeto;
$rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
$rname = $rooms[1];
$nick = getnick_sid($sid);
if ($action=="")
{
$check = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chonline WHERE uid='".$uid."', rid='".$rid."'"));
if($check[0]!=$uid){
$me= getnick_uid($uid); mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='".$who."', timesent='".time()."', msgtext='$me entered the JAKENPOY Chat room', rid='".$rid."'");
mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', chatter='".$uid."', text='".$msg."'");
}
addtochat($uid, $rid);
echo "<head>";
echo "<title>$rname</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'"));
if ($unreadpopup[0]<1)
{
echo "<meta http-equiv=\"refresh\" content=\"20; url=chat.php?time=";
echo "".date("dmHis")."";
echo "&sid=$sid&rid=$rid&rpw=$rpw\">";
Always the same problem, when you refresh the page always check the same message .. enter in room
did u move addtochat($uid, $rid); to where i have placed it ? in previous code?