Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.

Doesnt work correctly with infinitescroll plugins

This discussion is related to the Reply addon.

Hello Forum,
I am using this reply plugins and infinitescroll plugin (https://vanillaforums.org/addon/infinitescroll-plugin) at the same time.
Without infinitescroll, reply works fine (gives @admin to the textbox).
But when infinitescroll is activated,the textbox doesnt show until last comments and when reply button is clicked before last comments, it jumps to the next page with
post/comment/'.$args['Discussion']->DiscussionID.'/'.urlencode($args['Author']->Name)
(maybe because the comment box is hidden). And at last page (after commentbox is shown) reply works fine.
Now I fixed the commentbox position(position:fixed) and always shown (dispay:block). Even in this case, after you click reply, it jumps to the next page. Is it possible not to jump to the nex page and append @admin to the text box even using infinitescroll plugin?
Is there is any other solutions.
If question is not clear, i am happy to explain again.

I am not sure is this the right place for this question.If not,please let me know.

Thank you in advance.

P:S. unless there is simillar plugins like infinitescroll, i need this anyhow.

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @vanillawhisky said:
    Hello Forum,
    I am using this reply plugins and infinitescroll plugin (https://vanillaforums.org/addon/infinitescroll-plugin) at the same time.
    Without infinitescroll, reply works fine (gives @admin to the textbox).
    But when infinitescroll is activated,the textbox doesnt show until last comments and when reply button is clicked before last comments, it jumps to the next page with
    post/comment/'.$args['Discussion']->DiscussionID.'/'.urlencode($args['Author']->Name)

    What do you mean by "it jumps to the next page"? What is "the next page"?

    I think I will not be able to help you. Maybe @Bleistivt can give a hint what's happening and why it is happening. I do not understand very much of the InfiniteScroll plugin since it is quite complex and uses a lot of JavaScript... :(

  • @R_J said:

    What do you mean by "it jumps to the next page"? What is "the next page"?

    Next page means
    http://example.com/post/comment/2598/admin

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I'm not sure what's happening here. I use "return false" to prevent the reply link to be really followed and that seems to not be called at all. Using preventDefault leads to quite funny errors with the advanced editor.

    There is a js error when using InfiniteScroll together with the advanced editor, maybe that is the reason.
    There is also a problem with the hidden comment box. Since it is hidden, it cannot be scrolled to.

    To let both plugins work together, reply must communicate somehow with infinite scroll or simulate the manual scroll down process.
    That said... what about a very long discussion where someone clicks reply on the first comment and the complete discussion has to be scrolled by? That sounds awful.

    But anyway: my js skills are not elaborate enough for this problem and I don't think that infinite scroll is a good feature in a forum at all. That's why I will not be able to provide a solution.

  • To let both plugins work together, reply must communicate somehow with infinite scroll or simulate the manual scroll down process.

    Yes. InfiniteScroll already has this functionality. It could be triggered by simulating a click on the button:

    $('.JTB').click();
    

    @vanillawhisky You would have to wrap line 24-26 of reply.js between if (!$('.JTB').click().length) { and }

    My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations

    RiverR_J
Sign In or Register to comment.