Here's the modifications I made. It's a bit long, but I didn't see how to attach a file to the post...
This modification allows for the display of event details ONLY for registered CalenderScript users. It uses the following condition
<% if ( ($User->{username} ne "anonymous") ) { %>
[ code that displays the event detail goes here ]
<% } %>
as a condition of displaying event detail. There are three locations in default.html that need to be edited with this condition. Be sure to edit the default.html for calendar used. The following example applies to:
.../calendarscript/templates/calendars/default/default.html
======================================================================
Display of Today as a List...
Around line 275, find:
<%-- LIST VIEW --%>
<CENTER><TABLE BORDER="0" WIDTH=90%><TR><TD>
<SPAN CLASS="text">
<%IF EVENTS EXIST%>
<DL>
<%FOREACH EVENT%>
<DT>
<% if ($_SHOW_GRID_EVENT_BULLET) {%><%}%>
<% if ($_SHOW_EVENT_TIMES eq "ALL" | | $_SHOW_EVENT_TIMES eq "START") { %>
<% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= SCHEDULE FIELD(start_time) %><% } %>
<% } %>
<% if ($_SHOW_EVENT_TIMES eq "ALL") { %>
<% if ($EVENT->{'schedule'}->{'end_time'}) { %>-<%= SCHEDULE FIELD(end_time) %><% } %>
<% } %>
<% if (($_SHOW_EVENT_TIMES eq "ALL" | | $_SHOW_EVENT_TIMES eq "START") && ($EVENT->{'schedule'}->{'start_time'})) { %> : <% } %>
<%= EVENT FIELD(title) %>
<FONT SIZE="-2">[<A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>" STYLE="text-decoration:underline;">details</A>]<BR></FONT>
<DD>
<%= EVENT FIELD(description) %>
<%/FOREACH%>
</DL>
<%ELSE%>
<BR><I><%= $_NO_EVENTS_LABEL %></I><BR>
<%/IF%>
</SPAN>
</TD></TR></TABLE></CENTER>
Edit to:
<%-- LIST VIEW --%>
<CENTER><TABLE BORDER="0" WIDTH=90%><TR><TD>
<SPAN CLASS="text">
<%IF EVENTS EXIST%>
<DL>
<%FOREACH EVENT%>
<DT>
<% if ($_SHOW_GRID_EVENT_BULLET) {%><%}%>
<% if ($_SHOW_EVENT_TIMES eq "ALL" | | $_SHOW_EVENT_TIMES eq "START") { %>
<% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= SCHEDULE FIELD(start_time) %><% } %>
<% } %>
<% if ($_SHOW_EVENT_TIMES eq "ALL") { %>
<% if ($EVENT->{'schedule'}->{'end_time'}) { %>-<%= SCHEDULE FIELD(end_time) %><% } %>
<% } %>
<% if (($_SHOW_EVENT_TIMES eq "ALL" | | $_SHOW_EVENT_TIMES eq "START") && ($EVENT->{'schedule'}->{'start_time'})) { %> : <% } %>
<%= EVENT FIELD(title) %>
<FONT SIZE="-2">[<A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>" STYLE="text-decoration:underline;">details</A>]<BR></FONT>
<DD>
<% if ( ($User->{username} ne "anonymous") ) { %>
<%= EVENT FIELD(description) %>
<% } %>
<%/FOREACH%>
</DL>
<%ELSE%>
<BR><I><%= $_NO_EVENTS_LABEL %></I><BR>
<%/IF%>
</SPAN>
</TD></TR></TABLE></CENTER>
======================================================================
Display of event details...
Around line 300, find:
<%-- EVENT VIEW --%>
<% } elsif ($VIEW eq "Event") { %>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0">
<%
foreach (@$fields) {
next unless ($db->{'properties'}->{$_}->{'display_details'});
%>
<TR><TD ALIGN="right" VALIGN="top"><SPAN CLASS="text"><B><%=$db->{'properties'}->{$_}->{'name'}%>: </B></SPAN></TD><TD ALIGN="left" VALIGN="top"><SPAN CLASS="text"><%=$EVENT->{details}->{$_}%></SPAN></TD></TR>
<% } %>
</TABLE>
Edit to:
<%-- EVENT VIEW --%>
<% } elsif ($VIEW eq "Event") { %>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0">
<%
foreach (@$fields) {
next unless ($db->{'properties'}->{$_}->{'display_details'});
%>
<TR>
<TD ALIGN="right" VALIGN="top"><SPAN CLASS="text"><B><%=$db->{'properties'}->{$_}->{'name'}%>: </B></SPAN></TD>
<% if ( ($User->{username} ne "anonymous") ) { %>
<TD ALIGN="left" VALIGN="top"><SPAN CLASS="text"><%=$EVENT->{details}->{$_}%></SPAN></TD>
<% } %>
</TR>
<% } %>
</TABLE>
======================================================================
Display of search results...
Around line 370 find:
<TABLE BORDER="1" CELLPADDING="1" CELLSPACING="0">
<TR>
<TH><SPAN CLASS="text">First Occurrence</SPAN></TH>
<TH><SPAN CLASS="text">Title</SPAN></TH>
<TH><SPAN CLASS="text">Description</SPAN></TH>
</TR>
<% FOREACH SEARCH RESULT %>
<TR>
<TD>
<SPAN CLASS="text">
<% IF NEXT OCCURRENCE EXISTS %>
<%=$MONTH_NAMES->[$EVENT->{schedule}->{nextoccurrence}->{month}-1]%> <%=$EVENT->{schedule}->{nextoccurrence}->{date}%>, <%=$EVENT->{schedule}->{nextoccurrence}->{year}%>
<% ELSE %>
None
<% /IF %>
</SPAN>
</TD>
<TD><A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>" STYLE="text-decoration:underline;" CLASS="text"><%= EVENT FIELD(title) %></A></TD>
<TD><SPAN CLASS="text"><%= EVENT FIELD(description) %></SPAN></TD>
</TR>
<% /FOREACH %>
</TABLE>
Edit to:
<TABLE BORDER="1" CELLPADDING="1" CELLSPACING="0">
<TR>
<TH><SPAN CLASS="text">First Occurrence</SPAN></TH>
<TH><SPAN CLASS="text">Title</SPAN></TH>
<% if ( ($User->{username} ne "anonymous") ) { %>
<TH><SPAN CLASS="text">Description</SPAN></TH>
<% } %>
</TR>
</TR>
<% FOREACH SEARCH RESULT %>
<TR>
<TD>
<SPAN CLASS="text">
<% IF NEXT OCCURRENCE EXISTS %>
<%=$MONTH_NAMES->[$EVENT->{schedule}->{nextoccurrence}->{month}-1]%> <%=$EVENT->{schedule}->{nextoccurrence}->{date}%>, <%=$EVENT->{schedule}->{nextoccurrence}->{year}%>
<% ELSE %>
None
<% /IF %>
</SPAN>
</TD>
<TD><A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>" STYLE="text-decoration:underline;" CLASS="text"><%= EVENT FIELD(title) %></A></TD>
<% if ( ($User->{username} ne "anonymous") ) { %>
<TD><SPAN CLASS="text"><%= EVENT FIELD(description) %></SPAN></TD>
<% } %>
</TR>
<% /FOREACH %>
</TABLE>
======================================================================
Sorry, the forum software appears to be removing leading spaces. Therefore, the indentation is lost.
[This message has been edited by PaulW (edited February 18, 2005).]