Who enters in room? For lavalair/wapdesire

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Who enters in room? For lavalair/wapdesire

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

    - - -
    Last edited by Mysterio; 22.11.09, 08:11.
    mysterio.al - programming is a functional art

    #2
    i cant make this work
    Did I help you?
    You can help me too
    Your donations will help me finance my studies.

    Comment


      #3
      Originally posted by kei_ki7 View Post
      i cant make this work
      1. Are you sure you changed the fields names to match your own?
      2. Are you sure you have a member with ID = 1?
      Then it should work.
      mysterio.al - programming is a functional art

      Comment


        #4
        yup, and i change $session to $sid is that right?
        Did I help you?
        You can help me too
        Your donations will help me finance my studies.

        Comment


          #5
          yes, i think yes. Now is it working?
          mysterio.al - programming is a functional art

          Comment


            #6
            Not working.....

            Comment


              #7
              Originally posted by friend View Post
              Not working.....
              Add the code again. After that, empty the table ibwf_chonline, and try again.
              mysterio.al - programming is a functional art

              Comment


                #8
                nice feature, works well for me. 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


                  #9
                  you mean when a user creates a room? And where to go that message?
                  mysterio.al - programming is a functional art

                  Comment


                    #10
                    Originally posted by Leviathan73 View Post
                    nice feature, works well for me. 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
                    wouldnt that look like useless spam ?
                    besides.. it'll just 'eat' kb's on mobile users...
                    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
                    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
                    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
                    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

                    Comment


                      #11
                      i think ive seen the code here.. just do some search..

                      Comment


                        #12
                        Mysterio is correct, when a user creates room, and the subtitle goes on writing
                        PHP Code:
                        addonline($uid,"Chat in $rname ($mmsg)","chat.php?rid=$rid&rpw=$rpw");
                                
                        //echo "<p>";
                                
                        echo popup($sid);
                                echo 
                        "<b>1 </b><a name=\"top\" id=\"top\" accesskey=\"1\" href=\"chat.php?action=say&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">write</a><br/>"

                        Comment


                          #13
                          This works 100%
                          BakGat
                          Code:
                          class Counter {
                          public:
                            void Count();
                            int  ReadDisplay();
                          private:
                            int  CurrentCount;
                          };








                          Back up my hard drive? How do I put it in reverse?
                          My Community
                          BakGat
                          sigpic

                          Comment

                          Working...
                          X