|
DragonPrime Menu
Login
Resource Pages
IRC Channels
Search
|
Show Posts
|
|
Pages: [1] 2 3 ... 7
|
|
5
|
Game Administration, Installation and Configuration / The Idea Place / Re: Live Mail
|
on: October 10, 2012, 03:22:38 PM
|
Works great! Thanks. For those of you using ChatYomPetLinks, you might need to make a small change to the petition line, otherwise you will find that link displaced... Line 36: rawoutput(" | <a href='petition.php' target='_blank' onClick=\"".popup("petition.php").";return false;\">$text</a>"); Should read: rawoutput("</td><td>| <a href='petition.php' target='_blank' onClick=\"".popup("petition.php").";return false;\">$text</a>"); Thanks for everything!
|
|
|
|
|
11
|
Modules, Themes and other customizations for your game / Completed Modules for version 1.x.x / Re: Discussion - Mail Keeper
|
on: August 15, 2012, 01:43:28 PM
|
Limit's nice.. but how about paginating it so we can view additional messages from a "Page 2", etc. nav? Something like... <?php $mailperpage = 50; $sql = "SELECT count(id) AS c from ".db_prefix("mailkeeper"); $result = db_query($sql); $row = db_fetch_assoc($result); $totalpages = ceil($row['c']/$mailperpage); $page = httpget("page"); if ($page == "") { if (isset($session['mailkeeperPage'])){ $page = (int)$session['mailkeeperPage']; }else{ $page = 1; } } if ($page < 1) $page = 1; if ($page > $totalpages) $page = $totalpages; $session['mailkeeperPage'] = $page;
// No need to show the pages if there is only one. if ($totalpages != 1) { addnav("Page"); for ($x=1; $x <= $totalpages; $x++){ if ($page == $x){ addnav(array("`b`#Page %s`0`b", $x),"runmodule.php?module=mailkeeper&page=$x"); }else{ addnav(array("Page %s", $x),"runmodule.php?module=mailkeeper&page=$x"); } } } if ($page > 1){ $limit = (($page-1) * $mailperpage) . "," . $mailperpage; }else{ $limit = "$mailperpage"; } ?> Only... working? xD That's from the petition viewer, by the way. Fastest thing I could think of. Ideas?
|
|
|
|
|
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.
|
Support Us
$100 raised this year
Your help is greatly appreciated!
|