Hello all, I'm working on a custom made forum for a project. It's going pretty well but I've come across a problem and I need to find a solution to it.
Well, to enlighten you on what I'm doing I've got a little image uploader attached to my comment box, the image uploader uses the imageshack tool. I've also got a function which turns text into links (when appropriate of course).
When the webpage displays a imageshack.us link it'll fail to display the image as my link converter below blocks a bit of the image link. I'd like to make it so if the text contains the address imageshack.us it doesn't try to convert the link and it'll display the image as per normal.
$comment = nl2br($info['tContent']);
$comment = preg_replace("/((ftp)|(http(s?))\:\/\/(([A-z0-9\-\:\;\.\@\/]+)))/is",'<a href="\\0">\\0</a>',$comment);
Thank you, hopefully I've explained my problem well enough and somebody will have a suggestion on how I can prevent these links from getting converted.
Have a good one.