Thanks for the fix!
"Brendan Sisson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Mike Clark wrote: > > > I just installed a fresh copy of FarCry on a test server (Win2003 Server/SQL > > Server/Farcry 2.1) and made no modifications to the webskins and came up > > with the same error: > > > > The exception points to line 100 of > > webskin\dmEvent\displayTeaserCalendar.frm: > > <cfloop collection="#request.aInvocations[1].stEvents#" item="eventItem"> > > > Ok doesn't look like anyone has ever used the intro text option or > another rule that populates the request.aInvocations array on the same > page because this webskin expects the event info to be in the first > position of the aInvocations array! Not good. > > I have attached a quick fix for this but it will need some more thought > so that it works if the calendar rule is used twice on the same page. > > -Brendan > http://farcry.daemon.com.au > > ---------------------------------------------------------------------------- ---- > <cfsetting enablecfoutputonly="yes"> > <!--- > || LEGAL || > $Copyright: Daemon Pty Limited 1995-2003, http://www.daemon.com.au $ > $License: Released Under the "Common Public License 1.0", http://www.opensource.org/licenses/cpl.php$ > > || VERSION CONTROL || > $Header: /home/cvsuser/cvs/farcry_aura/webskin/dmEvent/displayTeaserCalendar.cfm,v 1.5 2003/10/01 07:00:24 ben Exp $ > $Author: ben $ > $Date: 2003/10/01 07:00:24 $ > $Name: b105 $ > $Revision: 1.5 $ > > || DESCRIPTION || > $Description: dmEvent -- calendar listing$ > $TODO: $ > > || DEVELOPER || > $Developer: Brendan Sisson ([EMAIL PROTECTED]) $ > ---> > <!--- @@displayname: Calendar ---> > <!--- @@author: Brendan Sisson ---> > > <cfimport taglib="/farcry/farcry_core/tags/webskin" prefix="skin"> > > <cfset earliestyear = year(now())> > > <cfoutput> > <script language="javascript"> > function changedate(){ > var mymonth=document.calendarform.month.options[document.calendarform.month.sele ctedIndex].value; > var myyear=document.calendarform.year.options[document.calendarform.year.selecte dIndex].value; > window.location="?objectid=#url.Objectid#&year="+myyear+"&month="+mymonth; > } > </script> > </cfoutput> > > <!--- work out position in aInvocations ---> > <cfloop from="1" to="#arrayLen(request.aInvocations)#" index="num"> > <cfif isStruct(request.aInvocations[num]) and structKeyExists(request.aInvocations[num],"stEvents")> > <cfset ruleLocation = num> > <cfbreak> > </cfif> > </cfloop> > > <cfparam name="month" default=#Month(now())#> > <cfparam name="year" default=#Year(now())#> > > <!---Find the start day the month---> > <cfset start_day = DayOfWeek(createdate("#year#","#month#","1"))> > > <!---Find the total no of days in the month---> > <cfset total_days_in_month = DaysInMonth(createdate("#year#","#month#","1"))> > > <!---Find the end day of the month---> > <cfset end_day = DayOfWeek(createdate("#year#","#month#","#total_days_in_month#"))> > > <cfoutput> > <table class="calendar" cellspacing="1"> > <tr> > <form name="calendarform"> > <th class="calmonth" align="center" colspan="7"> > <!--- list months ---> > <SELECT name="month" onChange="changedate()" size="1"> > <cfloop from="1" to="12" index="m"> > <option value="<cfoutput>#m#</cfoutput>" <cfif month is m>selected</cfif>><cfoutput>#monthasstring(m)#</cfoutput> > </cfloop> > </select> > <!--- list years ---> > <select name="year" onChange="changedate()" size="1"> > <cfloop from="#earliestyear#" to="#year(now())#" index="y"> > <option value="<cfoutput>#y#</cfoutput>" <cfif year is y>Selected</cfif>><cfoutput>#y#</cfoutput> > </cfloop> > </select> > </th> > </form> > </tr> > <!--- show days of week ---> > <tr class="calweekdays"></cfoutput> > <cfloop from="1" to="7" index="d"> > <cfoutput><th width="14%">#left(dayofweekasstring(d),3)#</th></cfoutput> > </cfloop> > <cfoutput></tr></cfoutput> > <cfset week_day = start_day> > <cfset display_day = 1> > <cfset week=1> > <!--- loop through calendar month ---> > <cfloop condition = "#display_day# LTE #total_days_in_month#"> > <!--- start new week ---> > <cfoutput><tr></cfoutput> > <!--- loop through week ---> > <cfloop condition = "#week_day# LTE 7"> > <cfloop condition = "#start_day# NEQ 1"> > <!--- date is in previous month ---> > <cfoutput><td class="calnoday"> </td></cfoutput> > <cfset start_day = start_day - 1> > </cfloop> > <cfif display_day LTE total_days_in_month> > <cfset currentDate = DateFormat(createdate("#year#","#month#","#display_day#"))> > <cfoutput><td class="calday</cfoutput> > <cfif currentdate eq dateformat(now())><cfoutput> caltoday</cfoutput></cfif> > <cfoutput>"> > <!--- display date ---> > <div class="date">#display_day#</div></cfoutput> > > <!--- check for event ---> > <cfset eventDisplayed = 0> > <cfloop collection="#request.aInvocations[rulelocation].stEvents#" item="eventItem"> > <cfif dateFormat(request.aInvocations[rulelocation].stEvents[eventItem].eventDate) eq currentDate> > <cfoutput><div class="event"> > <span class="title"><a href="#application.url.conjurer#?objectid=#request.aInvocations[rulelocation ].stEvents[eventItem].objectid#">#request.aInvocations[rulelocation].stEvent s[eventItem].title#</a></span> > <span class="loc">#request.aInvocations[rulelocation].stEvents[eventItem].location #</span> > > </div></cfoutput> > <cfset eventDisplayed = 1> > </cfif> > </cfloop> > <cfif not eventDisplayed> > <!--- no events for the day ---> > <cfoutput><div class="noevent"></div></cfoutput> > </cfif> > <cfoutput></td></cfoutput> > <cfelse> > <cfloop condition="#end_day# NEQ 7"> > <!--- date is in next month ---> > <cfoutput><td class="calnoday"> </td></cfoutput> > <cfset end_day = end_day + 1> > </cfloop> > </cfif> > <cfset week_day = week_day + 1> > <cfset display_day = display_day + 1> > </cfloop> > <cfoutput></tr></cfoutput> > <cfset week_day = 1> > <cfset week = week + 1> > </cfloop> > <cfoutput> > </table> > </cfoutput> > > <cfsetting enablecfoutputonly="no"> --- You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
