Custom Posts Per Page User Setting

DeltaHF

Well-known member
While going over XenForo's configuration options, it suddenly occurred to me that users cannot configure their own custom "posts per page" setting, and with only one global default.

Considering I've been using vBulletin for about 10 years now, I know some my users are going to be absolutely livid when they realize they can no longer change this on their own. :unsure:

I'd like to see it in XF soon.
 
Upvote 15
The addon in the link does exactly what the OP requested. I too was surprised to see it was not a default function of the core as I was used to being able to select this. It does however cause the "see my post on page X" when post 206 is on page 2 if viewing 100 posts/page but page 11 if 20 posts/page. Which is annoying and confusing to some
 
Not necessarily, Brogan. XenForo also provides page-independent direct links to posts. Here's the one for the post you used in your example above:

ooooooo is this new?

This actually brings up a larger question - why isn't that the permalink offered up by default in all the little widgets? Otherwise, if an administrator changes the default posts-per-page in the control panel, nearly every post permalinks will break.

That could be a pretty serious problem.

We've just had that happen, going from 25 posts per page to 20. Resulting in thousands of unnecessarily broken links, because we've got all those page#anchor-ID "permalinks" (which aren't) splattered all over the threads instead of links ala /index.php?posts/2228236, which would lead directly to the post in question without breaking anything.

Apparently the current implementation is "working as designed", but this is really unfortunate design... because any change in the global post per page setting or any larger number of deleted, merged, split etc. posts in a thread will break the "permalinks" (talk about a misnomer here) to exact posts. Completely unnecessarily, because the post ID is RIGHT THERE in the url... really frustrating.

Edit (haven't read all of this thread before replying):

What I don't understand is why those anchored links are included in the templates at all, when the page-independent links are already available and guaranteed to work forever - even if the administrator changes the forum's global posts-per-page or if user's individual posts-per-page settings are eventually introduced sometime in the future.

It seems I'm a few years late to the party but... can we get this changed please, @Kier @Mike ? It just doesn't make sense the way it is now. Telling admins to pick a number of posts per page and stick with it forever is... completely unrealistic to say the least. XF doesn't come with a big, red warning in the ACP next to the posts per page setting telling us "CHANGE THIS AND BREAK ALL OF YOUR OLD LINKS!". Would be better to have it hard-coded in that case...
 
It seems I'm a few years late to the party but... can we get this changed please, @Kier @Mike ? It just doesn't make sense the way it is now. Telling admins to pick a number of posts per page and stick with it forever is... completely unrealistic to say the least. XF doesn't come with a big, red warning in the ACP next to the posts per page setting telling us "CHANGE THIS AND BREAK ALL OF YOUR OLD LINKS!". Would be better to have it hard-coded in that case...
I would make a new suggestion regarding this specific problem. Did you ask for support on this problem ?
 
I did. The answer was along the lines that it is what it is (=as designed), ideally you pick a number of posts per page when you start a forum and never change it later. I think that we're all aware that that is neither good design nor realistic and my responses here were in view of that. I don't think that it's necessary to have another thread regarding a subset of all this since the devs are aware of the larger picture here, I imagine. And it's yet another very specific problem and I know from experience that the majority of people don't bother to vote on fixing such unless they've been directly affected by them. Just going by the popular vote would never fix this or any similar issue.

The mods can move my posts to a new suggestion thread if they want though, but like I said, this thread is useful for the big picture view.
 
You would think there would be a way to be able to link to a post instead of a page. Like for instance, if you have a thread with 127 posts, and the forum default is 20 posts/page, the default URL for the second page would link to the 24th post and the code would know that this correlates to page 2, post 4.

Then if someone has it set to 50 posts/page, the code would know that a link to post 21 on a thread would mean page 1, post 24.

So in short I guess my recommendation for resolving the issue of broken links would be to remove the static URL to a page of a thread, as this is the root issue.

but then again

Hard coded posts-per-page is necessary for fully canonical links, as well for usability. As an example, recently someone sent me a link to a page in a forum and pointed me at a particular post, but it wasn't on my page...
 
XF works just fine with links to post, forum, whatever ID only, FYI. It's just not using that format for "permalinks". Having the page number in the urls wouldn't be problematic if it was ignored. You can have whatever you want in the url, but for XF the only relevant thing to go by has to be the content ID, which is unchangeable, vs. something like page numbers, which are very much changeable depending on a setting and several other possible factors.
 
Last edited:
I understand that permalinks work no matter how many posts/page you have set.

I guess what I am saying is if the reason for posts/page to be hard coded is due to canonical links, or whatever other reason, then eliminating the page-3 part of the page URL (the address bar, not permalink) as shown below

Code:
https://xenforo.com/community/threads/custom-posts-per-page-user-setting.19973/page-3#post-969497

and just making the URL link to a post, and having the code interpret that and display appropriately the page based on user settings instead of hard-coding the link in, that to me would make more sense.

from the perspective of SEO, the default posts/page would still be 20. If someone is logged in and they are set to 100 posts/page they click a URL that someone else pasted (by copying and pasting the URL in the browser bar, not the permalink) in that was in reference to something that was relative to 40 posts/page, it wouldn't matter because the code would resolve the page # location of the post relative to the user settings.

One way of thinking about this is making the default URL in the address bar for page 2 = 21st post permalink, page 3 = 41st post, etc. do away with "page-x" in the URL in the address bar.

I don't know though, maybe this is something above my pay grade level of understanding about how this all ties together...which it sounds like it is. It's just the way it is.
 
It's something that's been resolved by other forum software ages ago, really, not exactly rocket science. There's more than one way of going about it, sure, but I expect that the devs are familiar with all that. I feel that identifying the problem and indicating a solution (respecting content ID above anything else) is more than enough here, the devs will know best how to make it work within XF.
 
For what it is worth, I'm on day 2 of my conversion from VB 3.x and I'm already getting asked where the setting is for "posts per page".

If I step back and look at it as a user, I can recall using gmail and for a while there you couldn't change the number of emails per page. It drove me nuts. When they implemented that setting down the road, joyous day :)
 
For what it is worth, I'm on day 2 of my conversion from VB 3.x and I'm already getting asked where the setting is for "posts per page".

If I step back and look at it as a user, I can recall using gmail and for a while there you couldn't change the number of emails per page. It drove me nuts. When they implemented that setting down the road, joyous day :)
You may use this resource: https://xenforo.com/community/resources/threads-posts-and-conversations-per-page.2112/ while waiting XenForo implement itself :)
 
It will never be implemented in XF (at least I seriously doubt it will) and as far as the conversion from VB to XF goes and users whining, let them whine, I would highly recommend leaving the default as is!!! There are many reasons for this, one big one being page loading speed. When VB was at the peak of popularity or heading oward the peak at least, super huge picture and media heavy threads were not the norm. Now, they are. 20 posts/page is plenty and page loading is much better. People will get used to it.
 
What is the default posts per page? 20? I recently changed it to 50 per request but am not seeing it might mess things up and would like to go back to default.
 
For what it is worth, I'm on day 2 of my conversion from VB 3.x and I'm already getting asked where the setting is for "posts per page".

If I step back and look at it as a user, I can recall using gmail and for a while there you couldn't change the number of emails per page. It drove me nuts. When they implemented that setting down the road, joyous day :)
It's been a year now since migrating from VB 3.8 and I still have users complaining about not being able to set PPP. :eek:
 
Top Bottom