Dan's Orbiter page
Orbiter English => Orbiter English => Topic started by: DanSteph on 18 March 2003, 20:30:59
-
As a lot of people forget the [] url tag I try to add an automatic
converter so you can click on them even without adding the tag...
It seem to work well but there is still some small error , mainly with
the url correctly "tagged" (there is an "[url.]" text at the end
Sorry for that I'm working on it.
Dan
-
example:
no tag, just link: www.dansteph.com work well
with tag still error http://www.dansteph.com
-
BINGO !
no need anymore for url tag, (but you can use them if you want)
You welcome :)
Dan
-
CRAP !
It broke the (img) tag I'll fix it tomorrow.
Dan
-
Very Cool.
Since no-one's replied about this besides yerself...
THANKS VERY MUCH, Dan! :)
-
Hehe fine!
-
is anyone good in php ? I'm brain fried and tired today...
I want to parse the url but not the one that have a tag before [//url] (url, img etc etc)
I don't know how to include a not "]" before http or www.
This routine work well but it translate also the url that have "img" tag before:
$body = preg_replace("/((http(s?):\/\/)|(www\.))([a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%]+)\b/i","href=\"http$3://$4$5\"target=\"_blank\">$2$4$5",$body);
Thanks for any help
Dan
-
DONE:
The solution was:
$body = preg_replace( '{(?:(?[.\s<>!:;,?])|(?!:;,?]))}
ie', "'$7' != ''? \"$7\" : \"target='_blank'>$1$2$3$4$5\"", $body);
Now link are automatically converted in URL and image tag work also.
no need for ["url"] tag anymore
Dan