Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Would it be possible Signature for Forums module would get a feature to set maximum number of characters per line?
Comment | File | Size | Author |
---|---|---|---|
#5 | character_limit-373699.patch | 2.83 KB | Matt V. |
Comments
Comment #1
Liam McDermott CreditAttribution: Liam McDermott commentedAre your users trying to get around the number of lines limit by posting really long lines?
I'm wondering if a maximum number of characters per signature might be a better solution, or would that not cover what you're trying to do?
Comment #2
Liam McDermott CreditAttribution: Liam McDermott commentedComment #3
Ledo2 CreditAttribution: Ledo2 commentedYes this is the idea behind this feature request.
I have this enabled:
-custom signature filter just with "Line break converter" and "URL filter".
-The maximum number of lines allowed in a signature. I set this to 3.
But there really isn't nothing users not to copy/paste one as long as he/she want text in one line.
So yes:
This would be a solution that would get the job done. I could calculate aproximating number of charachters to fill 3 lines in my fix width forum. Or if i would have fluid width forum i could still calculate aproximating number of charachters so there would be some "reasonable" limit for users not to do "bad" or should i say "inconvenient" things.
I noticed something else abaut "Line break converter" and i opened feature request here to discuss the ideas.
http://drupal.org/node/379240
Comment #4
Liam McDermott CreditAttribution: Liam McDermott commentedThanks for clarifying. :)
This is a worthy feature request. I'll implement it when I have a moment (unless someone wants to supply a patch, of course!).
Comment #5
Matt V. CreditAttribution: Matt V. commentedHere's a patch I wrote that adds and enforces a "Characters per line" settings.
Comment #6
Matt V. CreditAttribution: Matt V. commentedIn hindsight, the "characters per line" setting is problematic, if you also want to allow images or other URLs to be added to signatures, since a long URL will eat away at the limit rather quickly. I'll try to work on a patch soon that uses "maximum number of characters per signature" instead.
Comment #7
Liam McDermott CreditAttribution: Liam McDermott commentedGood point, thanks for the patch though and sorry I haven't had time to review it yet.
I agree that a very simplistic approach to characters per-line is problematic, but it may work if we remove all the HTML in a signature before checking the line length.
How does that sound?
Comment #8
Liam McDermott CreditAttribution: Liam McDermott commented