Multiple comments on a blog post

I am working on a blogging application in ASP.NET and I would like to give the option on selected pages for there to be more than one section for comments, namely after each part of the blog post. I’d also like to make it so that, using AJAX, I could allow users to drag and drop these sections into different places.

The part I’m struggling with at the moment is how to handle the comment system in the database. My gut feeling tells me that I should separate each section by ID as well as by each page and then display by each section, although I’ve ran across other scripts that do similar things that just take all the comments from a post and display them based on where they were posted.

So, if you had a blog post with n sections and you required n separate comment areas to handle their own comments, how would you lay it out?

ULTiMATE what an interesting idea. I’m a little confuse about what your asking, but I’ll give it a try.

Setting up the comment table with a page id, section id, and position fields (assuming you need to save the position) would provide the information you need to associate the information. It would also provide enough information to sort and filter them if the need arises.

In terms of the layout, if the sections were a page or longer, paginating the sections with a comment at the end would make sense.

If they are shorter, a lot of comment fields would be distracting. In that case, one field at the bottom would be a catch all. A comment icon at the end of each section could expand to a comment field. Comments could be placed in a side panel as notes in the margin.

E

The script I’m writing is basically no different than a Blog post, except comment boxes are placed in certain areas by the author so that people can comment on certain things, like images on a page. The boxes are hidden by default and are shown by clicking on a link through jQuery.

My original idea was just to separate the comments with an additional “section_id” field, and then take all comments from page x and section y, then order by date.