The wordpress plugin to modify is
AJAX EDIT COMMENTS 2.3.2.1.
[login to view URL]
I'm running wp 271.
In my comment form I have a 2.000 characters limiter, working when a user INSERT a comment.
This doesn't work when a user EDIT his comment with WP Ajax Edit Comments. I need a characters limiter working when a user EDIT his comment.
You can use my code or some other one that best fit with the plugin.
This is how I installed my 2.000 characters limiter in comment form:
=============================================================
IN theme/[login to view URL]
before
</head>
add:
<script language="JavaScript" type="text/javascript">
<!-- Begin
function textCounter(field, countfield, maxlimit) {
if ([login to view URL] > maxlimit) // if too long...trim it!
[login to view URL] = [login to view URL](0, maxlimit);
// otherwise, update 'characters left' counter
else
[login to view URL] = maxlimit - [login to view URL];
}
// End -->
</script>
=============================================================
in theme/[login to view URL]
change
<textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea>
with this:
<p><textarea name="comment" id="comment" cols="70%" rows="10" tabindex="4" onkeydown="textCounter([login to view URL],[login to view URL],2000);" onkeyup="textCounter([login to view URL],[login to view URL],2000);" onmousemove="textCounter([login to view URL],[login to view URL],2000);" onmouseout="textCounter([login to view URL],[login to view URL],2000);"></textarea></p>
<p><input type="text" name="remLen" size="3" maxlength="4" value="2000" />characters left</p>
=============================================================
Regards,
JuliusB