[2.0.6] Pagination MOD

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
11
41%
Very Good
12
44%
Good
1
4%
Fair
1
4%
Poor
2
7%
 
Total votes: 27

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28073
Joined: Sat Aug 16, 2003 7:36 am

[2.0.6] Pagination MOD

Post 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
Last edited by Extensions Robot on Mon Apr 30, 2007 12:28 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB »

MOD Validated/Released :mrgreen:

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

superluigisunshine
Registered User
Posts: 28
Joined: Mon Jul 07, 2003 10:08 pm
Location: Texas
Contact:

Post by superluigisunshine »

:twisted: :twisted: :twisted:
Some of my users are going to have it rough... MWAHAHAHA!
I need help.

quentin
Registered User
Posts: 197
Joined: Tue May 20, 2003 7:30 am
Location: Geneva, Switzerland
Contact:

Post 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
The largest message boards on the web !
Web Design Library (coming soon)
Friends sites: Heroes of might and magic - Biometric security

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post 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
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

User avatar
MoLew
Registered User
Posts: 198
Joined: Fri Jul 05, 2002 7:52 pm
Location: Minnesota, U.S.A.

Post by MoLew »

This mod will come in quite handy, thanks!

kkks
Registered User
Posts: 50
Joined: Mon Jul 08, 2002 3:48 am
Location: Auckland, New Zealand
Contact:

Post by kkks »

A very handy mode :)
SillyDog701: Netscape Browser Archive | Browser Version Guide | Message Centre | MacCentre701
MozInfo - Mozilla Information Centre

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

Suggestion of improvement : having a variable length for border and middle, proportional to the number of pages :).

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post 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?
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post 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.

User avatar
Carpe Diem
Registered User
Posts: 580
Joined: Tue Dec 10, 2002 11:19 pm

Post by Carpe Diem »

Nice mod, thank you!
:)

User avatar
Haywood Jahelpme
Registered User
Posts: 475
Joined: Wed Oct 23, 2002 9:16 am
Location: San Diego
Contact:

Post by Haywood Jahelpme »

Thanks Xore... Another useful little tweak....

Cheers!

gfmorris
Registered User
Posts: 67
Joined: Wed Jan 22, 2003 10:15 pm

Post 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
--
Geof F. Morris

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post 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.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

User avatar
Haywood Jahelpme
Registered User
Posts: 475
Joined: Wed Oct 23, 2002 9:16 am
Location: San Diego
Contact:

Post by Haywood Jahelpme »

How would I apply this to forums with tons of threads? It only does topics, right?

Post Reply

Return to “[2.0.x] MOD Database Cleanup”