Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 05 Sep 2005, 03:17
Jolten Jolten is offline
 
Join Date: Mar 2004
Constructing Pagenav

Hi,

I'm trying to incorporate the vbulletin 3.0.x pagenav into a modification of member.php.

I've got a query pulling total results ($results) and even have php to figure out $previous, $i (page num) and $next links. But I can't seem to figure out how to build around these variables, a la.....

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Can anyone explain the two arguments for the page nav variable? everything I try gives me a divide by 0 error in function.php

thanks
Reply With Quote
  #2  
Old 05 Sep 2005, 04:06
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Real name: Lucius Hunk
construct_page_nav($param1, $param2, $param3);

$param1 is the total number of items, $param2 is the basic link of that page, $param 3 is optional for the sub string of that link (in $param2.

for e.g:

construct_page_nav($totalitemsfromquery, "script.php?$session[sessionurl]id=$id", "&cmd=sort&sort=$sort&order=$order&pp=$perpage&daysprune=$da ysprune");

hope this help.
Reply With Quote
  #3  
Old 05 Sep 2005, 17:22
Jolten Jolten is offline
 
Join Date: Mar 2004
Thanks deathsemporer.

I'm still getting a divide by zero error though.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The print command is just there for debugging. It prints the proper total results. I'm thinking it may have something to do with my hard coding the per page results at 20. $from is used to limit the queries.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 15:28.

Layout Options | Width: Wide Color: