Multiple Page View for Forum Posts

Multiple Page View for Forum Posts

by Marty Jacobs -
Number of replies: 7

Students at my college hate having to scroll for ages within long discussion topics, just to be able to read the latest post (they prefer keeping the display set to flat with oldest first). This is also a very bad thing in terms of page loading times, i.e. pages with many posts take too long to load.

I suggest that an option is added that allows you to specify a max number of posts per page, in the same way you can specify the number of discussion topic per page. This would minimise the amount of scrolling users have to do and would make forums more user friendly.

I've added this as a new feature request in the issue tracker (see MDL-10120).

Average of ratings: -
In reply to Marty Jacobs

Re: Multiple Page View for Forum Posts

by John Ryan -
I believe this is already possible in moodle 1.8.1 anyway.

If you go to "Site Administration > Modules > Activities" then choose Forum settings and there is a setting 'forummanydiscussions'. The default on my system is 100.
In reply to John Ryan

Re: Multiple Page View for Forum Posts

by Marty Jacobs -
Nope its not. The setting you mention only effects the number of discussions per page. I'm talking about having control over the number of posts per page.

Thanks for trying to help thou smile.
In reply to Marty Jacobs

Re: Multiple Page View for Forum Posts

by Hendy Wijaya -
I don't know if this issue is still open... since it's been almost a year now... I ran into this kinda of problem too, solved it with kinda dirty-hack-way in 2 hours...

I added one additional mode (display in flat, nested, etc...), the fifth one which I named "displays discussions in pages", and then add one more "function forum_print_posts_paged" works fine enough for me and my colleagues here...

Has anyone come up with the solution yet? Mine is low-documented, and the "view per page" number of posts is not configurable through administration module...

forum
In reply to Hendy Wijaya

Re: Multiple Page View for Forum Posts

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Yes, the issue is still open and I believe it is a good suggestion. Thanks for letting us know how you approached dealing with the long forum page issue. Would you be willing to provide the patch that you used on your site and share the code with the developers by attaching the diff file to MDL-10120. Having an idea of how one person solved it could be very helpful. Let us know if you have questions about how to use the tracker or generate a diff file. Peace - Anthony
In reply to Anthony Borrow

Re: Multiple Page View for Forum Posts

by Hendy Wijaya -
I'm currently using Moodle version 2007021505, release 1.8 + which I haven't updated recently. And yes, I would love to know more about using the tracker as well as maybe to participate in further moodle development. I'll try to visit the introduction site to Moodle Tracker, but it'd be nice if someone can just give a single crash-course to jump in moodle tracker.

I actually modified 3 files in order to add this new mode for displaying forum,
mod/forum/lib.php mod/forum/discuss.php and lang/en_utf8/forum.php I'm currently working on enabling "post view per page" to be configurable in the administration module.
In reply to Hendy Wijaya

Re: Multiple Page View for Forum Posts

by Marty Jacobs -
This seems like a neat solution to the problem. I would also be interested in seeing your code, if you're willing to share the hack.

Regards,

Marty
In reply to Marty Jacobs

Re: Multiple Page View for Forum Posts

by Hendy Wijaya -
sure thing.... here's the discuss.php and lib.php file, there's only small addition in the language pack folder.
add : " $string['modepaged'] = 'Display discussion in pages'; " in the lang/[language you're using]/forum.php

notice there's new function named forum_print_posts_paged in the lib.php