|
From: Jared <xe...@si...> - 2002-10-23 01:06:24
|
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a
href=\"\\0\">\\0</a>", $text);
He said he used the sample from the ereg_replace() man page. :)
Basically, it's the same thing forum software does to make the URLs in
posts clickable.
-Jared
On Tuesday, October 22, 2002, at 06:05 PM, Chad wrote:
> That is cool, how'd you do that? It's one of the feature requests I
> believe.
>
> -C
>
>
> On Tuesday, October 22, 2002, at 03:28 PM, Bill Fenner wrote:
>
>>
>> I modified event.php to use the sample regexp in the php
>> ereg_replace()
>> man page to make URLs clickable. I just used '<a target="_new" ...'
>> to
>> open a new window, but at least with Mozilla 1.0 that creates a
>> somewhat
>> randomly sized new window; perhaps the better web designers among us
>> can
>> tell me how to do that right =)
>>
>> Here's a sample event - go to
>>
>> http://rtg.ietf.org/~fenner/test/phpicalendar/
>> day.php?cal=billpub&getdate=20021018
>>
>> and get the details of the 3:15 "Stanford Alumni Film Festival" event.
>>
>> What do people think about this change?
>>
>> Bill
>>
>>
>> -------------------------------------------------------
>> This sf.net emial is sponsored by: Influence the future
>> of Java(TM) technology. Join the Java Community
>> Process(SM) (JCP(SM)) program now.
>> http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/
>> javavote
>> _______________________________________________
>> Phpicalendar-devel mailing list
>> Php...@li...
>> https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel
>
>
>
> -------------------------------------------------------
> This sf.net emial is sponsored by: Influence the futureof Java(TM)
> technology. Join the Java CommunityProcess(SM) (JCP(SM)) program
> now.http://ad.doubleclick.net/clk;4699841;7576301;v?http://
> www.sun.com/javavote
> _______________________________________________
> Phpicalendar-devel mailing list
> Php...@li...
> https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel
|