Jump to content

Pagination


mark1million

Recommended Posts

  • Moderators

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.

Link to comment
Share on other sites

  • Moderators

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!

Link to comment
Share on other sites

  • Moderators

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

Link to comment
Share on other sites

Guest lorathon

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.

Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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