Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Discussions per Page stuck at 5

Hey guys,

I'm having a blast running my first Vanilla forum (2.0.18.8), but I've run into an issue that I can't seem to resolve.
So I'd like to use the “Categories & Discussions” view for the homepage, but somehow there are never more than 5 discussions displayed per category at once.

I've set it to 100 in Settings > Forum Advanced and checked the config, but it just won't show more.

$Configuration['Vanilla']['Discussions']['PerPage'] = '100';

I know it can't be a theme problem, because this is happening no matter which theme I set. Any idea what could've gone wrong / what might be the cause of this? Maybe a screw-up with announcements (because I've posted a bunch of them earlier, but now there are 10+ posts in the category in question). Thanks!

Comments

  • peregrineperegrine MVP
    edited November 2013

    @snononoko said:

    So I'd like to use the “Categories & Discussions” view for the homepage, but somehow there are never more than 5 discussions displayed per category at once.

    However, you are using the wrong config statement for the solution you want.

    this is the config statement that will change the number of discussions on the

    this type of view http://vanillaforums.org/categories/discussions/

    // e.g. this will set it to 20
    // on the categories and discussions page
    $Configuration['Vanilla']['Discussions']['PerCategory'] = '20';


    other related info...

    where as
    // 100 on the discussions page
    $Configuration['Vanilla']['Discussions']['PerPage'] = '100';

    whereas
    // number of comments on a discussion page.
    $Configuration['Vanilla']['Comments']['PerPage'] = '17';

    insightful maybe??

    :):):):)

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine said:

    // e.g. this will set it to 20 // on the categories and discussions page $Configuration['Vanilla']['Discussions']['PerCategory'] = '20';

    Exactly what I was looking for! Works like a charm.
    I probably would've even figured this one out if it had been in the config by default, haha. Thanks a lot for your help!

  • peregrineperegrine MVP
    edited November 2013

    the key to finding it is looking at the url

    http://vanillaforums.org/categories/discussions/

    • vanillaforums.org/categories/discussions/

    controller = categories

    • vanillaforums.org/categories/discussions/

    method or function = discussions


    • therefore in the vanilla application the categoriescontroller

    applications/vanilla/controllers/class.categoriescontroller.php

    within that file is the discussions method, that has this line..

    $this->DiscussionsPerCategory = C('Vanilla.Discussions.PerCategory', 5);

    which would translate and indicate to you
    a possible config statment to override default number 5

    $Configuration['Vanilla']['Discussions']['PerCategory'] = '20';

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.