Forum Based 'Posts Per Page' [In Dev]

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Scam Warning
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: Forum Based 'Posts Per Page'

Post by marcovo »

Yeah RMcGirr83, I think with your second edit that's the right modification to do. Now on the forum it indeed seems that also 5 topics per page are shown, which is somewhat awkward. Nice work.
User avatar
RMcGirr83
Former Team Member
Posts: 22099
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Forum Based 'Posts Per Page'

Post by RMcGirr83 »

The code has been updated to remove the topics_per_page reset within viewforum so they still work correctly per the setting in the ACP.

As far as having to remove the entry in the database I don't believe that is necessary.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
Volksdevil
Registered User
Posts: 2415
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil

Re: Forum Based 'Posts Per Page'

Post by Volksdevil »

Cheers, not sure I understand the coding exactly...but as long as it works :D
Edit: Ah, I see that previously the Forum section was only showing 5 posts too, thanks for the fix. :)

Regards the database entry, if I just want to remove the old MOD ad use your setup here, then I'm OK to remove the entry? Or is it the same anyway in your extension?

PS: I think the last place that needs a fix is within search results, such as 'Active topics'. All topics that show up have the 10 per page inc the ones that should be 5 per page.
My phpBB Extensions
Finally found great Website Hosting from :arrow: KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Twitch | My Volkswagen Corrado G60
User avatar
RMcGirr83
Former Team Member
Posts: 22099
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Forum Based 'Posts Per Page'

Post by RMcGirr83 »

Disable the extension, re-download from github, re-upload to your forum, reactivate the extension and you will only need the edit to viewtopic.php....because I can see no way to overwrite the config['posts_per_page'] setting prior to viewtopic doing it's stuff.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: Forum Based 'Posts Per Page'

Post by marcovo »

Well actually you might be able to do it also there... As it's just about a config value, you can also alter it just after loading the config or sth like that, I guess? Could you for example use the core.user_setup event, and check there whether the current page is equal to viewforum/viewtopic/whichever you need, and then (if we are on the desired page) alter the config-variable? It's a bit messy... but it should work?
User avatar
RMcGirr83
Former Team Member
Posts: 22099
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Forum Based 'Posts Per Page'

Post by RMcGirr83 »

Too much hassle. I would have to check for forum id and a user can get to viewtopic without forum id being set such as this.

viewtopic.php?p=13797676#p13797676

It is possible I just don't have the desire to spend an inordinate amount of time on this.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22099
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Forum Based 'Posts Per Page'

Post by RMcGirr83 »

Github has been updated, no more edits to core files needed. To update, unenable the extension in the ACP (no need to delete the data), download from github, upload to ext directory and re-enable the mod.

Will cover viewforum, viewtopic, MCP forum_view and search "active topics" as well as functions_display.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
Volksdevil
Registered User
Posts: 2415
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil

Re: Forum Based 'Posts Per Page'

Post by Volksdevil »

Rich, just to clarify...

I currently have this old MOD installed https://www.phpbb.com/customise/db/mod/ ... _per_page/ but with the addition of the snippet in your post about viewforum.php. I also ran the sql query as suggested in the old MOD.

So before I try the extension version by your good self, I need to remove the whole of the old MOD and the snippet you provided for viewforum.php?

And lastly, I can remove the database entry that the MOD also needed?

Just want to be sure before I try the extension.
My phpBB Extensions
Finally found great Website Hosting from :arrow: KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Twitch | My Volkswagen Corrado G60
User avatar
RMcGirr83
Former Team Member
Posts: 22099
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Forum Based 'Posts Per Page'

Post by RMcGirr83 »

Yes remove everything, manual edits too, including extension and reinstall from git
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
Volksdevil
Registered User
Posts: 2415
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil

Re: Forum Based 'Posts Per Page'

Post by Volksdevil »

Cheers Rich, I've never had the extension installed yet but I'll give it a go 8-)

Just noticed something too (With current setup, yours may fix it?) which is shown up by the Detailed view online extension. When viewing online list I see:
Image

But if I click that link, I'm taken to page 41, not 21. Maybe something that is already taken care of in your extension, or maybe even the detailed viewonline extension that needs a fix?

Just thought I'd let you know here anyway. Thank very much for having a look at this extension request and working on it, much appreciated.
My phpBB Extensions
Finally found great Website Hosting from :arrow: KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Twitch | My Volkswagen Corrado G60
User avatar
RMcGirr83
Former Team Member
Posts: 22099
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Forum Based 'Posts Per Page'

Post by RMcGirr83 »

Volksdevil wrote: Just noticed something too (With current setup, yours may fix it?) which is shown up by the Detailed view online extension. When viewing online list I see:
Image

But if I click that link, I'm taken to page 41, not 21. Maybe something that is already taken care of in your extension, or maybe even the detailed viewonline extension that needs a fix?
It is because that extension uses this $this->config['posts_per_page'] and there are no events to change that. Extension author, or you, would have to add an event to be able to change that.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
Volksdevil
Registered User
Posts: 2415
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil

Re: Forum Based 'Posts Per Page'

Post by Volksdevil »

No probs, I'll give the author a nudge to see what he thinks. :)

Installed your extension btw, and working great from what I can see so far! Very pleased thanks again mate. :)
My phpBB Extensions
Finally found great Website Hosting from :arrow: KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Twitch | My Volkswagen Corrado G60
User avatar
Galixte de EzCom
Registered User
Posts: 1106
Joined: Mon Oct 04, 2004 11:14 pm
Location: France
Name: Raphaël M.

Re: Forum Based 'Posts Per Page' [In Dev]

Post by Galixte de EzCom »

please delete me. Good post here : viewtopic.php?f=456&t=2278686&p=13981541#p13981541
Communau EzCom
📖 « Traductions d’extensions & styles pour phpBB 3.2.x & 3.3.x ».
📋 Lists of all extensions identified for phpBB 3.1.x & 3.2.x.
📋 Lists of all styles identified for phpBB 3.1.x & 3.2.x.
Image Tu as un forum et tu veux aussi un site web ? Regarde par ici.

Return to “Extension Requests”