SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Community Advisor ULTiMATE's Avatar
    Join Date
    Aug 2003
    Location
    Bristol, United Kingdom
    Posts
    2,160
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)

    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?

  2. #2
    SitePoint Guru
    Join Date
    Jan 2007
    Posts
    967
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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

  3. #3
    Community Advisor ULTiMATE's Avatar
    Join Date
    Aug 2003
    Location
    Bristol, United Kingdom
    Posts
    2,160
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •