Jump to content

Recommended Posts

  • Moderators
Posted

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.

Posted

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.

  • Moderators
Posted

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.

  • Administrators
Posted

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

  • Administrators
Posted

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

  • Moderators
Posted

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.

  • Moderators
Posted

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!

  • Moderators
Posted

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 :).

Guest lorathon
Posted

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.

  • 5 weeks later...
  • 1 month later...
  • 6 months later...
  • 3 weeks later...
  • Moderators
Posted

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.

Posted

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 :)

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.   Restore formatting

  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.

Loading...
×
×
  • Create New...