[021] Unlimited scroll [Deleted]

This is pretty cool. Though, I did notice though that I have to scroll all the way to the bottom before the infinite scroll triggers. With a large footer, it doesn't seem to happen naturally.

arn
.this is normal, scrolling depends on page height. If you want to change this, you need custom development)
 
.to do this, you need to create several modifications of the template whats_new_profile_posts. You can create it following the example of existing modifications.
I have the whats new profile posts widget on a home page and it gets rid of the page numbers. What mods do i need to do for the template to get this to work for the home page with no page numbers?
 
.to do this, you need to create several modifications of the template whats_new_profile_posts. You can create it following the example of existing modifications.
How much to pay you to add it as an update to infinite scroll new profile posts, as on my website greasygamer.com. I need it to infinite scroll the main page (which is the whats new profile posts widget)
 
It seems like tooltips don't work on paged-in items. For instance, hover over a user avatar on part of page the was paged in after initial request. You won't see the popup. Any remedy for this?

Thanks!
 
I think I may have found a solution. At least it seems to be working so far. Adding this at the end of appendHtml function inside scroll-paginator.js causes the tooltips (message preview and user popup) to work again.

Code:
                XF.onPageLoad();

I assume there is some js that adds the tooltip handlers to the elements on the page that is called when page load is complete. I'm not sure how well this will hold up after page loading a lot of content, but we will see.

edit:
Here is better solution than above as it calls a lot less javascript.
Code:
                XF.activate(document);
 
Last edited:
Thanks for quick fix! Awesome!

One other tweak I use with this addon that I find works better for paging in before it reaches bottom and works more consistently on mobile devices (at least mine):

Code:
        isBottom: function () {
            return $(window).scrollTop() + $(window).height() >= $(document).height() * 0.8;
        },

I also disabled the history pushState as I found that just caused confusion.

Thanks for great resource!
 
Sorry to be a pest, but your latest update seems to have some kind of recursive init issue. The init function gets called multiple times, and gets worse as more pages come in. It eventually ends up glitching the contents and you end up with copies of the same threads in the structured list.

I ended up with this as end result that seems to work
Code:
                this.$pageNav.html($html.find('.pageNav').first().html());

                this.detectPageParams();

                this.$append.append($html.find(this.options.appendTarget).html());

                history.pushState({}, document.title, this.requestUrl);
                XF.activate(this.options.appendTarget);
 
Hi - me again! 🤣 A bug report, a minor issue, and a few more suggestions for adding options to make this resource even better.

Bug:
1.01 has minor bug in template modification bsuc_xfrm_whats_new_resource_scroll_paginator_init. The type is set to simple replacement and it should be regular expression.

Thanks for fixing the JS init issues. Working great now!

Minor Issue:
If the page is displaying pageNavSimple due to size of window being smaller (mobile device, etc.), your script does not update the page numbers on it. This could be fixed using this additional code:
Code:
            this.$pageNavSimple = this.$target.find('.pageNavSimple').first();
            if (!this.$pageNavSimple.length) {
                return;
            }

Code:
                this.$pageNav.html($html.find('.pageNav').first().html());
                this.$pageNavSimple.html($html.find('.pageNavSimple').first().html());
You might also want to hide the bottom pageNavSimple since your code does not update the page numbers on it, although on some smaller screens the top pageNavSimple is hidden automatically by another method which would result in no page controls:
Code:
.block-outer--after
{
    .pageNav {
        display: none;
    }
    .pageNavSimple {
        display: none;
    }
}

Suggestions:
  1. Can you add a parameter for page % scrolled before ajax load is kicked off? This allows pre-fetching before reaching bottom of page similar to how reddit works. I'm manually editing your js file to set this at 80% (I multiply bottomHeight by 0.8)
  2. Can you add option to disable history state push? I could see why it might be nice, but in my case I find it a bit annoying. It makes page refresh odd after you have scrolled past first page as it then reloads starting from that page instead of top. It conjunction with this, it might be good to have an unload handler that sets scroll back to top window.addEventListener("unload", function () { window.scrollTo(0, 0); });

Thank you! I will stop bugging you now!
 
Thanks for this addon, What is this feature by the way?
I didn't notice this:
.that you visited this page will be added to the browser history

Is it possible to apply this on thread view? Thanks.
No, then users can only reply on the last page

I have the New Profile Posts widget on my main page and want to have it scroll. Tried for hours to figure it out.
You should look at this add-on: https://xenforo.com/community/resources/bs-live-forum-statistics.7603/
 
  • Love
Reactions: rdn

This Unlimited Scroll does exactly what i need it to do on the forums and whats new pages. But i have a Whats New Profile Post widget on my home page that displays 10 profile posts, and I want it to display more when scroll reaches footer. The widget has no "page nav" so maybe that is the problem?
[/QUOTE]
I will pay you if you can figure that out for me!!! :)
 
Top Bottom