Topic: wrong pagenumbers if there are tooo many posts

Hi there,

I was just reading your new source.
I found one thing that might cause problems:

f.e.:

$num_pages = ceil(2364 / 20);

will return: 119

but there are only 118 pages.

so there will be one empty page.

any ideas? I am just thinking on how you can fix this.


regards

Re: wrong pagenumbers if there are tooo many posts

2364/20 equals 118,2. So, there are 119 pages.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: wrong pagenumbers if there are tooo many posts

yes, thats the problem. there are not 119 pages, so the last page will be empty.

do you understand what I mean?

Re: wrong pagenumbers if there are tooo many posts

Well, no. There isn't a problem. 2364/20 equals 118,2. That means that 118 pages will not be enough to show all posts. Thus, 119 pages are required.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: wrong pagenumbers if there are tooo many posts

I´m not good in explaining things, but I´ve tested it on my local lan.
I put exactly 2364 posts in one topic.
then I press the "Last Post" link and there is an empty page, because it´s page 119.
But the last Post is located at page 118.

sorry for my bad english but I hope I was able to bring the question a bit closer to you.

regards

Re: wrong pagenumbers if there are tooo many posts

Hmm, that's odd. Even if there were only 2631 posts, it should be 119 pages.

Could you perhaps provide a link to the forum so I can check it out? If you don't like posting it here, maybe you can e-mail it to me?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: wrong pagenumbers if there are tooo many posts

well I wish I could...I just installed it on my local lan...i tried to test the performance...
that´s why there are over 2000 posts in one thread.

maybe you can try this at home...

8 (edited by chacmool 2004-01-08 20:02)

Re: wrong pagenumbers if there are tooo many posts

restore:
I might know what the problem is. Are you SURE every post has a real user? That is, there must be a user with the post-user-id, or else the post will be skipped.

I had this problem with the converter, 12 users out of 815 were lost when converting the forum (due to ' in some field). This led to the exact same problem: The topic-list said one amount of posts and pages, but when I viewed the pages, there were some empty ones.