[pmwiki-users] www. to working links
adam overton
a at plus1plus1plus.org
Sun Jul 18 03:52:55 CDT 2010
ah, thanks, that's exactly what i was looking for.
thx
On 18 Jul 2010, at 12:38 AM, ABClf wrote:
> 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
> ---------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100718/0e726c7a/attachment.html>
More information about the pmwiki-users
mailing list