How To Add This Function In Chat.php

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How To Add This Function In Chat.php

    Please help me how to make the function

    Chat System> 19:29am
    >methos enterd[/b]
    who know how to add this function ??

    special example from


    #2
    Easy! When u enter in chat room click SAY then type "Silence enter in the room" and click SUBMIT! and there u have...lol
    sigpiceeeeerrr....

    Comment


      #3
      lol he want wen chatter r enter in chat its show enter

      Comment


        #4
        all hes done is edited the chat system its easy to do just mess about with the $who function

        Comment


          #5
          Easy! When u enter in chat room click SAY then type "Silence enter in the room" and click SUBMIT! and there u have...lol[/b]
          haha alesh .. you make me laugh ..

          urm amy ..

          you have the function ??

          can teach me how ?

          Comment


            #6
            help me please

            Comment


              #7
              edit this part in core
              in the add to chat function
              Code:
                $res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'");
                if($res)
                {
                    $msg = getnick_uid($uid)."enter the room";  mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', userid='0', text='".$msg."'");
              }
              else
              {
              //just update the chonline list
              }
              dont remember if time sent is the  correct field name anyways after doing that ....in the chat room when fetching the items from ibwf_chat 
              eg $sql = mysql_query("SELECT userid,timesent,text FROM ibwf_chat");
              while($item = mysql_fetch_array($sql)) 
              {
              if($item[0]=='0')
              {
              $item[0]="chat_system";
              echo $item[0].$item[1].$item[2];
              }
              else
              {
              //print the items
              }
              that work a 100 percent when i use to use the lava script

              R.M.C
              ----------
              PHP Adovocate B)

              Comment


                #8
                do an sql check to see if the user is already in the room if not then the part that enter the user in the sql put what information you want to send to the chat room

                Comment


                  #9
                  $res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'");
                  if($res)
                  {
                  $msg = getnick_uid($uid)."enter the room"; mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', userid='0', text='".$msg."'");
                  }
                  else
                  {
                  //just update the chonline list
                  }[/b]
                  you mean what code to put

                  //just update the chonline list

                  ??

                  can give the example ??

                  and

                  $sql = mysql_query("SELECT userid,timesent,text FROM ibwf_chat");
                  while($item = mysql_fetch_array($sql))
                  {
                  if($item[0]=='0')
                  {
                  $item[0]="chat_system";
                  echo $item[0].$item[1].$item[2];
                  }
                  else
                  {
                  //print the items
                  }[/b]
                  put where ?

                  Comment


                    #10
                    here my addtochat

                    function addtochat($uid, $rid)
                    {
                    $timeto = 120;
                    $timenw = time();
                    $timeout = $timenw - $timeto;
                    $exec = mysql_query("DELETE FROM ibwf_chonline WHERE lton<&#39;".$timeout."&#39;");
                    $res = mysql_query("INSERT INTO ibwf_chonline SET lton=&#39;".time()."&#39;, uid=&#39;".$uid."&#39;, rid=&#39;".$rid."&#39;");
                    if(!$res)
                    {
                    mysql_query("UPDATE ibwf_chonline SET lton=&#39;".time()."&#39;, rid=&#39;".$rid."&#39; WHERE uid=&#39;".$uid."&#39;");
                    }
                    }[/b]

                    Comment


                      #11
                      Someone can tell exactly how this function,
                      To say when a user enters the room to chat
                      Therefore gave several examples, and I could not use any,,
                      Help please

                      (Lavalair)

                      Comment


                        #12
                        function addtochat($uid, $rid)
                        {
                        $timeto = 120;
                        $timenw = time();
                        $timeout = $timenw - $timeto;
                        $exec = mysql_query("DELETE FROM ibwf_chonline WHERE lton<&#39;".$timeout."&#39;");
                        $res = mysql_query("INSERT INTO ibwf_chonline SET lton=&#39;".time()."&#39;, uid=&#39;".$uid."&#39;, rid=&#39;".$rid."&#39;");
                        if($res)
                        {
                        $msg = getnick_uid($uid)."enter the room"; mysql_query("INSERT INTO ibwf_chat SET timesent=&#39;".time()."&#39;, userid=&#39;0&#39;, text=&#39;".$msg."&#39;");
                        }
                        }


                        mate is nt working wen i ryt cht msg its hide

                        Comment


                          #13
                          no its working, u can check it here
                          http://bdfun.co.cc/wap

                          Comment


                            #14
                            This topic gave me many new ideas! Now you can also add "user left chatroom!" kinda stuff. And even you can add "user is trashed" "user is banned" Oh and my favorite function "user has been kicked" And now you can add, Invite user option. ANd can also Add invite user to private chat option. And maybe you can also add a function like mig33, where users can Vote to kick a user out of the chatroom! lol why am i sharing all these ideas hehe

                            Comment


                              #15
                              please tell me code to put the chatroom title on the chat.php of rw? it dont show room name in the title after u enter the chatroom
                              Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                              <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                              Comment

                              Working...
                              X