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


Login with username, password and session length

Search

 
Advanced search

8026 Posts in 1851 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)Different URLs based on a specific flag?
Pages: [1]   Go Down
Print
Author Topic: Different URLs based on a specific flag?  (Read 255 times)
0 Members and 1 Guest are viewing this topic.
TotalHosting
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: October 31, 2006, 08:29:00 PM »

Hi All.

I am helping out a local group that wants to be able to have an alternative link, based on flag in the event fields list.

If it's an event that requires registration, they want to go right to the sign up page, from any direct event link. Otherwise, the link would take them to the page in Calendar Script.

What I found in SSI_Max_Events was this line

code:
<%= $EVENT->{'details'}->{'title'} %>


Does anyone know where this is generated? I assume this deconstructs to the Event name and it's href.

What I would want do at the point where this event name link is created is check for NULL (you go to the page) or an entered value for "RegistrationURL" (a custom event field) and if a value is present, construct the HREF to be that value.

If anyone knows of a hack, mod or already posted method that  may help, I would be much obliged.

Thanks for reading.

Pete

Logged

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 221

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


WWW
« Reply #1 on: October 31, 2006, 09:33:00 PM »

** a local group that wants to be able to have an alternative link **

An alternate link where??

** If anyone knows of a hack, mod or already posted method that may help **

One possibility for the Event Details view is described in the previous forum message "Break apart event title and description" about separating the individual fields on that page. Of course, you'd need to construct the necessary conditional for your purpose and add the alternate text to be printed.

** <%= $EVENT->{'details'}->{'title'} %> Does anyone know where this is generated? **

The value which will replace that tag when the script is run is assigned in the getEvents subroutine of the calendar.pl file. A simplified method of displaying that same information is using the <%= EVENT FIELD(title) %> tag which is described in the Documentation: Customization: Defined Variables.

** I assume this deconstructs to the Event name and it's href. **

It returns the event title only, hence the {'title'} portion of it. I don't know that there is a single tag which constructs the whole thing in one shot

JFYI

Dan O. www.much2.com
Unofficial CalendarScript - Mods and Plugins site

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

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