| @@ 471-482 (lines=12) @@ | ||
| 468 | } |
|
| 469 | ||
| 470 | $temp = ''; |
|
| 471 | while (mb_strlen($line) > $charlim) |
|
| 472 | { |
|
| 473 | // If the over-length word is a URL we won't wrap it |
|
| 474 | if (preg_match('!\[url.+\]|://|www\.!', $line)) |
|
| 475 | { |
|
| 476 | break; |
|
| 477 | } |
|
| 478 | ||
| 479 | // Trim the word down |
|
| 480 | $temp .= mb_substr($line, 0, $charlim - 1); |
|
| 481 | $line = mb_substr($line, $charlim - 1); |
|
| 482 | } |
|
| 483 | ||
| 484 | // If $temp contains data it means we had to split up an over-length |
|
| 485 | // word into smaller chunks so we'll add it back to our current line |
|
| @@ 1220-1232 (lines=13) @@ | ||
| 1217 | } |
|
| 1218 | ||
| 1219 | $temp = ''; |
|
| 1220 | do |
|
| 1221 | { |
|
| 1222 | // If the over-length word is a URL we won't wrap it |
|
| 1223 | if (preg_match('!\[url.+\]|://|www\.!', $line)) |
|
| 1224 | { |
|
| 1225 | break; |
|
| 1226 | } |
|
| 1227 | ||
| 1228 | // Trim the word down |
|
| 1229 | $temp .= mb_substr($line, 0, $charlim - 1); |
|
| 1230 | $line = mb_substr($line, $charlim - 1); |
|
| 1231 | } |
|
| 1232 | while (mb_strlen($line) > $charlim); |
|
| 1233 | ||
| 1234 | // If $temp contains data it means we had to split up an over-length |
|
| 1235 | // word into smaller chunks so we'll add it back to our current line |
|