Giter Site home page Giter Site logo

Comments (17)

samcleaver avatar samcleaver commented on April 27, 2024

I'll be rewriting the plugin this week or next as it's using a very old version of infinite-scroll. I'll make sure its tested on the original etc.

from infinite-scroll.

adriantomic avatar adriantomic commented on April 27, 2024

Cool, thanks for the quick reply :)

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

Could you post a link to a live example we could look at? It would be really helpful!

from infinite-scroll.

adriantomic avatar adriantomic commented on April 27, 2024

It's on my own server at the moment. You can look at it here: http://1-2-3.dyndns.org/

As you can see I'm using jquery.cycle plugin. I've tried disabling it, but infinite scroll still don't load further than page 2.

Here's the loop.php: http://pastebin.com/Civ3n8xS

from infinite-scroll.

adriantomic avatar adriantomic commented on April 27, 2024

Accidentally closed it...

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

I think you need to use the pathParse feature. It says there's no more pages to get because it's trying to go to 'http://1-3-3.dyndns.org/page/2/'.

Could you set debug to true in your options? Thanks.

from infinite-scroll.

adriantomic avatar adriantomic commented on April 27, 2024

I think I've turned debugging on now. I'm using the WordPress plugin, så I can't change it in WP-Admin. I changed the debug setting in wp_infinite_scroll.php.

If I understand correctly, is it the actual numbers in "1-2-3.dyndns.org" that makes the plugin misunderstand the paging?

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

Thanks for that! You need to use the pathParse feature to return the array of ```['http://1-2-3.dyndns.org/page/','/']

from infinite-scroll.

adriantomic avatar adriantomic commented on April 27, 2024

Thank you for your help. I am sorry, but I have no idea on how to use the pathParse option. I can see in the debug that the url is "split" in the wrong place. But I don't know what to write for the path parse to return the correct array.

I tried to look at the infinite scroll web site, as well as google, but I couldn't find any description on how to use it.

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

FYI, I don't know if the current WP has support for pathParse. If it doesn't, @Beaver6813 should have you covered soon.

You just need to return the array above. Try adding this to your options.

pathParse: function() {
    return ['http://1-2-3.dyndns.org/page/','/']
}

from infinite-scroll.

adriantomic avatar adriantomic commented on April 27, 2024

Thanks. That's what I tried. It seems to return the same array as before. I can wait for @Beaver6813 to cover it :) In the meantime I will try to fix it. Cheers!

from infinite-scroll.

samcleaver avatar samcleaver commented on April 27, 2024

At the moment the plugin doesn't do much more than insert and initiate infinite-scroll on the wordpress site. Seeing as its a plugin I'll just use wordpress's "current page" variable to feed it directly to the javascript, save the faffing with pathParse. The aim of infinite-scroll is to be as flexible and extensible as possible; the aim of the wp plugin is to work as easily and with as minimal configuration as possible.

from infinite-scroll.

24K avatar 24K commented on April 27, 2024

Hello guys, I'm sorry if I'm hijacking this thread, but I'm at the verge of pulling my hair out and I think my issue is related to OP's issue.
Been struggling for 2 days with this plugin now to resolve an issue. It sounds related to the aforementioned by the OP.
My infinite scroll seems to work fine. (as in, it scrolls infinite). However, I have set my reading settings to show max. 5 posts on the homepage. So after 5 posts, it will load new posts. BUT, I'm using Cufon for font-replacement and as soon as it loads the next set of posts, my font doesn't change anymore. It seems that I lose every added functionality after it has load the second set (or page) of posts. Is this related to the aforementioned issue by the OP? Any help would be much appreciated.

from infinite-scroll.

adriantomic avatar adriantomic commented on April 27, 2024

I don't think we have the same problem. My problem was that infinite scroll misinterpreted my url (1-2-3.dyndns.org) as a page number.

I think you need to set some kind of javascript in the callback function of Infinte-scroll. So it will reset the cufon font replacement for the next page that loads.

If you can't get that to work you might want to try to import the font using CSS @font-face.

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

@adriantomic speaks the truth. Try cufon.refresh() in your callback.

from infinite-scroll.

24K avatar 24K commented on April 27, 2024

Hey guys, thanks for the replies and sorry for posting my issue in yours. We indeed have a different problem.
Unfortunately I'm not sure where to put "cufon.refresh()" .

The below is a callback, right? :

Cufon.replace('content');

Should I then use cufon.refresh() instead of the Cufon.replace?
Sorry if I may sound stupid. But this is my first time I'm working with infinite scroll and cufon together.

Thanks again for the quick reply guys.

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024
$('#your-selector').infinitescroll({
    /// your options
}, function(newElements) {
    // this is where you specify your callback function
    // 'newElements' refers to all of the new content the plugin loaded
    Cufon.refresh();
});

You can also try Cufon.refresh(newElements) but I've never used Cufon's refresh method with a selector for an argument.

from infinite-scroll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.