Help Me.

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

    Help Me.

    How can i send a pm to users online or all users or staff users
    Help me pls

    #2
    How can i send a pm to users online or all users or staff users
    Help me pls [/b]
    Use the search tool, its already been posted about 10 times :-)

    Comment


      #3
      Use the search tool, its already been posted about 10 times :-)[/b]
      I search but i don'd found nothing
      u can help me? u can give me a link to a topic or something pls

      Comment


        #4
        try this
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>function PMtoALL($text){
        $sql = @mysql_query("SELECT id FROM ibwf_users");
        while ($id = @mysql_fetch_array($sql)){
        @mysql_query("INSERT INTO ibwf_private SET byuid = &#39;1&#39;, touid = &#39;".$id[0]."&#39;, text = &#39;".$text."&#39;, timesent = &#39;".time()."&#39;");
        }
        }
        //// this is the id of the owner, if u are the owner put your id here
        byuid = &#39;1&#39; </div>

        Comment


          #5
          try this
          <div class='codetop'>CODE
          <div class='codemain' style='height:200px;white-space:pre;overflow:auto'>function PMtoALL($text){
          $sql = @mysql_query("SELECT id FROM ibwf_users");
          while ($id = @mysql_fetch_array($sql)){
          @mysql_query("INSERT INTO ibwf_private SET byuid = &#39;1&#39;, touid = &#39;".$id[0]."&#39;, text = &#39;".$text."&#39;, timesent = &#39;".time()."&#39;");
          }
          }
          //// this is the id of the owner, if u are the owner put your id here
          byuid = &#39;1&#39; </div>[/b][/quote]
          Does not work where have to put this? in core i think but give me one erros
          help me uffff

          Comment


            #6
            I search but i don&#39;d found nothing
            u can help me? u can give me a link to a topic or something pls [/b]
            type in search

            PM to all members

            or

            just code it.. it would work like...

            create the inbox thinggy where you enter the text, in the other part select all the members ids then insert it into the inbox as a unred message...
            look how the inbox works, study the coding, think how it would work then try and do it..

            nothing can go wrong if you just try.. download soething called xampp and test everything offline

            Comment


              #7
              JUST FOLLOW THESE STEPS:
              1. put this in core.php

              Code:
              function PMtoALL($text){
              $sql = @mysql_query("SELECT id FROM ibwf_users");
              while ($id = @mysql_fetch_array($sql)){
              @mysql_query("INSERT INTO ibwf_private SET byuid = &#39;1&#39;, touid = &#39;".$id[0]."&#39;, text = &#39;".$text."&#39;, timesent = &#39;".time()."&#39;");
              }
              }
              //// this is the id of the owner, if u are the owner put your id here
              byuid = &#39;1&#39;
              2. in admincp.php put this:

              Code:
              else if ($action=="pmtoall"){
              
              echo &#39;<card id="main" title="Send pm to all">
              
              &#39;;
              
              echo &#39;Send pm to all:
              &#39;;
              echo &#39;<input type="text" name="msg"/>
              &#39;;
              echo &#39;<anchor>send&#39;;
              echo "<go href=\"adminproc.php?action=pmtoall&sid=$sid\" method=\"post\">";
              echo "<postfield name=\"msg\" value=\"$(msg)\"/>";
              echo &#39;</go></anchor>&#39;;
              
              echo &#39;</p></card>&#39;;
              
              }
              3. and in adminproc.php put this:

              Code:
              else if ($action=="pmtoall"){
              
              echo &#39;<card id="main" title="Send pm to all">
              
              &#39;;
              
              $msg = $_POST[&#39;msg&#39;];
              PMtoALL($msg);
              echo &#39;Pm sent to all users!
              &#39;;
              echo "<a href=\"index.php?action=main&sid=$sid\">index</a>";
              
              echo &#39;</p></card>&#39;;
              }

              Comment


                #8
                JUST FOLLOW THESE STEPS:
                1. put this in core.php

                Code:
                function PMtoALL($text){
                $sql = @mysql_query("SELECT id FROM ibwf_users");
                while ($id = @mysql_fetch_array($sql)){
                @mysql_query("INSERT INTO ibwf_private SET byuid = &#39;1&#39;, touid = &#39;".$id[0]."&#39;, text = &#39;".$text."&#39;, timesent = &#39;".time()."&#39;");
                }
                }
                //// this is the id of the owner, if u are the owner put your id here
                byuid = &#39;1&#39;
                2. in admincp.php put this:

                Code:
                else if ($action=="pmtoall"){
                
                echo &#39;<card id="main" title="Send pm to all">
                
                &#39;;
                
                echo &#39;Send pm to all:
                &#39;;
                echo &#39;<input type="text" name="msg"/>
                &#39;;
                echo &#39;<anchor>send&#39;;
                echo "<go href=\"adminproc.php?action=pmtoall&sid=$sid\" method=\"post\">";
                echo "<postfield name=\"msg\" value=\"$(msg)\"/>";
                echo &#39;</go></anchor>&#39;;
                
                echo &#39;</p></card>&#39;;
                
                }
                3. and in adminproc.php put this:

                Code:
                else if ($action=="pmtoall"){
                
                echo &#39;<card id="main" title="Send pm to all">
                
                &#39;;
                
                $msg = $_POST[&#39;msg&#39;];
                PMtoALL($msg);
                echo &#39;Pm sent to all users!
                &#39;;
                echo "<a href=\"index.php?action=main&sid=$sid\">index</a>";
                
                echo &#39;</p></card>&#39;;
                }
                [/b]

                thenks kosty a lot :D u are my man..it work :D

                Comment


                  #9
                  Can v use the same code for Pm to Online user. .
                  i tried but failed.. .I replace core function ibwf_users to ibwf_online. but pm didnt send to online members. .
                  Plz post the actual code

                  Comment


                    #10
                    Dude u just have to get the userid&#39;s from the online table.. and modify codes accordingly...

                    Comment


                      #11
                      Bro even i try id, userid in ibwf_online. . .
                      but didnt work. . .
                      Could u give me the code for pm to online users

                      Comment


                        #12
                        Can v use the same code for Pm to Online user. .
                        i tried but failed.. .I replace core function ibwf_users to ibwf_online. but pm didnt send to online members. .
                        Plz post the actual code[/b]
                        Its maybe like this
                        Code:
                        function PMtoALL($text){
                        $offline = 300;
                        $sql = @mysql_query("select * from `ibwf_users` WHERE lastvst>&#39;".intval(time()-$offline)."&#39;");
                        while ($id = @mysql_fetch_array($sql)){
                        @mysql_query("INSERT INTO ibwf_private SET byuid = &#39;1&#39;, touid = &#39;".$id[0]."&#39;, text = &#39;".$text."&#39;, timesent = &#39;".time()."&#39;");
                        }
                        }

                        Comment


                          #13
                          Ansh bro thanks for giving me this code. .
                          But it didnt work. . .
                          online users didnt get pm which i sent to them

                          Comment


                            #14
                            Its maybe like this
                            Code:
                            function PMtoALL($text){
                            $offline = 300;
                            $sql = @mysql_query("select * from `ibwf_users` WHERE lastvst>&#39;".intval(time()-$offline)."&#39;");
                            while ($id = @mysql_fetch_array($sql)){
                            @mysql_query("INSERT INTO ibwf_private SET byuid = &#39;1&#39;, touid = &#39;".$id[0]."&#39;, text = &#39;".$text."&#39;, timesent = &#39;".time()."&#39;");
                            }
                            }
                            [/b]
                            Bro it will
                            Btw thanks for reply ..tc
                            function PMtoALL($text){
                            $offline = 300;
                            $sql = @mysql_query("SELECT * from `ibwf_users` WHERE lastact>&#39;".intval(time()-$offline)."&#39;");
                            while ($id = @mysql_fetch_array($sql)){
                            @mysql_query("INSERT INTO ibwf_private SET byuid = &#39;1&#39;, touid = &#39;".$id[0]."&#39;, text = &#39;".$text."&#39;, timesent = &#39;".time()."&#39;");
                            }
                            }

                            Comment

                            Working...
                            X