Hi,
I've noticed that displayimage.php makes any www.somewebaddress.com clickable. That's great. However, if the web address is simply somewebaddress.com or something.somewebaddress.com, it comes out as straight text.
How can I make either form clickable?
Thank you!
Marianne
But what if there is text like I went to school.Commie went away
It will be made url too. I don't really understand why you want this.
Just add http:// to link, I think it will become link too
Thanks Johanz. In our case, other folks don't submit, so that is less of a risk. But I do understand your point. :)
Edit include/functions.inc.php, find
$ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" rel=\"external\">www.\\2.\\3\\4</a>", $ret);
change to
$ret = preg_replace("#([\n ])(www\.)?([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1<a href=\"http://\\2\\3.\\4\\5\" rel=\"external\">\\2\\3.\\4\\5</a>", $ret);
Thank you, Nibbler! That works great for us!
@MarianneC: resolve your threads by clicking on the OK-tick in your initial posting on a thread. I did this for you. Do it yourself in the future.
Thanks Joachim - eventually I will get the hang of all this.