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


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: ssi2.html need help  (Read 470 times)
0 Members and 1 Guest are viewing this topic.
adjung
New Member
*

Karma: 0
Offline Offline

Posts: 0

Retail


WWW
« on: September 01, 2005, 05:43:00 PM »

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'}->

  • ->
  • ;
    $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

Logged

_Alan
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #1 on: September 01, 2005, 07:56:00 PM »

**  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).]

Logged
adjung
New Member
*

Karma: 0
Offline Offline

Posts: 0

Retail


WWW
« Reply #2 on: September 01, 2005, 08:19:00 PM »

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'}->

  • ->
  • ;
    $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

Logged

_Alan
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #3 on: September 02, 2005, 09:40:00 PM »

** 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).]

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