Log in

View Full Version : ignore new lines in signatures


jamie
03-25-2001, 06:34 PM
Hi,

Does anybody know of a simple hack that would just ignore new lines in signatures,

ie if they put

I

R
E
A
L
L

L
O
V
E


it would just ignore all the new lines and show the signature as something like

I REALLY LOVE


Also (I am now pushing it!) if this is possible would a more advanced version be able, ie so that they could only have 4 new lines ( <br> ) and after this all new lines are ignored,


thanks :)

03-25-2001, 06:44 PM
Not sure if this would work but

in the signup form, change the Signature input bit into a 1 line text box

And you will need to change any way of editing the signature to 1 line textboxes too

03-25-2001, 06:58 PM
You could do something like this:

$signature = str_replace("\n", " ", $signature);

Put that wherever the signature is submitted (ie in registration and change profile). Post back if you aren't sure where to put it.