Ajaxified comments

Just a quick update - have managed to get Ajax comments up and running in ‘fauna’, the current theme.

It should now use Ajax by default, yet degrade back to the standard submission form in any non IE powered browser. Oh while I remember, livesearch is also active. So much for avoiding masses of java and bloat, eh? :)

≡ This is a journal entry relating to the topics of , , .

Brendan Borlase is a Systems and Network Administrator living in Adelaide, Australia, having lived, worked and breathed Information Technology for over 12 years. Learn more.

Feedback is encouraged. If you would like to read more, consider subscribing to the regularly updated RSS Feed.


  1. matthew

    does it update the page now?

  2. brendan

    Appears to - right now there is a textual indication of that just above the ‘leave a comment’ heading.

  3. brendan

    Heh - I just realised anyone subscribed to comments is being spammed while I test this - sorry. :)

  4. Joen

    I simply have to test this out!

    Here’s hoping you enjoy the theme, by the way :)

  5. brendan

    Joen,

    Feel free to have a play.. :)

    The theme rocks, well and truly. I’ve found it particularly well documented (which makes adding Ajax, live search, etc a more pleasant experience) - it’s pretty minimalistic (in feel) which I’m always drawn to.

    I’m really looking forward to seeing where I can push your creation, as I have a bunch of idea’s I want to try out and ‘fauna’ seems to be the closest in concept to what I desire.

    Very cool.

  6. brendan

    Okay - hopefully there should now be an animation during the Ajax processing. Or not. Only one way to find out. :)

  7. matthew

    lets try this sucker then…

  8. matthew

    wahay. Seems you havent managed to increase the comment number yet though. I had that too, so I just dropped it. The spinning animation is under the text btw.

  9. brendan

    Hrm, it should be all good now - top right aligned (behind a width setting to stop it ending up too far to the right).

    Now, as for the number incrementing - not a clue.. It’s likely due to Ajax not actually re-loading all the comments, so until the page is regenerated it stays at 1. As to how to fix that? Might have to look at someone else’s implementation to see if I can work out the ‘trick’ to increment the div’s ol count correctly.

  10. brendan

    Okay - last touch up for now (pending that darned comment count increment dilema). Have center aligned the ‘processing’ div so it should look more agreeable.

  11. Joen

    It’s working fine for me, animation and everything.

    I’m glad you find it easy to customize the theme, I’ve gone to great lengths to simplify especially the comments files to keep things simple.

  12. brendan

    Joen,

    Indeed, it’s a very well put together. :)

    “It?s working fine for me, animation and everything.”

    Cool. I was pretty sure I had it sorted. The only hitch, as matthew has pointed out, is the comment counter not incrementing correctly.

    I’m in two minds how to proceed on the layout of posts.. One layout would have the last ‘full’ post at the top, with asides, then recent entries below..

    The other (which might be more chronological/ logical) would be to have x number of asides, then the full post (with an anchor at the top to ’skip to latest entry’) followed by recent entries (which would be a mixture of asides and full entries).

    Right now option B makes more sense - however option B will be a bit more of a challenge. I’ll have to apply a filter to the loop to pull the last x asides, then drop down into (or rewind the loop) the most recent full post, then possibly rewind the loop again to drop into the recent entries. Fun fun fun. :)

  13. matthew

    yup, looking good

  14. brendan

    Thanks matthew. :)

  15. matthew

    its abit unfortunate that the only way to see the ajax stuff is to post a comment, but anyway, i just thought Id mention that I really like the speech bubble activity thing.

  16. brendan

    “..i just thought Id mention that I really like the speech bubble activity thing.”

    Heh - It’s the technorati bubble, used as a filler until I can find another good ‘throbber’ style animation. Ideally I’m after something like the circular ‘please wait’ style throbber often used in flash (I think it’s like the default ‘loader’ anim or some shit). I just liked the bubble to be honest..

  17. brendan

    Just re-activated the “Adhesive” plug-in - new it would come in handy. Rather than try and create masses of code to filter the last “full” post I’ll just set each full post I want as the “primary” post, to sticky.

    That gives more granularity as some full posts may not warrant being the first post.

    Joen, you have a top notch theme in “fauna” - it rocks. :)

  18. If Else

    Let’s have a try…

  19. Joen

    bq. Joen, you have a top notch theme in ?fauna? - it rocks. :)

    Thanks a lot, I appreciate that.

    Your customization is looking better and better, btw.

  20. brendan

    “Your customization is looking better and better, BTW.”

    It’s getting there. Have a long way to go yet, but things are certainly progressing well. :)