[pmwiki-users] www. to working links

ABClf languefrancaise at gmail.com
Sun Jul 18 02:38:51 CDT 2010


Hi Adam,

Do you know this cookbook (same purpose) ?
http://www.pmwiki.org/wiki/Cookbook/LazyWebLinks

Gilles.

2010/7/18 adam overton <a at plus1plus1plus.org>:
> hi there
> i want to have user-contributed links in the form www.mylink.com be
> automatically converted into working links.
> i'm wondering if this is the most efficient way to handle this:
>
> Markup('www', 'inline',
> '/([\s\n]+)\b(www\.[^\s]*)\b/ei',
> 'WWWLink_func("$1","$2")'
> );
> function WWWLink_func($spaceBefore, $wwwLink) {
>        return $spaceBefore."[[(http://)$wwwLink]]";
> }
>
> thanks,
> adam
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>



-- 
---------------------------------------
| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com
---------------------------------------



More information about the pmwiki-users mailing list