UBBFriend: Email This Page to Someone!
  CalendarScript Support Forum
  Hacks and Mods
  ssi2.html need help

Post New Topic  Post A Reply
profile | register | preferences | search

next newest topic | next oldest topic
Author Topic:   ssi2.html need help
adjung
Junior Member
posted September 01, 2005 05:43 PM     Click Here to See the Profile for adjung   Click Here to Email adjung     Edit/Delete Message
I am currently using the default ssi2.html template to call the entries into my other web pages.
I am not worried about the times of these event at the moment.
The dates are now showing up like this:
Sunday, September 4
First Baptist
Boulogne, FL

Sunday, September 5
First Baptist
Boulogne, FL

Sunday, September 6
First Baptist
Boulogne, FL
Each day is showing up

I want the dates that are entered which span several days to show up like this"
September 4-6
First Baptist
Boulogne, FL
or:
September 4 thru 6
First Baptist
Boulogne, FL

Here is my currently ssi2.html
<!--#include file="preferences.pl"-->
<%
&getEvents( {'duration'=>$in{duration}} );
$DAY = $Grid->{'grid'}->[0]->[0];
$EVENTS = $DAY->{events};
$total_events=0;
%>
<DL>
<%FOREACH EVENTLIST%>
<%IF EVENTS EXIST%>
<%$total_events++;%>
<DT><b><small><%=$DAY->{dayname}%>, <%=$DAY->{monthname}%> <%=$DAY->{dd}%></small></b>
<br><cite>
<%FOREACH EVENT%>
<% 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->{'details'}->{'title'} %><BR>
<%= $EVENT->{'details'}->{'location'} %><BR> </cite>
<%/FOREACH%> <hr color="blue" width="50%" size="2">
<%/IF%>
<%/FOREACH%>
</DL>
<%unless($total_events){%>
<CENTER><I><%= $_NO_EVENTS_LABEL %></I></CENTER>
<% } %>
<A HREF="<%=$AdminConfig->get("calendar_url")%>?calendar=default" target="_blank"><font color="#990000">View
Calendar</font></A>

Please help I love this calendar

------------------
_Alan

IP: Logged

DanO
Administrator
posted September 01, 2005 07:56 PM     Click Here to See the Profile for DanO   Click Here to Email DanO     Edit/Delete Message
** am currently using the default ssi2.html **

There is no "ssi2.html" template supplied with CalendarScript. Maybe it's one you made or renamed from some other??

** I want the dates that are entered which span several days to show up like this: September 4-6 **

That is a pretty complex problem, I'm afraid i don't know how you'd modify an existing template to accomplish it.

You can try using the "Chronological List" template described at the Unofficial CalendarScript - Mods and Plugins site which has a similar display although it is not supported by the author so don't expect too much help with it if you can't get it running.

Dan O.


[This message has been edited by DanO (edited September 01, 2005).]

IP: Logged

adjung
Junior Member
posted September 01, 2005 08:19 PM     Click Here to See the Profile for adjung   Click Here to Email adjung     Edit/Delete Message
Ok so I guess I did modify the ssi.html template. I forgot about it, it has been awhile since I have messed with this.


What I have now is this
<!--#include file="preferences.pl"-->
<%
&getEvents( {'duration'=>$in{duration}} );
$DAY = $Grid->{'grid'}->[0]->[0];
$EVENTS = $DAY->{events};
$total_events=0;
%>
<DL>
<%FOREACH EVENTLIST%>
<%IF EVENTS EXIST%>
<%$total_events++;%>
<DT>
<br><cite>
<%FOREACH EVENT%>
<small><% if ($EVENT->{'schedule'}->{'start'}) { print &SimpleDateFormat::formatDate($EVENT->{'schedule'}->{'start'}, $Config->get(date_format)) } %>
<% if ($EVENT->{'schedule'}->{'end'} ne $EVENT->{'schedule'}->{'start'}) { print " - ", &SimpleDateFormat::formatDate($EVENT->{'schedule'}->{'end'}, $Config->get(date_format)) } %></small><br>

<% if ($_SHOW_EVENT_TIMES eq "ALL" | | $_SHOW_EVENT_TIMES eq "START") { %>
<% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= SCHEDULE FIELD(start_time) %><% } %>
<% } %>
<%= $EVENT->{'details'}->{'title'} %><BR>
<%= $EVENT->{'details'}->{'location'} %>
<BR> </cite>
<%/FOREACH%> <hr color="blue" width="50%" size="2">
<%/IF%>
<%/FOREACH%>
</DL>
<%unless($total_events){%>
<CENTER><I><%= $_NO_EVENTS_LABEL %></I></CENTER>
<% } %>
<A HREF="<%=$AdminConfig->get("calendar_url")%>?calendar=default" target="_blank"><font color="#990000">View
Calendar</font></A>

It now shows up like this

09/04/2005 - 09/07/2005
First Baptist
Boulogne, FL

----


09/04/2005 - 09/07/2005
First Baptist
Boulogne, FL

----


09/04/2005 - 09/07/2005
First Baptist
Boulogne, FL

----


09/04/2005 - 09/07/2005
First Baptist
Boulogne, FL

----


09/11/2005 - 09/14/2005
Clingan Ridge Baptist
Cleveland, TN

But it still is listing (repeating)the event for each day.
I only need one listing for the events that span a few days.

------------------
_Alan

IP: Logged

DanO
Administrator
posted September 02, 2005 09:40 PM     Click Here to See the Profile for DanO   Click Here to Email DanO     Edit/Delete Message
** But it still is listing (repeating) the event for each day. I only need one listing for the events that span a few days. **

Somehow you're going to have to keep track of which events are printed and then negate printing them again on the later dates. Maybe put the printed event's IDs into a hash and check that hash each time before printing?

BTW. How does your template work with recurring events rather than date-span events?

Dan O.

[This message has been edited by DanO (edited September 02, 2005).]

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

CalendarScript Home