Is it possible to have a "past events" displayed. . . with a range of say, a year, ending on 'today's date'. . so it wouldn't show coming up events just today and prior - in decending order. . . december 23,22,21. . . etc. .
I have tried to modify the
<% @$EVENTS = sort {$b->{schedule}->{start} <=> $a->{schedule}->{start} } @$EVENTS; %>
code with little luck. . . can only get that to reverse the events on any given day, not actually reverse the day sort. . .
This is my code currently:
<!--#include file="preferences. pl"-->
<%
&getEvents( {range=>'year'});
$DAY = $Grid->{'grid'}->[0]->[0];
$EVENTS = $DAY->{events};
$total_events=0;
%>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<%FOREACH EVENTLIST%>
<%IF EVENTS EXIST%>
<%$curr_events = 0;%>
<%FOREACH EVENT%>
<%$curr_events++ if (($EVENT->{details}->{inclusion} ne "No") or ($EVENT->{details}->{inclusion} ne "This Week")); %>
<%/FOREACH%>
<%next unless ($curr_events);%>
<%$total_events++;%>
<tr>
<td colspan="2">
<font size="2" face=" Arial, Helvetica, sans-serif" color="#473903">
<a href="hxxp: slbradio. org/asx/<%=$datestring%>. asx"><strong><%=$DAY->{monthname}%> <%=$DAY->{dd}%></strong> </a>
</font>
</td>
</tr>
<tr>
<td nowrap valign="top" align="right">
<font size="2" face=" Arial, Helvetica, sans-serif" color="#473903">
<%FOREACH EVENT%>
<% next if (($EVENT->{details}->{inclusion} eq "No") or ($EVENT->{details}->{inclusion} eq "This Week") or ($EVENT->{details}->{inclusion} eq "Games")); %>
</font>
</td>
<td valign="top">
<font size="2" face=" Arial, Helvetica, sans-serif" color="#473903">
<A HREF="<%=$CGI_URL%>?calendar=<%=$in{'calendar'}%>&view=Event&event_id=<%= EVENT FIELD(id) %>" STYLE="text-decoration: none; color:663366" CLASS="text"><%= EVENT FIELD(title) %></A>
</font>
</td>
<tr>
<td nowrap valign="top" align="right">
<font size="2" face=" Arial, Helvetica, sans-serif" color="#473903">
<%= # $EVENT->{'details'}->{'title'} %><BR><%= $EVENT->{'details'}->{'title'} %><br>
</font>
</td>
</tr>
<%/FOREACH%>
<%/IF%>
<%/FOREACH%>
</table>
<%unless($total_events){%>
<CENTER><I>No Events</I></CENTER>
<% } %>
Code formatting edited by Dan O.