WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Edit Comments

This release: August 30, 2005 Version: 0.3 Beta

FAQs

How does it work?

WordPress logs the IP address of all commenters, so we can compare the IP address of the comment to the IP address of the viewer. The plugin also checks the timestamp of the comment with the current time. If more than 30 minutes (default) has passed since the comment was made, then editing is off-limits. These two checks together make it secure.

It uses some clever use of plugin hooks. You may notice the

<

form> action never has to change, it stays wp-comments-post.php . This plugin uses the 'init' hook of WordPress to do its deeds before the wp-comments-post.php file fully loads and it adds a new comment. Instead, this plugin spots the existence of a hidden input element, makes the appropriate edits, and then runs away before the file is fully loaded.

Why is there a time limit on editing?

This plugin is useful when a user hits "Submit Comment" and then realizes he or she made a glaring spelling error, or forgot an important part of what they were going to say.

Also, by having a time limit, users aren't allowed to go back and change something they said days ago that they now regret. When there's a discussion, its best if people can't go back on their words, or else it can get really confusing.

Lastly, it's good for security. In the extremely unlikely case that someone else gets the same IP address as one of your commenters and then goes and visits your blog, they won't be able to edit the comment because of the time-limit.

How can I customize jal_edit_comment_link() ?

This function takes 4 arguments. It is very similar in structure to WP's edit_comment_link()

jal_edit_comment_link ( $text, $before, $after, $editing_message )

$text is the text that the link will show for. Default is 'edit'

$before is for adding code before the link. The default is none

$after is for adding code after the link. The default is none

$editing_message is for when users have clicked the edit link. This message will appear in the comment they are editing. Default is 'EDITING'

Example:

jal_edit_comment_link("(e)", "", "", "(editing)");

Will output: (e) .

I can't find any of the code you mentioned in my comments.php file

All themes are different, and some may have a COMPLETELY different structure. The basic idea of this plugin is to use the same interface as your theme uses to make comments. When you're editing a comment, the only thing that'll be updated is the content of the comment. So there should only be a box that'll allow content-editing. That means hiding the other inputs when an edit is happening. So you can try code like this:

...all the inputs for author, email, url, etc.... <textarea....>

If you're still lost, refer to the next FAQ.

I am totally lost on how to install this. Can you do it for me?

Yeah, I guess. Email me with your comments.php file attached, and I'll try to make the edits for you. No promises though. A small donation would go a long way in motivating me to do it for you :)

Contact Developer

I am always eager to help you with your problems involving this plugin. Chances are there's something wrong with my code and by telling me you are probably helping other users too.

Last Updated: 2005-9-1
Downloads: 8,511

Ratings

3 stars
3.9 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0
0,1,0
0,2,0
100,1,1
100,1,1