Author |
Topic  |
|
John
Junior Member
 
USA
427 Posts |
Posted - 04 October 2000 : 21:21:15
|
It would be nice if the length of the signature didn't include the markup (like [ b], [ blue], etc). This could be removed using regexes (<b>reg</b>ular <b>ex</b>pressions), and then the returned string could be counted using len()... anyone here good with regexes?
<font size=1>[an error has occurred while processing this directive]</font id=size1> |
|
John
Junior Member
 
USA
427 Posts |
Posted - 05 October 2000 : 12:35:10
|
Here's the code:
Set RegEx = New RegExp RegEx.Global = True RegEx.MultiLine = True RegEx.Pattern = "\[(.*)\]" sSignatureLen = RegEx.Replace(Request.Form("signature"), "")
<font size=1>[an error has occurred while processing this directive]</font id=size1> |
 |
|
gor
Retired Admin
    
Netherlands
5511 Posts |
Posted - 05 October 2000 : 13:32:40
|
Ehm sorry John, but I don't get why you want this <img src=icon_smile_question.gif border=0 align=middle> (maybe because I'm not good with regexes).
<b>Pierre Gorissen</b>
<font color=blue><font size=1>A man who is 'of sound mind' is one who keeps the inner madman under lock and key. </font id=blue></font id=size1><font size=1><font color=black>Paul Valery</font id=size1></font id=black> |
 |
|
John
Junior Member
 
USA
427 Posts |
Posted - 05 October 2000 : 15:38:43
|
because I tried to make a signature that was around 45 characters but with the markup it was like 285 characters!!! This way it'll only count actual CHARACTERS, not the forum code...
<font size=1>[an error has occurred while processing this directive]</font id=size1> |
 |
|
gor
Retired Admin
    
Netherlands
5511 Posts |
Posted - 05 October 2000 : 15:49:15
|
hmm ... I see ... but the check is there to see if it fits in the database field (255 characters) ... and the <i>converted</i> markup needs to go in there also ... so both your option and the way it is now don't provide a 100% garantee that it fits...
Or am I talking nonsense now ?
<b>Pierre Gorissen</b>
<font color=blue><font size=1>A man who is 'of sound mind' is one who keeps the inner madman under lock and key. </font id=blue></font id=size1><font size=1><font color=black>Paul Valery</font id=size1></font id=black> |
 |
|
John
Junior Member
 
USA
427 Posts |
Posted - 05 October 2000 : 15:59:26
|
well take off the limit in the database field... but is there one?
because I had a signature here, removed like 20 characters, and it said it was too long! but it, however, I couldn't edit my profile...
<font size=1>[an error has occurred while processing this directive]</font id=size1> |
 |
|
gor
Retired Admin
    
Netherlands
5511 Posts |
Posted - 05 October 2000 : 16:27:42
|
All strings stored in a database have a limit. The maximum you can store in a string typed field is 255 characters. In Access you would otherwise have to use MEMO-fields, or TEXT fields when using SQL Server.
<b>Pierre Gorissen</b>
<font color=blue><font size=1>A man who is 'of sound mind' is one who keeps the inner madman under lock and key. </font id=blue></font id=size1><font size=1><font color=black>Paul Valery</font id=size1></font id=black> |
 |
|
John
Junior Member
 
USA
427 Posts |
Posted - 05 October 2000 : 21:32:50
|
there obviously isn't a limit set here (forum.snitz.com), b/c I had a signature ~ 320 characters... or else it's a high one...
<font size=1>[an error has occurred while processing this directive]</font id=size1> |
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 05 October 2000 : 22:12:02
|
IIRC, there was a thread in the old posts, begun by Sue I believe, which caused a length limit to be put on signatures. Before that change signatures could be very long, so I would think the change could be undone if desired.
====== Doug G ====== |
 |
|
John
Junior Member
 
USA
427 Posts |
Posted - 05 October 2000 : 22:47:30
|
Well, <b>limiting the length</b> is good (I've seen people who put chapters of books in their signatures!!!), but I don't think <b>the markup</b> should could toward that limit. Using my code above, it removes all markup so that the actual text can be counted.
<font size=1>[an error has occurred while processing this directive]</font id=size1> |
 |
|
|
Topic  |
|