selwynorren Posted July 6, 2010 Report Posted July 6, 2010 Hi All, My pirpes lists are getting a tad long lately, can these pages be paginated?. I have found quite a few posts regarding pagination, but they all seem to be for schedules. Has anyone managed to do this? Thanks Quote
selwynorren Posted July 6, 2010 Author Report Posted July 6, 2010 Thanks, great script, but beyond my capabilities. Seems I have troubles with the includes as well as the calling of the class, could you possibly point me in the right direction? Thanks Quote
CrashGordon Posted July 6, 2010 Report Posted July 6, 2010 That would be like the blind leading the blind. I'll rummage around the web and see if I can find something we both can figure out. Quote
Moderators mark1million Posted July 6, 2010 Moderators Report Posted July 6, 2010 Another one i came across but have not had the time to test is from the guy who does phpacadamy, here is the link, http://www.phpacademy.org/forum/viewtopic.php?f=26&t=821&sid=02935a0fd5ae0d7073e4af0d38c26ee3 Quote
Guest lorathon Posted July 6, 2010 Report Posted July 6, 2010 If you look thru this link you will see my post regarding pagination of pireps. There is even a demo that you can use for whatever you need. http://forum.phpvms.net/topic/2823-pagination/page__p__18687__hl__pagination__fromsearch__1#entry18687 Quote
Moderators mark1million Posted July 6, 2010 Moderators Report Posted July 6, 2010 Hey Jeff, i forgot about that and i have that installed already,how difficult would it be to implement to the individual pilots pireps page, example http://www.easyjetva.com/index.php/profile/view/37 Quote
Guest lorathon Posted July 6, 2010 Report Posted July 6, 2010 Actually is would be quote easy to do. Let me take a look at it and I will come up with a new module for the pilot info. Quote
Moderators mark1million Posted July 6, 2010 Moderators Report Posted July 6, 2010 Thanks a lot Jeff, some of my pilots have quite a big page now of pireps Quote
selwynorren Posted July 8, 2010 Author Report Posted July 8, 2010 Thanks Jeff, just for interest, is it not possible to write a piece of code that will count the amount of records in one central location, then its just a call from any page we would like that will paginate any list. So maybe write the record count in one of the class file maybe? and then just call the function on the template page? Is that even possible? Quote
Guest lorathon Posted July 8, 2010 Report Posted July 8, 2010 I am actually trying to use a jquery tablesorter. It is working but it seems that I am having a problem with the skin. I know zero about skinning and css stuff. The page form at the bottom is not starting in the correct position. I am sure it has to do with the <div> put as I know jack diddley about that I am stuck. Here is the link to the tablesorter. It is actually quite easy to implement. http://tablesorter.com/docs/ Add the following the the head <script type="text/javascript" src="<?php echo fileurl('lib/js/jquery-1.3.1.min.js');?>"></script> <script type="text/javascript" src="<?php echo fileurl('lib/js/jquery.tablesorter.js');?>"></script> <script type="text/javascript" src="<?php echo fileurl('lib/js/jquery.tablesorter.pager.js');?>"></script> Put these files in the lib/js folder on your site jquery-1.3.1.min.js jquery.tablesorter.js jquery.tablesorter.pager.js Then follow the instructions. Here is a quick guide for implementation http://www.novell.com/communities/node/8797/jquery-tablesorter-pagination-and-sorting-made-simple Quote
Guest lorathon Posted July 8, 2010 Report Posted July 8, 2010 Here is my problem If I click the change page or select a different count it displays fine after that. Here is the pager form code. These are the only <div> in the entire template. Could that be the problem? Can the pager be stuck into something else beside the <div>? I tried changing the <div> to <table> and it would display correctly but would not control the table. Any help would be greatly appreciated. <div id="pager" class="pager"> <form> <img src="<?php echo fileurl('lib/images/first.png');?>" class="first"/> <img src="<?php echo fileurl('lib/images/prev.png');?>" class="prev"/> <input type="text" class="pagedisplay"/> <img src="<?php echo fileurl('lib/images/next.png');?>" class="next"/> <img src="<?php echo fileurl('lib/images/last.png');?>" class="last"/> <select class="pagesize"> <option value="10">10 per page</option> <option value="20">20 per page</option> <option value="50">50 per page</option> <option value="100">100 per page</option> </select> </form> </div> Quote
selwynorren Posted July 8, 2010 Author Report Posted July 8, 2010 Very very very nice. Its implemented, but the reason for the weird positioning is because of JavaScript placement and not directly in the css itself. But I am clueless regarding JavaScript Quote
Guest lorathon Posted July 8, 2010 Report Posted July 8, 2010 Did you get it to work? I am still messing with it. Hoping someone with more knowledge of java comes along and chimes in Quote
selwynorren Posted July 8, 2010 Author Report Posted July 8, 2010 ok Looks like i have it working perfectly, What I really like about this is that its very very easy to apply to any table anywhere in phpVMS. The file jquery.tablesorter.pager.js needs a slight change in line 22: change "absolute" to "static" I also right aligned the div tag to make it look better (imo) For some reason the option called "Limit" does not work for me, so I just commented it out and swapped the order around you can view the sample here: http://www.orrencharters.co.za/index.php/profile/view/1 Jeff you are brilliant, thanks so much for this one!! Quote
Moderators mark1million Posted July 8, 2010 Moderators Report Posted July 8, 2010 Hey nice work Quote
Guest lorathon Posted July 9, 2010 Report Posted July 9, 2010 Thanks Selwyn Works with the mod's you suggested. Quote
AUZ Posted July 9, 2010 Report Posted July 9, 2010 Thanks Guys, It took a bit but I got it all working, Thanks for the mods and the original Idea and links to how it all goes together. Most appreciated. Adam AUZ Quote
Administrators Nabeel Posted July 10, 2010 Administrators Report Posted July 10, 2010 I think you need a few clears in there to get that to sit properly below I'd implement the one in the admin panel, but I just haven't had the time. Quote
selwynorren Posted July 10, 2010 Author Report Posted July 10, 2010 Good Advice Nabeel. I have also come across a nasty error when booking flights, seems it now says something along the lines of No Route Data. I know lorenzo cleared it up, once I log back in linux with the files, Ill hack it again and see if I can fix it Quote
Guest lorathon Posted July 10, 2010 Report Posted July 10, 2010 I had the same issue. I resolved here http://forum.phpvms.net/topic/3271-no-route-passed/ Look for my posts. It had to do with the library (at least mine did) I had too calls to it. One in the core_htmlhead.tpl and then I put one in the header.tpl in my skin folder. Once I got rid of the second call in the header it worked just fine and have not had any other issues at all. Quote
selwynorren Posted July 10, 2010 Author Report Posted July 10, 2010 Jeff thanks for the solution, Glad to see its not going to take too much time Quote
selwynorren Posted July 10, 2010 Author Report Posted July 10, 2010 Yup you are right, works perfectly now, thanks so much Quote
Moderators mark1million Posted July 18, 2010 Moderators Report Posted July 18, 2010 HI guys i would like to get this on my site today, is there a clear guide? i think i got it but just in case Quote
Moderators mark1million Posted July 18, 2010 Moderators Report Posted July 18, 2010 Wow how easy was that :-) Just need to sort out that last bit of no route passed. just commented out <script type="text/javascript" src="<?php echo fileurl('lib/js/jquery-1.3.1.min.js');?>"></script> and all works fine... whooooo:) Are there any other known problems using this? Quote
selwynorren Posted July 18, 2010 Author Report Posted July 18, 2010 I have had no hiccups at all so far. I have even implemented this pagination on a few other pages of mine and it works beautifully. Only reported issue I have had has been regarding the lib/js/jquery-1.3.1.min.js, but as you mentioned its been resolved. Next I want to try Nabeel's implementation that he has used in the Admin side, just no had the time yet Quote
Moderators mark1million Posted July 18, 2010 Moderators Report Posted July 18, 2010 Yeh i have put it on a few pages myself, great addition :-) Quote
Moderators Kyle Posted July 18, 2010 Moderators Report Posted July 18, 2010 I have had no hiccups at all so far. I have even implemented this pagination on a few other pages of mine and it works beautifully. Only reported issue I have had has been regarding the lib/js/jquery-1.3.1.min.js, but as you mentioned its been resolved. Next I want to try Nabeel's implementation that he has used in the Admin side, just no had the time yet Orren, i'm going to try Nabeel's way. I'll let you guys know how it went. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.