Please see my post at http://drupal.org/node/765732. I've reattached the necessary components on here. Applying the maxlength patch will add a hook that can be used by other modules to provide form ids and relevant fields that need a max length applied to them. And enabling the privatemsg_maxlength integration module will add the maxlength settings to the privatemsg admin settings as well as use the hook to add the limitation to the message body.
| Comment | File | Size | Author |
|---|---|---|---|
| hook-form-fields.patch | 6.78 KB | nymo | |
| privatemsg_maxlength.tgz | 1.21 KB | nymo |
Comments
Comment #2
nymo commentedSorry, that patch should not have been part of this post...
Comment #3
berdirI think this is the wrong approach to fix the problem. We do not want a string length limitation at all. If you want to limit something, then you want to limit the number of allowed recipients, which you can do with the privatemsg_limits module.
And if you do want to change it, you can do it with a single line of code in hook_form_alter().
I suggest to close this issue as won't fix and continue the discussion in the other issue that you commented on already. We need to find a way to avoid the maxlength attribute completely, I think or at least set it to a very high value.
Comment #4
nymo commentedFAPI doesn't support #maxlength for textareas, and we needed a way to limit messages length. The Maxlength module seemed ideal (with a few tweaks) as also it allowed restricting node bodies and CCK text fields, as well as providing a javascript count down.
The privatemsg_limits module is definitely one way to go. I can see the benefits of limiting an ab-user from sending too many messages, and that they outweigh restricting their messages lengths...still, if one could send just one message per hour but copy/paste a whole book...
I guess an improvement is a friend system in which a user allows unrestricted messages from friends and limited messages from wannabes. Call it Palbook.
Comment #5
berdirAh sorry, I assumed this was about limiting the To: recipients field.
I assume the maxlength module displays some fancy stuff like how many chars you're still allowed to type etc.?
Setting this to postponed, there is nothing to do until that other module adds your patch or adds direct integration with Privatemsg itself. Please set it back to needs review once that is ready.
Comment #6
nymo commentedWill do, thanks.
The maxlength javascript does output a text countdown, but nothing out of the ordinary. What's nice about it is the ability, from admin settings, to disable the countdown and let the backend validate the field, and/or change the countdown message.
Comment #7
oadaeh commentedThis issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-1.x branch (bug fixes only) or the 7.x-2.x branch.
Thank you.