Page 1 of 2
ShoutBox problem!
Posted: Sun Feb 01, 2004 7:29 pm
by William
Hello,
I am having this problem where if you type in AAAAAAAAAAAAAAAAAAAAAAAAAAAA or somthing it overrides the table and makes it wider. Im designing a ShoutBox
http://www.thenetherrealm.com/shoutbox.php And I need it so when somone sites there and typs in AAAAAAAAAAAAAAAAAAAAAA it wont make that scroll bar go left or right it auotmaticly does a line break, And ideas? There is probley a way where it coutns the chaectors and foreach() fuction ot add <br /> .ect But is there a fuction?
Posted: Sun Feb 01, 2004 8:22 pm
by Sevengraff
Posted: Sun Feb 01, 2004 8:27 pm
by William
Thank's,

Posted: Sun Feb 01, 2004 8:56 pm
by William
It's not working
Code: Select all
// Automaticly break long lines.
$shout_data1 = wordwrap($shout_data1, 5, "<br />");
$shout_data2 = wordwrap($shout_data2, 5, "<br />");
$shout_data1 is there name
$shout_data2 is there message.
It's not changig my WWWWWWWWWWWWWWWW to WWWW
WWWW
WWWW
Or how ever it is saposed to do it

Posted: Sun Feb 01, 2004 9:25 pm
by Illusionist
Code: Select all
// Automaticly break long lines.
$shout_data1 = wordwrap($shout_data1, 5, "<br />",1);
$shout_data2 = wordwrap($shout_data2, 5, "<br />",1);
try that
Posted: Sun Feb 01, 2004 9:28 pm
by William
Let me try and what's the 1 for?
Posted: Sun Feb 01, 2004 9:29 pm
by William
IT WORKS! Thank's so much

Posted: Sun Feb 01, 2004 9:33 pm
by William
Doesn't work really good... because it cuts them off to shourt... And if I make it really big it let's people put WWWWWWWWWWWWWWWWWWWWWW in why can't it just stop them why does it have to grow grrr
Posted: Sun Feb 01, 2004 9:34 pm
by Illusionist
the 1 tells it even if its one long wooooooooord with no spaces to break it up too!
Posted: Sun Feb 01, 2004 9:35 pm
by Illusionist
if it cuts them off too short them change that 5 to something larger, like a 10 or something!
Posted: Sun Feb 01, 2004 9:36 pm
by William
O ok, Any ideas so I can make it be able to put Hi how are you and let it all fit that instead of How
Are
You
and if I make it bigger then WWWWWWWWWWWWW messes it up grr
Posted: Sun Feb 01, 2004 9:39 pm
by Illusionist
Code: Select all
$shout_data1 = wordwrap($shout_data1, 5, "<br />",1);
instead of that 5, change it to like 15,
Code: Select all
$shout_data1 = wordwrap($shout_data1, 15, "<br />",1);
Posted: Sun Feb 01, 2004 9:40 pm
by Illusionist
What do you mean by messes up?
Posted: Sun Feb 01, 2004 9:48 pm
by William
Well right now you tpye in a sentance t only allows 2 words.. But if you type in WWWWWWWWWWWWWWWWWW it doubles the hole box then breaks... Al I want it to do is be like it was type osmthing it ti auotmaticlty breaks liek it's sapsoed to but... When you type in WWWWWWW or somthing it keeps oging thats what I want to break when they sit there and hold down somthing or they jsut dont use any spaces Understand?
Posted: Sun Feb 01, 2004 9:50 pm
by Illusionist
are you sure your using the wordwrap() function?? because its working on my computer....