Jump to content
MakeWebGames

Recommended Posts

Posted

Heres a script so users dont lose Emails once target reaches alotted page count in this case 15...

add to global_func.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Now on your mailbox.php if you havent made any edits to function mail_inbox() then overwrite with this one.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

add a bit of CSS to header which is

.tablecellheader{

background-color:#0de0de;

}

On this script change list($pagertop, $pagerbottom, $limit) = pager(15, $count, "mailbox.php?" . $addparam); the 15 to the number of mails to show per page

  • 3 years later...
Posted

I know this is and old post but can this be made for events as well? I know that you can delete events to see the hidden ones. but when you have 300 or more evens going on sometimes seems pointless trying to look through all of it to see if anything important happened.

Posted
A cool little tool is datatables from datatables.net. It will let you search and filter stuff and also paginate

I went there....I'm lost...as usual but thanks for the reply

Posted (edited)
I know this is and old post but can this be made for events as well? I know that you can delete events to see the hidden ones. but when you have 300 or more evens going on sometimes seems pointless trying to look through all of it to see if anything important happened.

Yes, this can be used for any page as for it's a function, you would change this line instead of mailbox.php you would put events.php

list($pagertop, $pagerbottom, $limit) = pager(15, $count, "mailbox.php?" . $addparam);

You will also change this query to that of the event table.

$query = "SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_to=$userid ORDER BY mail_time DESC $limit";

and this one...

$res = mysql_query("SELECT COUNT(*) FROM mail WHERE mail_to=$userid") or die(mysql_error());

event and mail are very similar in table structure if you have not added to any of them.

Also this very same pagination is used on roguevampires.net also lol.

Edited by lucky3809

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...