Function Nick Enters Chatting

Started on the old forum in January 2009 · view the original in the archive · old links redirect here

12 replies · 1,104 views · started 17 years ago · 1 min read

4 participants
Leviathan73 Senior · 260 posts #1

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?

something else Fellow · 2,296 posts #2

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)

AnGELMaE22 Newbie · 4 posts #3

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

Leviathan73 Senior · 260 posts #4

I do not understand! in which file I must add? core.php? or chat.php? and where?

something else Fellow · 2,296 posts #5

in chat.php 🙂 where your enter chat code is 🙂 i cant see your script so cant tell you exactly where 😛

Leviathan73 Senior · 260 posts #6
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

subzero Super moderator Fellow · 3,954 posts #7

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... _______…

subzero Super moderator Fellow · 3,954 posts #9

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... _______…

something else Fellow · 2,296 posts #10
        $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\">";
Leviathan73 Senior · 260 posts #11

Always the same problem, when you refresh the page always check the same message .. enter in room

something else Fellow · 2,296 posts #12

did u move addtochat($uid, $rid); to where i have placed it ? in previous code?

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close