Would it be possible Signature for Forums module would get a feature to set maximum number of characters per line?

CommentFileSizeAuthor
#5 character_limit-373699.patch2.83 KBMatt V.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam McDermott’s picture

Are 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?

Liam McDermott’s picture

Status: Active » Postponed (maintainer needs more info)
Ledo2’s picture

Are your users trying to get around the number of lines limit by posting really long lines?

Yes 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:

I'm wondering if a maximum number of characters per signature might be a better solution,

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

Liam McDermott’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks 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!).

Matt V.’s picture

Status: Active » Needs review
FileSize
2.83 KB

Here's a patch I wrote that adds and enforces a "Characters per line" settings.

Matt V.’s picture

In 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.

Liam McDermott’s picture

Good 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?

Liam McDermott’s picture

Status: Needs review » Needs work