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


Login with username, password and session length

Search

 
Advanced search

8054 Posts in 1860 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO, Marty)Can't get duration to work with SSI
Pages: [1]   Go Down
Print
Author Topic: Can't get duration to work with SSI  (Read 668 times)
0 Members and 1 Guest are viewing this topic.
TotalHosting
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: April 27, 2005, 07:17:00 PM »

Hi All.

Ok, I have read all the forum posts I could. I have events within the duration I am using. I am using SSI_Max_Days.

I wish to display the next two days scheduled events.

I have tried calling it (both in the browser and via Include):
/cgi-bin/calendar/calendar.pl?template=ssi_max_days.html&duration=45d
/cgi-bin/calendar/calendar.pl?duration=45d&template=ssi_max_days.html

No matter what I do, I only get this month's events (ones dated tomorrow until the end of the month, and I have a recurring event 14 days later, and a stand alone between them as well which runs us into the next month.

I am calling the SSI into the page and it's working fine (minical works great, the events within this month all show up fine). I just can't get it to the next month. I am running 3.21

code:

<%
&getEvents( {'duration'=>$in{duration}} );
$DAY = $Grid->{'grid'}->
  • ->
  • ;
    $EVENTS = $DAY->{events};
    $total_events=0;
    $max_days=2;
    $total_days=0;
       $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);
    %>

I also tried editing the options within the script, to no avail.

I need more coffee (or a smack to the head with a 2x4).

Anyone? Anyone?

Pete

Logged

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 235

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


WWW
« Reply #1 on: April 27, 2005, 09:01:00 PM »

   
quote:
No matter what I do, I only get this month's events (ones dated tomorrow until the end of the month, and I have a recurring event 14 days later, and a stand alone between them as well which runs us into the next month.
What is it suppose to be displaying?

 

quote:
I wish to display the next two days scheduled events.

I have tried calling it (both in the browser and via Include):
/cgi-bin/calendar/calendar.pl?template=ssi_max_days.html&duration=45d


Than try changing the duration period in the call to 2 days. Eg.

/cgi-bin/calendar/calendar.pl?template=ssi_max_days.html&duration=2d

Although I guess if you wanted to, you could probably edit the template code and set up a conditional to negate printing of any events after a certain period?

Dan O.

[This message has been edited by DanO (edited April 27, 2005).]

Logged
TotalHosting
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: April 28, 2005, 09:35:00 AM »

Hi DanO.

Thanks for the response. What I am trying to do is show a ROLLING schedule when at the end of the month, to display next month's listings, based on the day var in the SSI.

So, if today is the 28th of the month, and there are no events between now and the 31st, but there are scheduled on the 1st, 5th, and 7th of the following month, I would want to show those events for the coming month that match-up if the SSI is set to show two days worth of events.

So really, the question is, how do I get the SSI to look beyond the current month for events to display?

I tried hard coding the URL, as well as the SSI.  

I could use the chrono listing SSI, but I don't want to display that many events.

Pete

------------------
Pete
http://www.TotalHosting.com

Logged

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 235

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


WWW
« Reply #3 on: April 28, 2005, 03:45:00 PM »

 
quote:
So really, the question is, how do I get the SSI to look beyond the current month for events to display?

That (and the other SSI) templates AFAIK should only be limited to the current month if no duration is specified. If a duration is specified, that length of events should be returned regardless if they span more than the current month or not.

If they're not being displayed, please post a link to that template in use and also your regular calendar so we can compare them.

Dan O.

[This message has been edited by DanO (edited April 28, 2005).]

Logged
TotalHosting
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: April 28, 2005, 10:57:00 PM »

That's what I thought.
http://www.emacc.org/cgi-bin/calendar/calendar.pl?calendar=default

This is what I was attempting: http://www.emacc.org/cgi-bin/calendar/calendar.pl?template=ssi_max_days.html&duration=45d

Which as you said, should push it over a month and a half and find anything within that time span. In this case there certainly is, when you look at May. Definately within duration.

Again, I would *expect* the next events would appear in the SSI. This is the page that I am pulling the cal into: http://www.emacc.org/new/

Greatly appreciate your help.

Pete

------------------
Pete
http://www.TotalHosting.com

Logged

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 235

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


WWW
« Reply #5 on: April 29, 2005, 12:56:00 PM »

Did you make any modifications to the ssi.html template which ships with CalendarScript? Because it doesn't appear to be functioning either:
http://www.emacc.org/cgi-bin/calendar/calendar.pl?template=ssi.html&duration=180d

I can't think of what would cause both templates to not display events except maybe a problem in the calendar.pl file's sub getEvents{ routine.

Dan O.

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

Logged
TotalHosting
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #6 on: April 30, 2005, 10:58:00 AM »

Ok, well at least I know it's not just me :-)

I tested clean SSI.html from  all the templates and duration worked perfect.  http://www.emacc.org/cgi-bin/calendar/calendar.pl?template=ssi.html&duration=45d

However, when I try to run either ssi_max with duration it fails. I grabbed the latest zip from the unoffical site.

HMMM now I need to dig further.

------------------
Pete http://www.TotalHosting.com

[This message has been edited by TotalHosting (edited April 30, 2005).]

Logged

Pages: [1]   Go Up
Print
Jump to: