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: MAX EVENTS SSI  (Read 447 times)
0 Members and 1 Guest are viewing this topic.
diver165
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: October 24, 2004, 08:52:00 AM »

Is it just me or does the MAX events SSI found on http://www.much2.com/calendarscript/index.html  just not work?  I can't get it to show anything other than the "no events" tag.

I realize the author of the sight may not be the author of the template.  But I was just curious if anyone had gotten this to work. I've searched the forums and tried every mod found on how to display X number of events and none work for me.

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: October 24, 2004, 12:51:00 PM »

What "MAX events SSI" template? I don't see any there titled that.

Dan O.

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

Logged
diver165
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: October 24, 2004, 03:02:00 PM »

 http://www.much2.com/calendarscript/ssi_templates.zip

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

Logged
diver165
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #3 on: October 26, 2004, 07:05:00 AM »

Here is the "Max Event's" SSI template from http://www.much2.com/calendarscript/index.html.   I can't get it to work.  It just shows 'no events'

<%
&getEvents( {'duration'=>$in{duration}} );
$DAY = $Grid->{'grid'}->

  • ->
  • ;
    $EVENTS = $DAY->{events};
    $total_events=0;
    $total_trueevents=0;
    $max_events=3;
    $time = time;
    ($neg_pos,$hours) = ($vars{time_offset} =~ /([+-])(\d+)/);
    if ($neg_pos eq '+') {$time += (60*60 * $hours);
    }
    else {
    $time -= (60*60 * $hours);
    }
    ($mday,$month,$year) = (localtime($time))[3,4,5];
    $month = $month+1;
    $year = $year+1900;
    $datestamp = sprintf("%4.4d%2.2d%2.2d",$year,$month,$mday);
    %>
    <DL>
    <%FOREACH EVENTLIST%>
    <%IF EVENTS EXIST%>
    <%$total_events++;%>
    <%if($DAY->{dd} >= $mday) { %>
    <DT><%=$DAY->{dayname}%>, <%=$DAY->{monthname}%> <%=$DAY->{dd}%>
    <DD>
    <%FOREACH EVENT%>

    <% $total_trueevents++;%>
    <% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= $EVENT->{'schedule'}->{'start_time'} %><% } %>
    <% if ($EVENT->{'schedule'}->{'end_time'}) { %>-<%= $EVENT->{'schedule'}->{'end_time'} %><% } %>
    <% if ($EVENT->{'schedule'}->{'start_time'}) { %> : <% } %>
    <%= $EVENT->{'details'}->{'title'} %><BR>
    <% if($total_trueevents >= $max_events) {
    exit();
    }%>
    <%/FOREACH%>
    <%/IF%>
    <%}%>
    <%/FOREACH%>
    </DL>
    <%unless($total_events){%>
    <CENTER><I>No Events</I></CENTER>
    <% } %>
    <A HREF="<%=$AdminConfig->get("calendar_url")%>?calendar=<%=$Calendar%>">View Calendar</A>

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

Logged
delicia
New Member
*

Karma: 0
Offline Offline

Posts: 7


WWW
« Reply #4 on: October 26, 2004, 07:21:00 AM »

do you have any events scheduled between now and oct 31? i seem to remember something about it not pulling events past end of month...

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

Logged
diver165
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #5 on: October 26, 2004, 10:22:00 AM »

As matter of fact I don't have anything until November 9th.

I'll put a test event up and see if it shows anything.

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

Logged
diver165
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #6 on: October 26, 2004, 10:38:00 AM »

Yes, you are correct.  It only shows X number of events within the month.  This is no good for me.

Does anyone have an SSI template that will show X number of events regardless of how far apart they are?

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #7 on: October 26, 2004, 05:54:00 PM »

* What "MAX events SSI" template? *

... from the Headlines (SSI) template package.

** It only shows X number of events within the month. This is no good for me. **

It only shows X number of events *within the month* if you don't tell it how long to look for events. That's what the duration variable in the ssi.txt file is for, set it to a value where events are sure to be found.

The current month is the default for that template, the same as with the ssi.html template supplied with CalendarScript.

JFYI

Dan O.

[This message has been edited by DanO (edited October 26, 2004).]

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