≡ Menu

Comments Somewhat Live

I’ve gone ahead and finished up a majority of the commenting engine… I needed something to get my mind off work work stuff for a bit this afternoon so I put some effort into it.

I decided that you have to go to the posts single page (which will also be the RSS page for it here in the near future) to post any comments. The throbber/fader thingy will display all of the comments in the short view, on a rotating basis every 12 seconds. I think I need some formatting and such, but other than that, it’s working quite nicely.

I have to give a shout out to two groups for making the throbber thing possible. One is the Script.aculo.us people for making such easy to use fading code.

The other is Dan Menssen. Dan created a library for sunfox that he called the Ajax Responder. I have to admit, it is pretty dang slick how it spits back data using JSON. Needless to say, it saved me the time of having to write an XML parser to parse the comment RSS feed. If your ever looking for a slick way to pass variables from php to javascript, I highly recommend take a look at Json to structure your data.

I’m not entirely sure if I’m going to leave it coded up the way it is now. It has the small problem that it requires 6 additional page loads (ajax loads), when in theory I should be able to reduce that down to 1. I just didn’t want take the time to figure out how to use Dan’s library with javascript arrays. That’s ok though. It works find for now, and those additional page loads are rather small (think of them as the 6 images I don’t have on the site).

I also haven’t tested in IE yet, OR added a URL field to the post comment form. In any case, it’s pretty good for where it needs to be. Why not give it a whirl and let me know what you think of the new site and commenting engine.

Comments on this entry are closed.

  • Fred April 2, 2007, 12:42 pm

    You should really talk about your amazing girlfriend more. Now your posts are just empty without mention of her.

  • Justin Gehring April 2, 2007, 12:52 pm

    Thank you fred for your kind post… Of course, if you want to read more about my Girlfriend, please check out her site at http://www.bananamonkey.com/

  • Amber April 2, 2007, 3:11 pm

    He did not say that he wanted to read about me at another site, he said your posts were boring without me. You should listen to Fred because I agree.

  • Justin Gehring April 2, 2007, 4:14 pm

    Maybe I'll go buy justinwritesabouthowannoyingambercanbe.com where both Amber and Fred can get their pleasures… In fact, the domain is available! Just kidding honey.

  • Alex! April 3, 2007, 1:57 pm

    I like the commenting ability!

Next post:

Previous post: