PDA

View Full Version : how can I encode a email bbcode


12-16-2000, 11:49 PM
I encode this way

[ eamil]______<a href=mailto:"

[ /email]_____>email</a>

you know every email link show as "email"

I want to show their eaddress how can I do?

12-17-2000, 05:56 PM
this was in a thread up a bit from this one, shows how to use string replacing, etc. you'll have to hack that into the code, as aposed to just adding a new bbcode.



// do xxx
$text=eregi_replace("\\[url\\]www.([^\\[]*)\\[/url\\]","<a href=\"http://www.\\1\" target=_blank>(hyperlink)</a>",$text);
$text=eregi_replace("\\[url\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=_blank>(hyperlink)</a>",$text);