[How-To] Paginate your results
Don't you just hate it...? You have hundreds, no maybe even thousands of records being returned from a query, and the page lags for seconds at a time as well as the page being longer than a giraffe's neck.
Wouldn't it be neat to seperate them into pages? Just like vBulletin does? Of course it would. This guide assumes you are familiar enough with vBulletin and PHP in general, so I won't go into great detail about what each bit does. This is intended for hack authors. So, without further ado, I give you (drumroll please) [How-To] Paginate your results!
And you're done :) If everything works correctly you should now have a fully vBised page navigation. |
Phillip... you are my hero, i needed this, thanks!
:banana: |
Sweet! I've never taken the time to figure this out on my own, thanks Revan!
|
I fixed my problems.
|
you are my hero x 2 :). very neat tutorial Revan, thank you.
I also found something else that I thought would be a good addition for those that might run into the same problem. The problem I faced was that if I didn't want the navbar template included in the page, I would get a javascript error and the jump to page option did not open. So if you have a page that does not include the $navbar, put this instead of it and it should get rid of the error and also show the jump to page input box. Code:
<if condition="$show['popups']"> |
Great article ... thanks for sharing with the community :)
|
oh my, I am paginating everything now!!! :)
|
Thank you. It works beautifully!
|
Thank you, great Tutoril !
|
thanks, but what about in admincp? how can we paginate the results?
|
Quote:
|
how to Paginate your results in AdminCP page
thanks, |
I use this How To exact the way you layout and I got the Navigation to show up; I can Navigate through pages; however, I notice the IE status bar has error message "done, but with errors on page". I click on it to view the error detail, it is "'null' is null or not an object". If I comment out the construct_page_nav function call then the page disply just 1 page without the Navigation and no error produce; this makes me think the error comes from the Navigation.
Also I notice the end of has an arrow down image; when click on the image it suppose to show up a box says "Go to page...", you would then enter a page number and click "go" to go to that page; however, the arrow down on mine is not clickable; I click on it and nothing happens. Anyone know what I might have done wrong or missing? |
Edit: Sorry, I forgot I clicked the link from this page originally:
https://vborg.vbsupport.ru/showthread.php?t=221670 brought me here. LOL! *Forehead slap moment* |
All times are GMT. The time now is 12:03 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|