Lower pagination on messages

Bram

Well-known member
I can't find a setting in the admincp that sets the pagination of different pages on thread level. Its currently on my style 8 items but i wish to lower the number as my new style is a bit more narrow.
 
Hi,

This is not an Admin CP option yet, although it is marked in the code as a 'TODO' item (as you will see below), so likely it will be added in a future release.

To do this manually, the line to replace is line 685 of XenForo_Template_Helper_Core:
PHP:
'displayRange' => 2 //TODO: make this come from an option?
where 2 is the number of pages displayed either side of the current page (except for the first and last few pages).

For example, if the current page is page 8 and there are 15 pages, the two either side that it will show are pages 6, 7, 9 and 10. If you increase this to 3, it will additionally show pages 5 and 11, etc. etc.

You will also need to change a line in the page_nav.css template:
Code:
.PageNav .scrollable
{
    position: relative;
    overflow: hidden;
    width: {xen:calc '(@pageNavLinkWidth * 5) + (@pageNavLinkSpacing * 4) + (@pageNavLink.border-width * 10)'}px; /* width of 5 page numbers plus their margin & border */
    height: 18px; /* only needs to be approximate */
}

You will need to change the width element. So, if you increased the displayRange to 3, you would add the following to EXTRA.CSS (or replace it above or in some other CSS file):
Code:
.PageNav .scrollable
{
    width: {xen:calc '(@pageNavLinkWidth * 7) + (@pageNavLinkSpacing * 6) + (@pageNavLink.border-width * 14)'}px; /* width of 7 page numbers plus their margin & border */
}

I will see if I can incorporate this into an add-on as it is never recommended to edit core files directly.
 
Back
Top Bottom