View Single Post
  #4 (permalink)  
Old 02-26-2008, 04:15 AM
ablaye ablaye is offline
Pligg Donor
 
Join Date: Sep 2007
Location: King of Prussia, PA
Posts: 97
Thanks: 0
Thanked 9 Times in 7 Posts
I found a better way to do this.
In the html1.php page, you can limit how many pages of results are generated.
For example, I wanted to always limit the number of pages to generate on my index page for only 150 items at the most.

So in do_pages function, I added the following code after the global declaration:
Code:
	if ($thepage == 'published') {
	  $total = ($total > 150) ? 150 : $total;
	}
That ensured that I would only generate pages for 150 items at the most.
You can change that number by replacing the '150' in the code with any number.

Hope this helps.
Reply With Quote