Sorry DOT-COM, I've only just noticed your post...
D0T-C0M wrote on Mar 9
th, 2010 at 12:21pm:
Derek Barnstorm wrote on Mar 6
th, 2010 at 5:59pm:
Just tested this and when 'Auto-link URLs?' is disabled the link doesn't wrap anyway - this is how it's handled when making normal posts.
This is the problem I am having. I have this setting turn to disabled. So you are saying even with this new linebreak code it still won't wrap in this case?
Yes, that seems to be the case. There was already a line wrap/break for URLs built into the ShoutBox, but it didn't work because the variable was named wrong. That worked by splitting the URL with spaces like this:
http://thisisa ridiculouslylo ngurlthatshoul druinthelayout oftheshoutbox.com
And that did work when 'Auto-link URLs?' was disabled, but I think the way that ThM is doing it now looks and works much better apart from that one problem.
There has got to be a simple fix for it, but I'm not too sure of the best way right now...
Edited: If you do want to see how the old line wrap worked...
Find this in ShoutDisplay.pl:
sub my_wrap3 {
$shout_message =~ s~(<.*>)*(\S{0,14})(\S{0,14})?(\S{0,14})?(\S{0,14})?(\S*)?(<.*>)*~$1$2 $3 $4 $5 $6$7~gi;
$shout_message =~ s~(<.*>)?(\S{0,14})(\S{0,14})?(\S{0,14})?(\S{0,14})?(\S*)(<\/\S*>)~$1$2 $3 $4 $5 $6$7~gi;
$shout_message =~ s~\s+~ ~gi;
}
And replace with this:
sub my_wrap3 {
$message =~ s~(<.*>)*(\S{0,14})(\S{0,14})?(\S{0,14})?(\S{0,14})?(\S*)?(<.*>)*~$1$2 $3 $4 $5 $6$7~gi;
$message =~ s~(<.*>)?(\S{0,14})(\S{0,14})?(\S{0,14})?(\S{0,14})?(\S*)(<\/\S*>)~$1$2 $3 $4 $5 $6$7~gi;
$message =~ s~\s+~ ~gi;
}
Just in case you're interested.