Page 1 of 4

[2.0.6] Pagination MOD

Posted: Fri Sep 26, 2003 5:52 am
by Extensions Robot
MOD Name: Pagination MOD
Author: Xore
MOD Description: Alter the pagination link settings

Code: Select all

/*
	By default, $begin_end is 3, and $from_middle is 1, so on page 6 in a 12 page view, it will look like this:

	a, d = $begin_end = 3
	b, c = $from_middle = 1

 "begin"        "middle"           "end"
    |              |                 |
    |     a     b  |  c     d        |
    |     |     |  |  |     |        |
    v     v     v  v  v     v        v
    1, 2, 3 ... 5, 6, 7 ... 10, 11, 12

	Change $begin_end and $from_middle to suit your needs appropriately
*/
Pagination works like this:

page 47 of an 86 page long thread

1, 2, 3 ... 46, 47, 48 ... 84, 85, 86

now, if you're on page 47 and trying to skim to a certain page... or are just looking for date ranges... this is really tough because you can only advance one page at a time. pagination mod allows you to customize the pagination.

Wouldn't this be nicer:
1, 2, 3, 4 ... 44, 45, 46, 47, 48, 49, 50 ... 83, 84, 85, 86

Pagination MOD allows you to do just that!

(or, if you're a sadist, you can do this to your users:
1 ... 47 ... 86


MOD Version: 1.0.0


Download File: pagination_mod.mod
File Size: 5335 Bytes

Posted: Wed Oct 08, 2003 9:21 am
by AbelaJohnB
MOD Validated/Released :mrgreen:

Personal Comments:
This is truely one for the sadists out there :P Nice job Xore.

Posted: Wed Oct 08, 2003 12:12 pm
by superluigisunshine
:twisted: :twisted: :twisted:
Some of my users are going to have it rough... MWAHAHAHA!

Posted: Wed Oct 08, 2003 12:53 pm
by quentin
wow cool, that was one of the worst things for very long threads to have to navigate pages one by one, this was really needed, and is really cool to have now.

Quentin

Posted: Thu Oct 09, 2003 1:48 am
by Xore
quentin wrote: wow cool, that was one of the worst things for very long threads to have to navigate pages one by one, this was really needed, and is really cool to have now.

Quentin


Exactly why i made it... i just wish i could apply it to phpbb.com so that my cash mod thread is more navigable... :P

Posted: Fri Oct 10, 2003 5:03 am
by MoLew
This mod will come in quite handy, thanks!

Posted: Tue Oct 21, 2003 1:59 am
by kkks
A very handy mode :)

Posted: Tue Oct 21, 2003 2:08 am
by Ptirhiik
Suggestion of improvement : having a variable length for border and middle, proportional to the number of pages :).

Posted: Tue Oct 21, 2003 5:02 am
by Xore
Ptirhiik - RPGnet-fr wrote: Suggestion of improvement : having a variable length for border and middle, proportional to the number of pages :).


good suggestion. the question is, where to draw the line? if a topic has 100 pages, do we make it 5 and 5? if so, what happens if a topic gets up to 500 pages?

perhaps i have $min and $max values for each... but then what kind of expanding function should i use?

-- tough questions... but i do like your idea :-) -- proportional

maybe a logarithmic function?

any suggestions?

Posted: Tue Oct 21, 2003 9:46 am
by Ptirhiik
You can use as formular a direct percentage, and a floor and ceil limits (never less than, never more than). For border, you can use half the percentage, this would be probably the best :). Let's face it : topic with more than 50 pages (2500 replies !) are not the more usual. So I think having 500 pages won't be found in numerous board :). Even for this kind of topic, it won't be so stupid to display 50 page numbers for the middle, but with a ceil control, you can restrict this.

Posted: Fri Oct 24, 2003 2:05 pm
by Carpe Diem
Nice mod, thank you!
:)

Posted: Sat Oct 25, 2003 9:31 am
by Haywood Jahelpme
Thanks Xore... Another useful little tweak....

Cheers!

Posted: Tue Nov 11, 2003 9:20 pm
by gfmorris
The only suggestion that I might have to improve this is to have it be configurable inside the Admin Panel rather than just through the MOD. Of course, one could always look at the MOD and find the code that would need to be modified, should one ever wish to change the way the code displayed.

GFM

Posted: Tue Nov 11, 2003 9:44 pm
by Xore
gfmorris wrote: The only suggestion that I might have to improve this is to have it be configurable inside the Admin Panel rather than just through the MOD. Of course, one could always look at the MOD and find the code that would need to be modified, should one ever wish to change the way the code displayed.

GFM


I thought about it, and to be honest, that's the way i normally prefer to go about things, but i didn't want to go through the extra hastle for this simple mod.

perhaps in a later release.

Posted: Wed Nov 12, 2003 4:34 am
by Haywood Jahelpme
How would I apply this to forums with tons of threads? It only does topics, right?