Messages 4 Page

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

    Messages 4 Page

    hi friends
    I have modify page chat.php at my wapdesire script :

    Code:
       
     addtochat($uid, $rid);
            $timeto = 90000;
            $timenw = time();
            $timeout = $timenw-$timeto;
            $deleted = mysql_query("DELETE FROM ibwf_chat WHERE timesent<".$timeout."");
            $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id=&#39;".$rid."&#39;"));
            $rname = $rooms[1];
            $nick = getnick_sid($sid);
    any1 say how I can setting max 20 messages 4 page???
    and how this:

    Code:
        if($page>1)
        {
          $ppage = $page-1;
          echo "<a href=\"chat.php?action=$action&amp;page=$ppage&amp;sid=$sid\">«PREC</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"chat.php?action=$action&amp;page=$npage&amp;sid=$sid\">Succ»</a>";
        }
        echo "
    $page/$num_pages
    ";
    please help to fix...
    if like my post click:

    http://coding-talk.com/images/totall...ost_thanks.gif

    #2
    hi friends
    I have modify page chat.php at my wapdesire script :

    Code:
       
     addtochat($uid, $rid);
            $timeto = 90000;
            $timenw = time();
            $timeout = $timenw-$timeto;
            $deleted = mysql_query("DELETE FROM ibwf_chat WHERE timesent<".$timeout."");
            $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id=&#39;".$rid."&#39;"));
            $rname = $rooms[1];
            $nick = getnick_sid($sid);
    any1 say how I can setting max 20 messages 4 page???
    and how this:

    Code:
        if($page>1)
        {
          $ppage = $page-1;
          echo "<a href=\"chat.php?action=$action&amp;page=$ppage&amp;sid=$sid\">«PREC</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"chat.php?action=$action&amp;page=$npage&amp;sid=$sid\">Succ»</a>";
        }
        echo "
    $page/$num_pages
    ";
    please help to fix...[/b]

    you need to edit the db query to show items on pages..

    Comment


      #3
      and how???
      if like my post click:

      http://coding-talk.com/images/totall...ost_thanks.gif

      Comment


        #4
        like this.. pmpl..

        Code:
            if($page=="" || $page<=0)$page=1;
            $noi = mysql_fetch_array(mysql_query("SELECT COUNT(msgtext) FROM ibwf_chat WHERE rid=&#39;".$rid."&#39;"));
            $num_items = $noi[0]; //changable
            $items_per_page= 20;
            $num_pages = ceil($num_items/$items_per_page);
            if(($page>$num_pages)&&$page!=1)$page= $num_pages;
            $limit_start = ($page-1)*$items_per_page;
        
        $sql = "SELECT chatter, who, timesent, msgtext, exposed FROM ibwf_chat rid=&#39;".$rid."&#39; ORDER BY timesent DESC LIMIT $limit_start, $items_per_page";

        Comment


          #5
          mmm...and where I add this code??
          if like my post click:

          http://coding-talk.com/images/totall...ost_thanks.gif

          Comment


            #6
            here&#39;s an idea for you, look through your coding to find the bit that thanatos kindly edited for you, its not exactly hard to find using the find/replace tool in whatever prog you use to edit, come on use your common sense for once and dont ask questions until you&#39;ve made a decent attempt to do the editing yourself
            :p:p:p

            Comment


              #7
              I have try to coded by me...but I have problem...
              if like my post click:

              http://coding-talk.com/images/totall...ost_thanks.gif

              Comment


                #8
                I have try to coded by me...but I have problem...[/b]
                you always have problems thats because you can code nothing

                Comment


                  #9
                  you always have problems thats because you can code nothing
                  [/b]

                  Agreed
                  Want something coded email me at sales@webnwaphost.com for a prices.




                  Comment


                    #10
                    you always have problems thats because you can code nothing
                    [/b]
                    her problem is more that she never even try anything on hers own
                    she just come here and beg for help...
                    eventhough it could be done be herself in 30 seconds
                    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
                      her problem is more that she never even try anything on hers own
                      she just come here and beg for help...
                      eventhough it could be done be herself in 30 seconds [/b]
                      don`t be so bad with her ... she`s novice..

                      Comment


                        #12
                        don`t be so bad with her ... she`s novice..[/b]
                        novice

                        Posts: 595
                        Joined: 24-December 06


                        this doesnt look like novice
                        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


                          #13
                          novice

                          Posts: 595
                          Joined: 24-December 06


                          this doesnt look like novice [/b]
                          perhaps on this forum is not a new member... but is novice in php coding for sure

                          Comment


                            #14
                            kosty

                            friends...pls.... is important add this function at my chat
                            if like my post click:

                            http://coding-talk.com/images/totall...ost_thanks.gif

                            Comment


                              #15
                              BEG TAKE A PICTURE OF YU ON YA KNEES HOLDING A PLACK SAYIN MEMBERS OF 2WAP HELP ME. THEN I AND OTHERS MAY CONSIDER
                              Want something coded email me at sales@webnwaphost.com for a prices.




                              Comment

                              Working...
                              X