WordPress.org

Ready to get started?Download WordPress

Forums

AJAX Inline Comments with Moo.ajax and Moo.fx (6 posts)

  1. Mark Jaquith
    WordPress Lead Dev
    Posted 8 years ago #

    I have to show this off... AJAX Inline Comments

    I've always had inline comments on my blog, so that on the front page you can click "show comments here" and it will use JavaScript to reveal a hidden DIV below the entry that contains the comments. The problem with that is that all the comments for all the posts on the front page are loaded when you load the front page, which makes the page longer to load (more queries) and longer to download (all those comments!)

    So, my solution was to use AJAX to download the comments as needed. That is, when you click "show comments here," it downloads just the comments you wanted to see.

    Also, I used Moo.fx effects to fade and "slide" them in and out. Let me know what you think.

    NOTE:
    NO, I CANNOT make this into a plugin. It simply requires too much theme editing. Of course, if you wanted to hire me to do it on your blog, I'd be happy to oblige. :-)

  2. kashou
    Member
    Posted 8 years ago #

    All I can say is wow! What a smooth, clean implementation. I am going to work with the moo.fx scripts and see if I like how it works/looks on my site.

    Hope you don't mind if I throw a few questions your way. Any code examples or stumbling blocks you found would be hugely helpful.

    Great work!

  3. kashou
    Member
    Posted 8 years ago #

    I have turned this into a plugin. It is also built-in to my tonus theme.

    Plugin: inline ajax comments

    (my first attempt at a plugin so be gentle)

  4. leohart
    Member
    Posted 8 years ago #

    Hmm, it looks great. I am thinking of making it better. By allowing the 'add comment' link to get the comment form in a div right before the comment listing div and submitting via ajax the redisplay the comment. Hmm, is that too much hacking?

  5. mstegink
    Member
    Posted 8 years ago #

    Sounds great but it doesn't work. Is keeps loading forever. Using Osx 10.4.5 and Safari 2.0.3.

  6. kashou
    Member
    Posted 8 years ago #

    Take a look at the plugin page.

    It is most likely a problem with your page URI. Try adding or removing "www." to the page address and see if it works. If that fixes the problem check out the plugin I suggest to fix it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags