Can someone explain the logic for flagging posts and comments on my website? I have a comment table in mysql. And it is set to default at 0 for the flag. When a user flags a post, they will be changing the value to 1. So, then what happens? Would it be just ready for a moderator to sort through the database and delete any posts that have been flagged? Or is something else part of of how this works?
Share
Can a comment be flagged once? If you would like to allow multiple users flagging one comment, you might want to have a CommentFlags table which maps
user_idandcomment_id, this is also useful if you want to extend the functionality of flagging to include users giving reasons for the flags.Then for the moderation part of the application, in the admin panel, you’d pull all the flagged comments like so:
From then you can also join with Comments table if you are showing the comment content as well.
Those are things to help get you started, but I’d suggest you ask your clients / yourself for the exact requirements and go from there.