WordPress.org

Ready to get started?Download WordPress

Forums

WP-Ajaxify-Comments
[resolved] Add ability to load all comment using ajax? (12 posts)

  1. JayXon
    Member
    Posted 1 year ago #

    Just like the plugin "AJAX Comment Loading" did.
    But that plugin is not working and it seems has stopped development.

    http://wordpress.org/extend/plugins/wp-ajaxify-comments/

  2. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Hi JayXon,
    Thanks for your comment. I will put this feature on my todo list for future releases.
    Jan

  3. JayXon
    Member
    Posted 1 year ago #

    Hi, Jan,
    Thanks for the quick response. Looking forward to future releases.

  4. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Hi JayXon,

    thanks for your comment. Please try out the new developer version 0.12.0 from here http://downloads.wordpress.org/plugin/wp-ajaxify-comments.zip.
    This version adds the option "Load comments async threshold" (in the expert section) which specifies the number of comments for which a secondary AJAX request should be used to load the comments asynchronously. By default this option is disabled. So, you need to use the Admin frontend to enable the feature.

    Hope this helps...

  5. JayXon
    Member
    Posted 1 year ago #

    I tried the 0.12, and it works great, thank you!
    I found that the url will contain something like WPACRandom=1364886761504&WPACFallback=1 if I enabled this. Is this a must? Can you remove it?
    And I have one more request, could you please make it able to switch comment pages without refreshing the whole page? That's the point why ajax load comments exist.
    My blog has lots of comment per post, so it would be very nice to have this feature.

  6. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Hi JayXon,

    if your URL contains WPACRandom=1364886761504&WPACFallback=1 in the query string something went wrong and the plugin uses its fallback mode to show all comments. Can you please enable the debug mode and post the output before the browser is redirected to the URL containing the fallback parameters?
    If you fix the problems logged in the debug output the comments should be loaded and displayed without a complete page reload.

    What do you mean with "switch comment pages"? Are you looking for some kind of a paging feature for comments?

  7. JayXon
    Member
    Posted 1 year ago #

    Hi Jan,
    I have enabled debug mode and got the console output.
    It seems that it can't find #comments, what should I do?
    Can you give a look at my site? I'll leave debug mode on.

    [WP-Ajaxify-Comments] Initializing version 0.12.0 www.jayxon.com/:103
    [WP-Ajaxify-Comments] Found jQuery 1.8.3 www.jayxon.com/:103
    [WP-Ajaxify-Comments] Found jQuery blockUI 2.57 www.jayxon.com/:103
    [WP-Ajaxify-Comments] Search comment form (selector: '#commentform')... Found:
    [form#commentform, context: document, selector: "#commentform", constructor: function, init: function, selector: ""…]
     www.jayxon.com/:103
    [WP-Ajaxify-Comments] Search comments container (selector: '#comments')... Not found www.jayxon.com/:103
    [WP-Ajaxify-Comments] Search respond container (selector: '#respond')... Found:
    [div#respond.respond, context: document, selector: "#respond", constructor: function, init: function, selector: ""…]
     www.jayxon.com/:103
    [WP-Ajaxify-Comments] Initialization completed www.jayxon.com/:103
    [WP-Ajaxify-Comments] Loading comments asynchronously with secondary AJAX request www.jayxon.com/:103
    XHR finished loading: "http://www.jayxon.com/download-search/". www.jayxon.com/:2
    [WP-Ajaxify-Comments] Comment container on current page not found (selector: '#comments') www.jayxon.com/:103
    [WP-Ajaxify-Comments] Something went wrong. Reloading page (URL: 'http://www.jayxon.com/download-search/?WPACRandom=1365009633722&WPACFallback=1')... www.jayxon.com/:103
    [WP-Ajaxify-Comments] Sleep for 5s to enable analyzing debug messages... www.jayxon.com/:103
    XHR finished loading: "http://www.jayxon.com/wp-admin/admin-ajax.php?action=crayon-tag-editor&is_admin=0&version=2.2.0". www.jayxon.com/:2

    And by switch comment pages I mean I already have comment paging, but I want that if I click the link of previous comment page, I can load it using ajax instead of goto another page.

  8. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Please try the following settings:

    OnBeforeSelectElements:
    jQuery('#comments, #comments ~ *', dom).wrapAll('<div id="commentsContainer" />');

    Comments container selector:
    #commentsContainer

    The comment paging support, is not part of my plugin. I think you have to contact the author of the plugin you are using for the paging features and ask for AJAX support.

    Hope this helps...

  9. JayXon
    Member
    Posted 1 year ago #

    I tried this but still same error.

    [WP-Ajaxify-Comments] Initializing version 0.12.0 www.jayxon.com/:103
    [WP-Ajaxify-Comments] Found jQuery 1.8.3 www.jayxon.com/:103
    [WP-Ajaxify-Comments] Found jQuery blockUI 2.57 www.jayxon.com/:103
    [WP-Ajaxify-Comments] Search comment form (selector: '#commentform')... Found:
    [form#commentform, context: document, selector: "#commentform", constructor: function, init: function, selector: ""…]
     www.jayxon.com/:103
    [WP-Ajaxify-Comments] Search comments container (selector: '#commentsContainer')... Not found www.jayxon.com/:103
    [WP-Ajaxify-Comments] Search respond container (selector: '#respond')... Found:
    [div#respond.respond, context: document, selector: "#respond", constructor: function, init: function, selector: ""…]
     www.jayxon.com/:103
    [WP-Ajaxify-Comments] Initialization completed www.jayxon.com/:103
    [WP-Ajaxify-Comments] Loading comments asynchronously with secondary AJAX request www.jayxon.com/:103
    XHR finished loading: "http://www.jayxon.com/wp-admin/admin-ajax.php?action=crayon-tag-editor&is_admin=0&version=2.2.0".
    XHR finished loading: "http://www.jayxon.com/qq2013-beta2/". www.jayxon.com/:2
    [WP-Ajaxify-Comments] Comment container on current page not found (selector: '#commentsContainer') www.jayxon.com/:103
    [WP-Ajaxify-Comments] Something went wrong. Reloading page (URL: 'http://www.jayxon.com/qq2013-beta2/?WPACRandom=1365016632298&WPACFallback=1')... www.jayxon.com/:103
    [WP-Ajaxify-Comments] Sleep for 5s to enable analyzing debug messages...

    Comment paging is not achieved by using a plugin, wordpress has this feature itself. It's in the settings.

  10. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, this is a tricky one :)

    Please try:

    OnBeforeSelectElements:
    var e = jQuery('#comments, #comments ~ *',dom); if (e.length==0) e = jQuery('#respond', dom); e.wrapAll('<div id="commentsContainer" />');

    I hope this setting fixes the problems...

    I was not aware of the built-in support for comment paging. I will try to "ajaxify" this in one of the next releases.

  11. JayXon
    Member
    Posted 1 year ago #

    This one worked. Thanks!

  12. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Great to hear!
    Please think about supporting the plugin by making a small donation (http://blog.janjonas.net/donate) or write a short review (http://wordpress.org/support/view/plugin-reviews/wp-ajaxify-comments#postform).

    Thanks in advance,
    Jan

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic