Forum enhancement - shorter lists of pages

Posted by Nick Gammon on Tue 01 May 2007 04:17 AM — 1 posts, 6,652 views.

Australia Forum Administrator #0
I have been noticing that the popular topics have been showing extensive lists of the pages that comprise that topic. eg.


Pages: 1 2 3 4 6 7 8 9 10 11 .... and so on


This looks a bit ugly, and probably no-one is really going to want to go to page 37 directly. The code for displaying pages has been amended to show a shorter list, like this:


Pages: 1 2 3 10 20 30 40 45 46 47 48 49 50 51 52 53 54 55 60 69 70 71


Now you will only see:

  • The first 3 pages (eg. 1, 2, 3)
  • The last 3 pages (eg. 69, 70, 71)
  • Five pages on either side of the page currently being viewed (eg. 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55) where the current page is 50
  • Every 10th page


This should reduce page clutter, and still make it reasonably easy to go to a particular page. For example, to go to page 25 (for some reason) click on 20, and then when the page refreshes, 25 will be available.