Ok. .I've made a static board.. blame me.. but I can't just made it 100% wide now (Too lazy to do so..).. so I need help.
At some pages (mostly on online.php) I get very, VERY long urls that really mess up my forum. I need to make it so thatif it's more than x characters long, it'll be cutted and added a ... on it.. so it changes this:
Code:
<a href="http://domain.com/forum/longurl/verylongurl/messinglayout.htm">http://domain.com/forum/longurl/verylongurl/messinglayout.htm</a>
to this:
Code:
<a href="http://domain.com/forum/longurl/verylongurl/messinglayout.htm">http://domain.com/forum/...out.htm</a>
I've found this piece of code:
Code:
$maxchars=20;
if (strlen($thread['title']) > $maxchars) {
$thread['title'] = substr($thread['title'], 0, $maxchars - 2) . '...';
}
but I'm not sure on how to apply it to ANY url written. I'm sure the code should be at global.php but I have no idea on how to set the variables.