The Arcive of vBulletin Modifications Site. |
|
|
[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. |
|
#2
|
||||
|
||||
|
Phillip... you are my hero, i needed this, thanks!
:banana: |
|
#3
|
||||
|
||||
|
Sweet! I've never taken the time to figure this out on my own, thanks Revan!
|
|
#4
|
||||
|
||||
|
I fixed my problems.
|
|
#5
|
||||
|
||||
|
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']"> <!-- PAGENAV POPUP --> <div class="vbmenu_popup" id="pagenav_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form"> <input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" /> <input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" /> </form> </td> </tr> </table> </div> <!-- / PAGENAV POPUP --> </if> |
|
#6
|
||||
|
||||
|
Great article ... thanks for sharing with the community
|
|
#7
|
||||
|
||||
|
oh my, I am paginating everything now!!!
|
|
#8
|
|||
|
|||
|
Thank you. It works beautifully!
|
|
#9
|
||||
|
||||
|
Thank you, great Tutoril !
|
|
#10
|
|||
|
|||
|
thanks, but what about in admincp? how can we paginate the results?
|
![]() |
|
|