URL Text To Hyperlink
here is what i have
$threadx = preg_replace("/((ht|f)tp://[^s&]+)/", "<a href="$1">$1[/url]", $threadx);
$threadx = preg_replace("/(S+@S+.w+)/", "<a href="mailto:$1">$1[/url]", $threadx);
can someone tell me how to make it better,
this one completly screws up existing hyperlinks and <img src=""> tags...
need to fix it somehow..
Hyperlink In Text Area
I have a basic CMS system and the client would like to insert some links in the text area. What would you recommend the best way to do this in a textarea box? There may be several hyperlinks in 1 textarea and some may have none at all.
I assume this would be some sort of javascript code or is there an easier way.
Conditional Email Text To Hyperlink
I am trying to write a content management section for a web site.
I have managed so far to use htmlarea to give users a basic, but user
friendly interface by which to edit the page content.
The user can add emails by symply typing john@example.com - IE automatically
converts this to a hyperlink. The trouble is sometimes the users use plain
text. I have been using the following line to convert plain text to a
hyperlink:
$pagetext=ereg_replace('[A-Za-z0-9_]([-._]?[A-Za-z0-9])*@[A-Za-z0-9]([-.]?[A-Za-z0-9])*.[A-Za-z]+',
'<a href="mailto: ?subject=Email%20from%20web%20site">