- Forums
- Bug Reporting
- Forum threads on 3 pages
Tue Oct 21 16:26:40 EDT 2008
Quote
Quote
I have tried on several occasions to fix it but it looks like it would just be faster to rewrite it=
Hmm maybe before fully rewriting this (god help us... haha kidding) you should search whether you define a special constant regarding page 3 or 4 (or post #12 or 18 for that matter) - because so far this is the only situation where I've seen this happening. Or a special test case that you've forgotten about. Or 'something'.
Actually, it's a little more complicated.
It's a special pagification system.
It uses three separate blocks, 1,2,3...4,5,6...7,8,9.
It generally works like that.
But, when the page is 4, it does this:
1,2,3,4,5,6...7,8,9
When there are only a few pages, it gets confused.
I've seen:
1,2,3,3
1,2,3,4 when there are only 3 pages, etc.
It's nothing more sinister than an incorrect >= <= == expression, but for whatever reason, it's eluded me I think I'll try something a little simpler next time
EDIT:
It would be simpler, and more useful to do it like this...
First Previous 4,5,6,7,8 Next Last
Invisible War ][
Edited 2 time(s). Last edited by Cyberkilla @ Tue Oct 21 16:28:21 EDT 2008
Tue Oct 21 16:33:22 EDT 2008
Quote
Actually, it's a little more complicated.
It's a special pagification system.
It uses three separate blocks, 1,2,3...4,5,6...7,8,9.
Ahh yes, of course. You need triplets to get [ previous ] [ current ] [ next ] page.
Quote
It generally works like that.
But, when the page is 4, it does this:
1,2,3,4,5,6...7,8,9
When there are only a few pages, it gets confused.
I've seen:
1,2,3,3
1,2,3,4 when there are only 3 pages, etc.
It's nothing more sinister than an incorrect >= <= == expression, but for whatever reason, it's eluded me I think I'll try something a little simpler next time
But, when the page is 4, it does this:
1,2,3,4,5,6...7,8,9
When there are only a few pages, it gets confused.
I've seen:
1,2,3,3
1,2,3,4 when there are only 3 pages, etc.
It's nothing more sinister than an incorrect >= <= == expression, but for whatever reason, it's eluded me I think I'll try something a little simpler next time
Mhm, indeed. Comparison operators like 'gte' and 'lte' instead of 'gt' and 'lt' are a pain! (gte = greater than or equal to, gt = greater than - for non-1337 speakers around)
Quote
EDIT:
It would be simpler, and more useful to do it like this...
First Previous 4,5,6,7,8 Next Last
It would be simpler, and more useful to do it like this...
First Previous 4,5,6,7,8 Next Last
Ah that's an excellent idea. Hardcoding [ first ] [ prev ] [ current - 2 ] [ current - 1 ] [ current ] [ current + 1 ] [ current + 2 ] [ next ] [ last ]
Seems simpler
Wed Oct 22 9:52:07 EDT 2008
Fixed
First Previous 1, 2, 3 ... 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93 ... 102, 103, 104 Next Last
First Previous 1, 2, 3 ... 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93 ... 102, 103, 104 Next Last
Invisible War ][
Edited 1 time(s). Last edited by Cyberkilla @ Wed Oct 22 11:15:50 EDT 2008
Wed Oct 22 16:03:34 EDT 2008
Yeah yeah yeah I noticed, that's cool! Excellent work. Now I don't get any 'dangling' links to non-existent pages.
A small suggestion though. Suppose you have a N pages thread and suppose [ X ] is the current page. Some small improvements:
* Case: First Prev [ 1 ] ... Next Last
Suggestion: if ( X == 1 ) then First.hide(); Prev.hide(); fi
* Case: First Prev ... [ N ] Next Last
Suggestion: if ( X == N ) then Next.hide(); Last.hide(); fi
Wed Oct 22 16:35:47 EDT 2008
This is already catered for. I stop them being links, but allow the text to remain in order to keep the thing centred
I tried removing the links if they are not valid, but it looks weirder than leaving them, but disabling them.
Note that they turn orange if they are disabled(a**uming default site theme)
I tried removing the links if they are not valid, but it looks weirder than leaving them, but disabling them.
Note that they turn orange if they are disabled(a**uming default site theme)
Invisible War ][
Edited 1 time(s). Last edited by Cyberkilla @ Wed Oct 22 16:36:18 EDT 2008
Wed Oct 22 17:07:30 EDT 2008
Quote
I tried removing the links if they are not valid, but it looks weirder than leaving them, but disabling them.
Note that they turn orange if they are disabled(a**uming default site theme)
Oh yeah, you're right. (At certain hours / levels of... fatigue, the difference between white and orange is not easily detectable hahaha.)