Moderators mark1million Posted May 6, 2010 Moderators Report Posted May 6, 2010 Hi everyone, I have been looking about to use Pagination for my pilots pirep pages as some are now getting quite long, i have come across a few but does anyone have experience with integrating in to phpvms, your ideas and thoughts would be welcome Cheers. Quote
flyalaska Posted May 7, 2010 Report Posted May 7, 2010 I had my pilots page paginated. Since I updated phpVMS it got all screwy. If I can fix it, I will share the code and configuration with you. You will need to have a single list instead of it being broken up by hubs. Quote
Moderators Kyle Posted May 7, 2010 Moderators Report Posted May 7, 2010 Yep, that happened to me and it was a mess so i had to take it down and the hours system is working now. Be sure you know what you are doing. Quote
Administrators Nabeel Posted May 7, 2010 Administrators Report Posted May 7, 2010 If people want, I can update some of these pages so they're paginated the same way it's done in the admin panel (using jqgrid). The problem with that is then there isn't much flexibility Quote
Administrators Nabeel Posted May 7, 2010 Administrators Report Posted May 7, 2010 That would be a rather large change for the next version. The problem is keeping it flexible as the one is now. I'll look into it Quote
Moderators mark1million Posted May 7, 2010 Author Moderators Report Posted May 7, 2010 Excellent Nabeel, i have some code i can implement where i want it but on an update it will be messed up, it would be much better if it comes from your end like the admin currently is then its fully supported on future releases. Quote
Administrators Nabeel Posted May 7, 2010 Administrators Report Posted May 7, 2010 Just on the schedules page? It's gonna be tricky to do with the search that's there. I'll look into it Quote
Moderators Kyle Posted May 7, 2010 Moderators Report Posted May 7, 2010 If people want, I can update some of these pages so they're paginated the same way it's done in the admin panel (using jqgrid). The problem with that is then there isn't much flexibility I would like that! Thanks Nabeel!!!!!!!! YOu Rock! Quote
Moderators mark1million Posted May 7, 2010 Author Moderators Report Posted May 7, 2010 No not the schedules, that can be limited already but its the pilots pireps, pilot_public_profile.tpl and pireps_viewall.tpl that would be excellent if that could be implemented as some of my pilots have loads of reports and the page is getting longer and longer . Quote
Guest lorathon Posted May 7, 2010 Report Posted May 7, 2010 I just wanted to show that the power to build pagination is already built into phpVMS. On my site I have written a very simple and dirty pirep pagination. It will display all pireps in pages. The number of pireps can be changed at the top of the AllPIREPS.php file in the module. Right now it is set to 20. The number attached to the previous and next changes with the count selected to be displayed. The previous button is absent when you are at the first PIREP and the next is absent when there are none remaining. I did not check to see if the next would be there in a single case of the total number of pireps being equally divisible by the count. So it may need some work. Like I said its dirty. But it does display the power of phpvms. This can be modified to display schedules. Or if you jam variables into the $params array you can limit what pireps are returned. Example would be to stick in a pilotid and only those pireps attached to that pilotid would be returned. I can do the same for schedules if needed. Pagination Example To install just drop the folder AllPIREPS into your core/modules and the AllPIREPS.tpl into your core/templates or skin To run call it with http://yoursite.com/index.php/AllPIREPS Thats it. If there is a problem with it let me know. It works on my site. But I just quickly wrote it. Quote
skymx Posted May 8, 2010 Report Posted May 8, 2010 Got it I must say... It would be great to have that feature for both, pireps and schedules. lists are getting Big! Quote
flyalaska Posted June 7, 2010 Report Posted June 7, 2010 Very nice! If you want to see an example you can see it on my site. http://www.flyaka.com/index.php/AllPIREPS Can you make this for the roster page? Quote
TAV1702 Posted July 20, 2010 Report Posted July 20, 2010 That sure is a neat little trick. Where can a guy get those files from? I must have missed something somewhere I guess. Quote
Guest lorathon Posted July 20, 2010 Report Posted July 20, 2010 TAV - If you look a couple of posts up you can see my post with the link to the files. But I think you might want to read this thread http://forum.phpvms.net/topic/3243-wondering-pagination-for-pireps-list/ I changed from the way I wrote to this way. It is actually quit easy to implement and works better in my opinion. Quote
RogerB Posted February 17, 2011 Report Posted February 17, 2011 Where are the files?? I see none Quote
James142 Posted March 6, 2011 Report Posted March 6, 2011 How do you make a drop down menu that lets you pick to show 5, 10, 15 ect.. per page? thanks, james Quote
Moderators Kyle Posted March 6, 2011 Moderators Report Posted March 6, 2011 Hey James, Right there!!! But I'm not sure how you have done it though, <select class="pagesize"> <option value="5">5 per page</option> <option value="10">10 per page</option> <option value="20">20 per page</option> </select> Just add an line below all of the option values, <option value="20">20 per page</option> And edit the Value to how much you want it to show. Quote
James142 Posted March 6, 2011 Report Posted March 6, 2011 Hey James, Right there!!! But I'm not sure how you have done it though, <select class="pagesize"> <option value="5">5 per page</option> <option value="10">10 per page</option> <option value="20">20 per page</option> </select> Just add an line below all of the option values, <option value="20">20 per page</option> And edit the Value to how much you want it to show. Thanks Vansers 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.