Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityEverything ElseGeneral Use (Moderators: scott, DanO, Marty)https link in "Event Detail" does not work
Pages: [1]   Go Down
Print
Author Topic: https link in "Event Detail" does not work  (Read 314 times)
0 Members and 1 Guest are viewing this topic.
bodie
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: June 29, 2004, 06:28:00 PM »

I have created an event field called "More Info" to show up in the Event Detail window.  The input type is a selectbox, and there are two options available for inlclusion in a given event.  The option value for each is simply a URL.  The first option points to an http address, and when it appears in the Event Detail, it becomes an active link and works fine.  The second option is an https link, and it is not active (the user would have to copy/past the URL to get to the site).

I have tested a number of URLs, and always the https does not become an active link.  Perhaps the script does not recognize it as a valid URL?

Any thoughts on why this might work for one but not for the other?

thanks!
~chris p.

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: June 30, 2004, 01:15:00 AM »

** Perhaps the script does not recognize it as a valid URL? **

Right.

** Any thoughts on why this might work for one but not for the other? **

Because the script doesn't look for such code to make them links. If you look in the HTML.pm file in the calendarscript/lib directory in the sub autoLink { function and change the following line:

$text =~ s#(^|\s)(http://\S*)#$1<A HREF="$2" $target>$2</A>#gs;

and change it to;

$text =~ s#(^|\s)(https?://\S*)#$1<A HREF="$2" $target>$2</A>#gs;

It should then link https://... URLs too.

Dan O.

[This message has been edited by DanO (edited June 30, 2004).]

Logged
bodie
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: June 30, 2004, 11:44:00 AM »

Thanks!  Works perfectly.

On a similar note, because I am using a URL for my event field option, I would prefer to have the link displayed as something other than the actual URL (some of them are quite long).  Currently, whatever is entered as the "option value" is what is displayed in the event detail.

I could use a textbox for my entry, and type the html in to create the link, but I am trying to have preset options for others to choose from.

~chris p.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: June 30, 2004, 10:28:00 PM »

** I would prefer to have the link displayed as something other than the actual URL **

Change the second $2 in that line to any text you want used as the link text for URLs.

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: