Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Signature length
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

John
Junior Member

USA
427 Posts

Posted - 04 October 2000 :  21:21:15  Show Profile
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  Show Profile
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>
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 05 October 2000 :  13:32:40  Show Profile  Visit gor's Homepage
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>
Go to Top of Page

John
Junior Member

USA
427 Posts

Posted - 05 October 2000 :  15:38:43  Show Profile
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>
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 05 October 2000 :  15:49:15  Show Profile  Visit gor's Homepage
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>
Go to Top of Page

John
Junior Member

USA
427 Posts

Posted - 05 October 2000 :  15:59:26  Show Profile
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>
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 05 October 2000 :  16:27:42  Show Profile  Visit gor's Homepage
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>
Go to Top of Page

John
Junior Member

USA
427 Posts

Posted - 05 October 2000 :  21:32:50  Show Profile
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>
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 05 October 2000 :  22:12:02  Show Profile
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
======
Go to Top of Page

John
Junior Member

USA
427 Posts

Posted - 05 October 2000 :  22:47:30  Show Profile
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>
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07