From: Ashley M. K. <as...@pc...> - 2001-11-12 00:33:49
|
After doing some thinking, I thought of another way of displaying those page links. Keep in mind that I'm basically going after sites that have some large number of pictures, which in turn generate a large number of page links. This won't have any effect on people with small numbers of links. gaps = Npages / 15 (slots) -5 I say -5 because I want to add, my current page, plus two under, and two over in the resulting list. What will this do? Let's say I have a section that's generating 154 pages, and I'm currently viewing page # 53: 154 / 15-5 -> 15 (we'll round down), so now my "gaps" will be: 1, 16, 31, 46, 61, 74, etc. We insert page 53 where it should be in the list, plus two down, and two up from there, and we add the first, and last page also. The result: 1, 16, 31, 46, 51, 52, 53, 54, 55, 61, 76, 91, 106, 121, 136, 151, 154 You want to know how my screwed up mind came up with this? Let's assume you have in your hand, some very very fine calibrated ruler, with the little lines marking every inch, half inch, quarter inch, 1/8, 1/16, 1/32, 1/64, etc., etc. on it, but the smaller the scale, the smaller the letters. Now I'm going to give you a magnifying glass to look through. What do you see? What's right in the middle you can see just fine, down to the very fine print, but as you look to the side, you can't see the same (small) scale anymore, just the one above that, or a few scales above that. It's kind of like looking through a water bubble sitting on a page of a book. Think of the above links the same way. As you near your current page, the numbers are more granulated, but as you move away, the "gaps" become bigger. Sick thinking, huh? :) -- H | "Life is the art of drawing without an eraser." - John Gardner +-------------------------------------------------------------------- Ashley M. Kirchner <mailto:as...@pc...> . 303.442.6410 x130 Director of Internet Operations / SysAdmin . 800.441.3873 x130 Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave, #6 http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A. |