Introducing AJAX CommentLuv

CommentLuv with AJAX


I have finally implemented AJAX into my CommentLuv plugin, it should dramatically increase the speed at which the comment gets posted after a user clicks “submit” by monitoring the comment form entry box, as soon as it gets some action then a javascript routine gets called to find the feed, scrape the last post from it and display it below the comment form.

Because the fetch_rss has a cache which it checks before it tries to open the remote feed, the last blog post will still be stored in the cache from the AJAX request so it wont need to do much at all to add the last blog post to the comment. sweet!

It’s installed and running ok here in it’s rough state so I can see how it performs while I neaten up the code so it can do all the includes and stuff automatically as well as detect another url change if the user changes their blog url after starting to comment.

At the moment it uses a bit of jquery and a bit of the AJAX goodness that you can see on the Beginners AJAX Tutorials posts, when I’ve figured out how to do it all with jquery and have it working nicely then I’ll release the new updated plugin.

It seems that a quiet Christmas morning is all that’s required to get an AJAX problem solved!

I’ll get used to jQuery and get some tutorials out there after the part 5 and 6 are done with the current series. Happy Holidays everyone!

You can always find the current version of CommentLuv here
(no AJAX in the current version yet…)

0 thoughts on “Introducing AJAX CommentLuv

  1. Lalla Mira

    I think it’s a good idea to always post a link to where we can get CL plugin, in every new post that deals with it, de près ou de loin.
    I’ve had some issues with my blog, *again*, and the tech support of my hosting company says it must be one of the plugins I use. Surprisingly, I am not using anything extra-uncommon, only the usuals.
    I should get the new version of CL now and test it.

     
  2. Andy Bailey

    good idea! I put the link in at the bottom.
    it’s a pain in the arse when hosting doesn’t go right, I can see your default feed location doesn’t show your feed for me :-(

    I hope you get it sorted out so you can spread the lurv! :-)

     
  3. Diana13

    I’ve just update my commentluv plugin. First, I don’t see the point of that checkbox. And when I write something in the text area, it doesn’t appear like in your blog, the last post, above the Notify me …

    Diana13’s last blog post..Merry Christmas!

     
  4. Lalla Mira

    I can’t get may hands on what’s wrong with my feed. The pink box of your CL post detected my last post very quickly.
    Maybe I’ll try burning a new feed adding a letter at its end or something! What do I know!

    Lalla Mira’s last blog post..Young Bride

     
  5. Lalla Mira

    My feed worked for my last comment, I didn’t notice that.
    I changed the last bit of it, I hope that doesn’t affect anything [the number of subscribers for instance].

    Lalla Mira’s last blog post..Young Bride

     
  6. Andy Bailey

    hopefully it’s all sorted now, as long as you have the feedsmith plugin going on your site then you shouldn’t notice any difference in subscribers (I think!)

     
  7. Snowlark

    DUDE!!!

    Sweet, you got the AJAX change working so far? Great, I can’t wait! In fact, my traffic is quite low with my current blog, so let me know if you need a “beta tester” for this new change.

    (fyi – software quality is my profession for the last 17 years)

    Drop me a note if I can help …

    –Steve

    Snowlark’s last blog post..Staff IT Right Advisory Council

     
  8. Andy Bailey

    thanks Steve, I still have to make some improvements but I’m happy that it catches the feed, I definitely need to add some error catching in there for parsing the url before I process it. ATM I have it all in separate scripts so I will integrate it into the plugin. I may have to use a directory for commentluv from the next version to allow for includes…

    thanks for offer!

     
  9. Andy Bailey

    Talina: it’ll take me a little time to get the ajax thing integrated with the plugin so it works nicely first time. I should be able to make it backwards compatible for WP 2.1 and less.

    I need to experience the christmas lazy period first though and I’ll get right on with the plugin update! :-)

     
  10. Snowlark

    Andy, ensure you get some max-lazy-time as it helps one keep sharp. I’m glad we’ve got this working on my WP blog, so, happy day for me! :)

    Any improvements you make are welcome. Take time – it’s never coming back once it’s gone.

    (Harry Chapin, “Cats in the Cradle”, comes to mind)

    Snowlark’s last blog post..Did You Actually READ My Resume?

     
  11. Pingback: Top Respect To The Top Commenters & Sponsors - December

  12. Andy Bailey

    I tried going to http://veganmomma.com/blog/feed and it showed a blank page so CL must be using the cache to resolve your last post (the last time you posted a comment here showed the same last blog post)

    If I view the source of your feed page I can see all the guts are there but not when it’s viewed in a browser.. how strange!

     
  13. BadEvan

    Andy,

    Great Plugin. I see it around other blogs and I love it. Problem is….It’s not working on my blog. I got nothing…There isn’t even a check box for people to enable CommentLuv.

    I know my host allows curl…I’m at a loss.

    BadEvan’s last blog post..Banned By EntreCard

     
  14. Andy Bailey

    The only time that has happened for me is when it was on a custom template. the plugin uses the filter ‘comment_form’ to tell it to add the text, if your template doesn’t do that call then it wont show the text (I think!)
    other than that, I am at a loss too :-(

     
  15. BadEvan

    Can I send you a copy of my comments.php file?

    I kinda know my way around php….But I’m not sure what you are referring to.
    Maybe if we put our heads together we can fix this for me and the few others….

    BadEvan’s last blog post..Banned By EntreCard

     
  16. Stu

    The only thing I’ve found with Commentluv is that the Feedburner redirects tend to mess up the “link love.”

    Aside from that I think the plugin is a fantastic way to encourage more comments & more interaction on your blog :)

    Stu’s last blog post..Profit Lance Review

     
  17. Andy Bailey

    Hani, Urban Kevin: you may have to edit your theme comment.php file and add this line to just before the </form> tag

    <?php do_action(‘comment_form’, $post->ID); ?>

     
  18. Ami

    hi there! hoping you can help me with styling the output. i want to leave it blank so that it is styled just like the rest of the comment text (looks similar to the way you have it). i also want to turn off the underlining and question mark on hover. can you help? thanks!

     
  19. pradanang

    it not working in my theme. when i activated CL, my sliding picture in themes not working, i guess it because something with ajax used by themes or by CL itself. Any clue? oh yeah i’m using ProMag magazine theme

    great plugin btw..
    thx in advance

     
  20. Spinal Stenosis Guru

    I have no idea but it looks like it opens the door for spammers. You can generate a search operator in google to find the blogs with “Enable CommentLuv” keyword in the query.