Messages 4 Page

Started on the old forum in June 2008 · view the original in the archive · old links redirect here

33 replies · 1,921 views · started 18 years ago · 1 min read

TL;DR · summary of 33 replies
  • -sweetangel asked how to set a maximum of 20 messages per page in her chat.php script.
  • -thanatos suggested editing the database query to show items on pages, but sweetangel needed more specific guidance.
  • -The thread did not resolve the exact issue about adding code for limiting messages per page without deleting older ones.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

11 participants
metulj Super moderator Principal · 1,726 posts #23

none...my site works only italian ip External image (may be gone)

i wonder how the f**k did you manage that?? i mean you cannot even display 20 posts per page in chat room yet you managed to block all non italian IPs??

yea right!

BOLLOX!

and beside you still havent post your moded version....

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ノ刀ノイリ!

sweetangel Lead · 885 posts #24
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"index.php?action=online&page=$ppage&sid=$sid\">«Prec</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"index.php?action=online&page=$npage&sid=$sid\">Succ»</a>";
    }
    echo "
$page/$num_pages";
    if($num_pages>2)
    {
    echo getjumper($action, $sid,"chat");
    }

how setting this???External image (may be gone)

if like my post click:

External image (may be gone)

subzero Super moderator Fellow · 3,954 posts #27

No one copy 20 per chat thats going around when i posted the lavalair script yes i was the first one to have it External image (may be gone)

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

Guest #28

CODEif($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(msgtext) FROM ibwf_chat WHERE rid='".$rid."'")); $num_items = $noi[0]; //changable $items_per_page= 3; $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='".$rid."' ORDER BY timesent DESC LIMIT $limit_start, $items_per_page"; if($page>1) { $ppage = $page-1;
echo "<a href="chat.php?sid=$sid&rid=page=$npage&sid=$sid">«</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href="chat.php?sid=$sid&rid=page=$npage&sid=$sid">»</a>"; } echo " $page/$num_pages"; if($num_pages>2) { echo getjumper($action, $sid,"chat"); }

is chat.php ok

I problem click :

echo "<a href="chat.php?sid=$sid&rid=page=$npage&sid=$sid">«</a> ";

And

echo "<a href="chat.php?sid=$sid&rid=page=$npage&sid=$sid">»</a>";

to: Room Doesn't Exist

   Back Chatrooms 

Help pliz.. 😀

ori Lead · 512 posts #29

sounds pretty easy 2 code actually as the msgs are made into an array anyway so limiting msgs and adding page numbers would b pretty simple there are so many pages in lavalair that do such a thing any1 that cant do it must b making basic errors

ori Lead · 512 posts #30

ill give it a go 4 my php site later on if it works ill post what i can my script lil different but u should get the idea anyway

ori Lead · 512 posts #32

1 thing too 4 the msg limit extend the value that deletes old chat msgs but dnt disable that bit as ur database will consume alot of shit it wont need then add limit values to the sql

mysql_query("SELECT * FROM chat WHERE rid='".$rid."' ORDER BY timesent DESC, id DESC LIMIT 20");

something like that should limit the msgs being displayed

Guest #34

yes... 😀 😀 😀

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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