Page 1 of 1

Annotations for articles in a Web Site? Pls advise

Posted: Sat Jan 31, 2009 8:16 pm
by dedachi
Hello,

I have a website which has around 100 articles listed. I want to implement annotations within them such that anyone could edit text present below each article. Once the text has been moderated by a moderator, other users visiting the website can then view the comments posted for each of those articles.

Eg:

Article 1:
Comment 1: // Moderated comments by any user about article 1. This can also be edited by anyone else.

Artcile 2:
Comment 2:

.
.
.
.
.

Article n:
Comment n:

Could anyone please suggest something which can be implemented?

Thank you!!

Re: Annotations for articles in a Web Site? Pls advise

Posted: Sun Feb 01, 2009 2:30 am
by LonelyProgrammer
Create a table called comments, with the article's primary key as the FK.

Create another table called comment_status, with the comment's primary key as the FK. You may want a couple of fields, like the userid of the moderator, the status of the comment, and an optional field called 'reason' in case it is not approved, and a time-stamp for status change.

If you want to, you may want comment_status_history to keep track of status changes, and comments_change_history to store revisions.