Quote: "BTW, this is done in PHP right? well then its like C...
um....why dont you use a function to check wether the 'http://' is in the address. problem solved? no, serioulsy, is this possible? by the way, the forums are great now "
Yeah, the forums should have automatic detection of URLs and convert them to links, using regular expressions. something like this, PHP code:
function sortoutHTML ($temptext){
$temptext=htmlentities($temptext);
$temptext=str_replace( "<", "<",$temptext);
$temptext=str_replace( ">", ">",$temptext);
$temptext=eregi_replace( "(.*)(http://[a-z0-9-\.\/\$\%\&\+\=\_\(\)\@\~\#\-]+)(.*)", "\\1<a target=_blank href=\\2>\\2</a>\\3",$temptext);
return $temptext;
}
What the flame does not consume, consumes the flame.
------------------------------------------------------------------------
AMD XP2100+, Geforce4Ti 4400, 512Mb DDR, Abit KX7, WinXP Home