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.

Infinite Scroll and Comments/Discussions per page settings

I really love this plugin but i have a few problems with the settings.

Story:
The original settings by Vanilla are
$Configuration['Vanilla']['Discussions']['MaxPages'] = 100;
$Configuration['Vanilla']['Comments']['PerPage'] = '30';
$Configuration['Vanilla']['Discussions']['PerCategory'] = '5';
$Configuration['Vanilla']['Discussions']['PerPage'] = '30';
So if I am visiting a new site, Vanilla adds '30' to the read comments even if i only read the first one on the new site.

Workaround:
My solution was to use Infinite Scroll and set the CommentsPerPage=1. Inside a discussion this works well, because I have the number of comments listed as sites and i can jump exactly to the desired comment.

Problem:
But if i set DiscussionPerPage=1 inside a Category, then only 3 (don't know why) discussions are shown and the JumpToBottom Button leads to an "no discussion found" error. I have to set DiscussionPerPage to a ridiculous high value (10.000) to see all discussions listed but then i lose the pagination and by klicking on the pageup/pagedown arrows i cannot enter any site number since i only have one.
Is this on purpose, that discussions and comments work differently?
How can i achieve the same behaviour as by comments?

Comments

  • BleistivtBleistivt Moderator

    Thanks for trying out my plugin!

    You shouldn't set Vanilla.Discussions.PerPage to 1 or 10000. Extremely small or large values are incredibly wasteful and hurt your SEO. There is a reason, these values can't be chosen from the dashboard.

    If you send me a link to your page, I will take a look at it. But I can already tell you, that you are using both Vanilla and my plugin in ways they were not intended to be used.

  • cko12cko12 New
    edited July 2016

    thank you for your answer. i figured out the jump-to-bottom error. since i am porting another forum to my vanilla forum the database-settings are mixed up. so the current number of comments inside a discussion is correct, but the number of discussions inside a category etc. is wrong. i have to set this number correct during my migration process. so there's nothing wrong with your plugin ;) still great, still helpfull, still just the thing i need :)

  • @cko12 said:
    thank you for your answer. i figured out the jump-to-bottom error. since i am porting another forum to my vanilla forum the database-settings are mixed up. so the current number of comments inside a discussion is correct, but the number of discussions inside a category etc. is wrong. i have to set this number correct during my migration process. so there's nothing wrong with your plugin ;) still great, still helpfull, still just the thing i need :)

    For future reference, visiting /dba/counts should correct denormalized columns in the db. No manual work necessary.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • oh cool. thanks for that.
    but i just figured out another issue. i have a very large amount of discussions (22k+) and it set to 50 discussions / page. while scrolling it stops at 214 on the 5th page and no more scrolling is possible.
    is it a settings-issue?

  • BleistivtBleistivt Moderator

    Are there any warnings/errors in the browser console (press F12 to open) when that happens?

  • as a matter or fact i just can't reproduce the error right now. everything works fine for the moment. i'd come back to you later if there is that issue again...

    eventually you could answer me another question: is there a way to remove the enable/disable checkbox for infinite scrolling in the user's profile?

  • BleistivtBleistivt Moderator

    You can hide it using CSS:

    .Section-EditProfile li.InfiniteScroll {
        display:none;
    }
    
Sign In or Register to comment.