The Forum module defines this option and is accessible from admin/structure/forum/settings
The Advanced Forum module uses it, but doesn't pass it to the view 'advanced_forum_topic_list'
Proposed patch attached

CommentFileSizeAuthor
core-overrides.inc_.patch364 bytessamsouk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

troky’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Active » Patch (to be ported)

Nice one. Committed to 7.x-2.x-dev. Thanks!

I believe 6.x needs this patch as well.

mcdruid’s picture

Status: Patch (to be ported) » Fixed

Thanks samsouk and troky; I've added this to 6.x-2.x-dev

The only difference was that I had to forcibly set the option on the view's handler, rather than using the setter method as per samsouk's patch (I tried that and it didn't affect the number of topics displayed).

+++ b/includes/core-overrides.inc
@@ -188,5 +188,6 @@ function advanced_forum_get_topics($tid, $sortby, $forum_per_page, $sort_form =
   $view->set_display('default');
   $view->set_arguments(array($tid));
   $view->sort_form = $sort_form;
+  $view->display['default']->handler->options['items_per_page'] = $forum_per_page;
   return $view->preview();
 }

...this is with Views 6.x-2.16 if that makes any difference.

Anyway, it seems to work.

mcdruid’s picture

Also noticed that the overridden menu callback advanced_forum_page does:

$forum_per_page = variable_get('forum_per_page', 25);

...but doesn't actually use this when listing forums (rather than topics - n.b. the option is labelled as 'topics per page' in the admin form, but that doesn't reflect the variable name).

So, for example, if you have lots of forums in the top level which are not inside containers, they all get displayed at /forum with no pagination.

In fact, core forum does exactly the same thing - I suppose there's an assumption that when the list of forums gets too long, they'll be organised into containers.

I suspect we won't get round to doing anything about this, but I thought I'd make a note of it here, as it's relevant to this issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.