PDA

View Full Version : Trouble with comment section



Matuyle
10-26-2011, 08:04 PM
Hello everybody,

Im new in here and maybe its wrong section to post this thread but,

On my webpage, people can add comments and its working, but id like to have it that way, that i could modify or delete the comment before it goes live?

I havent done it before, maybe someone could give me some tips :)

cheers

djr33
10-26-2011, 08:42 PM
That's possible, but the method would depend on how your system is configured. For example, if you are using a database, this is very easy: store comments as "approved=0" (one of the columns). Then display comments where "approved=0" on an admin page and add a link to each that will change the value to "approved=1" in the database. Then on your main comments page, display only the comments with "approved=1".

The same logic can be applied to other methods. For example, if you're using files then you can store the unapproved comments in one folder and the approved comments in another; when you want to approve a new comment, just move that file to the new folder (you can make a PHP script that will do that).

Also, if all you're worried about is spam, then you can try to fix this by adding a CAPTCHA (a bot-stopping device), so that you get less spam. It won't stop all spam (especially not from humans) but it will make your site more difficult to spam, so the spammers will probably go away and spam other sites. Even a simple CAPTCHA will accomplish this most of the time.

Matuyle
10-27-2011, 07:19 AM
Thnx for the tip, ill try to get it working.