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: Showing next 5 events  (Read 294 times)
0 Members and 1 Guest are viewing this topic.
Mango
New Member
*

Karma: 0
Offline Offline

Posts: 0

Designer


WWW
« on: November 14, 2003, 11:04:00 PM »

I am using the SSI_Max_Days on my main page, but it shows all the events in the current month, can it be changed to only show the next 5 events regardless of the month?

Thanks

Logged

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #1 on: November 15, 2003, 01:46:00 PM »

** can it be changed to only show the next 5 events regardless of the month? **

I'm sure it can but I don't know the exact code that needs to be changed in that template. Basically, you'd have to set up a conditional to test for the number of events already displayed.

You can read about a couple of methods in the previous forum message "SSI - Show X # of Events". Maybe it will give you an idea what needs to be changed?

Dan O.

------------------

Logged
Alvy
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: November 29, 2003, 11:16:00 PM »

Here is how I did it...
On my SSI page....   
<!--#include virtual="/cgi-bin/opcal/calendar.pl?template=5dayssi.html&duration=5d"-->

Any my 5day template is

code:

<!--#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><%=$DAY->{dayname}%>, <%=$DAY->{monthname}%> <%=$DAY->{dd}%>

       <DD>

          <%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>

          <%/FOREACH%>

       <%/IF%>

    <%/FOREACH%>

    </DL>

    <%unless($total_events){%>

    <CENTER><I><%= $_NO_EVENTS_LABEL %></I></CENTER>

    <% } %>

    <A HREF="<%=$AdminConfig->get("calendar_url")%>?calendar=<%=$calendar_key%>">View Calendar</A>


------------------

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