Jump to content

Recommended Posts

I have build a module which allows Users to add Comments to Articles on my website.  (Similar to how a lot of online news papers do.)

 

Based on the advice of others, I have also created a way for people to "Report" a Comment that they feel is inappropriate.

 

As such, it probably makes sense to allow the Original Poster go back and modify his/her Original Comment since other people will be watching things.

 

Can you guys give me a sense of how I should approach allowing Edits to User Comments??

 

I'm not really sure where to begin, and what kinds of things I need to consider and do...  :shrug:

 

Thanks,

 

 

Debbie

 

 

Link to comment
https://forums.phpfreaks.com/topic/264681-allowing-edits-on-user-comments/
Share on other sites

http://www.bestwebimage.com/archives/allow-users-to-edit-comments-with-wp-plugin/

 

 

this is a WP plugin that allows a user to edit there comments for a certain amount of time and a certain amount of permissions (what all they can do edit,blacklist etc).this should give you an idea what to do.

http://www.bestwebimage.com/archives/allow-users-to-edit-comments-with-wp-plugin/

 

 

this is a WP plugin that allows a user to edit there comments for a certain amount of time and a certain amount of permissions (what all they can do edit,blacklist etc).this should give you an idea what to do.

 

Thanks but...

 

1.) I don't use WordPress

 

2.) I don't use AJAX

 

3.) I would prefer discussing things here

 

Thanks,

 

 

Debbie

 

Thanks but...

 

The intent of that link was that you could see what they did and use it as a way to get the ideas for how to setup your own edit functionality.  It doesn't matter if you use wordpress or ajax or not.

 

That said, editing is not that much different than adding.  Just pre-fill the textarea with the current comment text when they load the edit page, and on submit run an UPDATE query on the selected comment rather than an INSERT query.

 

 

Thanks but...

 

The intent of that link was that you could see what they did and use it as a way to get the ideas for how to setup your own edit functionality.  It doesn't matter if you use wordpress or ajax or not.

 

That said, editing is not that much different than adding.  Just pre-fill the textarea with the current comment text when they load the edit page, and on submit run an UPDATE query on the selected comment rather than an INSERT query.

 

My best guess would be...

 

- Check how much time has transpired between Now and Orig Post Date

- If difference is less than ____, then...

- Load Original Comment

- Sanitize Data

- Update Record

 

Since these are just linear Comments to an Article (i.e. no concept of linked Comments), I guess it should be much easier than in something like a Forum, right?

 

Thanks,

 

 

Debbie

 

 

- Check how much time has transpired between Now and Orig Post Date

- If difference is less than ____, then...

 

You only need those steps if you want to limit editing time, such as the forms here do.  If you'd rather let anyone edit at any time you can skip that part.

 

 

Since these are just linear Comments to an Article (i.e. no concept of linked Comments), I guess it should be much easier than in something like a Forum, right?

Even if they were threaded comments with linked replies and such, the editing process is still the same.  When the user edits, all your doing is updating the text of the comment, not any of the details for how it links with other comments so there is no need to worry about those parts.  That is something you'd only deal with when adding a comment.

 

 

- Check how much time has transpired between Now and Orig Post Date

- If difference is less than ____, then...

 

You only need those steps if you want to limit editing time, such as the forms here do.  If you'd rather let anyone edit at any time you can skip that part.

 

Don't you think I should have a time limit?

 

The benefits to me would be...

 

1.) Prevent others from commenting on content that is no longer there

 

2.) Make it more difficult for someone to make a controversial, insulting, or otherwise unnecessary comment, and then going back and erasing it.  (Even with community regulated comments, that could still be an issue.)

 

3.) Discourage SPAM

 

 

Debbie

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.