I'm not using Threads but I plan to do so in the future.
The following code will cut anything above 50 characters in width, kinda like vBulletin's behavior. It will cut the 'showen' URL of course not the actual one which resides in the '<a href="..">' .
Note it might not be quite accurate, but I've tested it with very large strings ( range(1,1000000) ) and it worked.
So somebody put this in UBBThreads.
code:
// The URL to be showen actually
$ShowenURL = $URL;
// How many characters to remove?
$TotalDel = strlen($ShowenURL) - 50;
// Cut down by half for substr
$PullChars = (int) ($TotalDel / 2);
if ( strlen($ShowenURL) >= 50 ) {
// We will do operation from the middle of the string
$Mid = (int) (strlen($ShowenURL) / 2);
// Do it!
$ShowenURL = substr_replace($ShowenURL, '..', $Mid, $PullChars-1);
$ShowenURL = substr_replace($ShowenURL, '..', $Mid-$PullChars+1, $PullChars-1);
}