bunoire14 Posted October 23, 2011 Report Share Posted October 23, 2011 Hi Guys, Anyone tell me if PHPvms has built in pagination? Cheers, Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted October 23, 2011 Moderators Report Share Posted October 23, 2011 For pireps yes, the code is in the forums here. Quote Link to comment Share on other sites More sharing options...
bunoire14 Posted October 23, 2011 Author Report Share Posted October 23, 2011 For pireps yes, the code is in the forums here. Cheers, I have a mooch about, Its not the jQuery based List thing is it? I was hoping o apply whatever built in pagination is there to other aspects of my site, otherwise i'll have to write my own. All the best, Quote Link to comment Share on other sites More sharing options...
tutmeister Posted October 23, 2011 Report Share Posted October 23, 2011 Search for datatables, that is what it uses and yes, it is jQuery-based. It is fast and reliable and easily skinnable too. Quote Link to comment Share on other sites More sharing options...
Strider Posted October 23, 2011 Report Share Posted October 23, 2011 http://forum.phpvms....edules-to-work/ There is the link to that pagination. It is a tutorial on how to impliment it. You have to follow how I said to do it, otherwise it gives you problems with your schedules.But as tutmeister said, it is easily skinnable. You can change how it shows, and where you want each bit to show. Quote Link to comment Share on other sites More sharing options...
bunoire14 Posted October 23, 2011 Author Report Share Posted October 23, 2011 Thanks for the link guys, I dont intend to use it for schedules, I will be using it in other areas, but what i did notice on that thread, the example site shows its usage listing the schedules, but the jQuery loaded all of the schedules from the database at once, this took some time and while it was loading just listed them in one huge list. When the initial loading had finished it seemed to instantiate the jQuery function and sort them into "pages". This seems to increase browsing speed once loaded, but certainly doesn't increase load speed and looks terrible as its rendering, is there a way to make the jQuery only load the first X amount of results? I know it will be slower browsing, but id take a few seconds slower over very rough rendering. I know some jQuery/Javascript (of which I'm not an expert in any shape or form) often has a function where by you can ask it to "Pre-Load" all results being used or just load the first set, typically i have found this on jQuery rotating banners where it usually loads all the images used in the banner first before displaying it. ill have a play with this tonight and see what i can do on my development environment Cheers, Quote Link to comment Share on other sites More sharing options...
Strider Posted October 23, 2011 Report Share Posted October 23, 2011 How you have organised you schedules doesn't matter, it is the layout of the code that does however. That loading also depends on your internet speed. If it is fast, it will load fairly quickly, if it is slow, then it may take a little while. Examples dont have to be followed 100%. It doesn't have to be for the schedules, it can be used for any table you have. If using it on the roster, you do however need to make the roster show without hubs, as that causes problems with it. Quote Link to comment Share on other sites More sharing options...
Jhony300 Posted August 21, 2012 Report Share Posted August 21, 2012 Hello everybody, Sorry respond in an old topic. tutmeister, I went on the website of his company and saw the list of pireps for each pilot, I found it very nice pagination. I tried using in my site, but was ordered in descending order, and I would like to put by date equal to his. Could you help me? Very thanks. Quote Link to comment Share on other sites More sharing options...
tutmeister Posted August 21, 2012 Report Share Posted August 21, 2012 Thanks for the compliment! What we did was simply call datatables by calling the javascript in our HTML head, adding the class of "display" to our roster's HTML table, and linking the table's ID to the datatables jQuery initiaization call. This is exactly like in Mr. Bean's tutorial here. You can make any HTML table into a sortable table this way. To make it ordered by a certain column, you can change the jQuery call to add the aaSorting option. <script type="text/javascript" charset="utf-8"> $(document).ready(function() { oTable = $('#dataTables').dataTable({ "bJQueryUI": true, "sPaginationType": "full_numbers", "aaSorting": [[ 5, "desc" ]] }); } ); </script> <div class="example_alt_pagination"> <table id="dataTables" class="display"> YOUR PIREP TABLE HERE </table> </div> Quote Link to comment Share on other sites More sharing options...
Jhony300 Posted August 22, 2012 Report Share Posted August 22, 2012 Very thanks for your help, tutmeister! Now my table it is much better. Thank you again. Quote Link to comment Share on other sites More sharing options...
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.