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: SSI - Strange behaviour  (Read 681 times)
0 Members and 1 Guest are viewing this topic.
matze.schrader
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: December 18, 2006, 03:39:00 PM »

Hi,

i would like to use the calendarscript with an ssi-include..
which worked perfect..till now..

This is my include:

code:

calendar.pl?template=ssi.html&duration=4w"

ok..

this is my ssi.html-template:

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><B><%=$DAY->{dayname}%>, <%=$DAY->{dd}%>. <%=$DAY->{monthname}%> <%=$YEAR%></B>
           <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'})) { %> : <% } %>

                           <A HREF="<%=$CGI_URL%>?calendar=<%=$in{'calendar'}%>&view=Event&event_id=<%= EVENT FIELD(id) %>" STYLE="text-decoration:underline;" CL
    ASS="text">
                           <%= EVENT FIELD(title) %></A> (<%= EVENT FIELD(kategorie) %> ) <BR>
                           <%= # $EVENT->{'details'}->{'title'} %><BR>
                   <%/FOREACH%>
           <%/IF%>
    <%/FOREACH%>
    </DL>
    <%unless($total_events){%>
    <CENTER><I><%= $_NO_EVENTS_LABEL %></I></CENTER>
    <% } %>


Ok..
until now, everything worked fine..

but now, as the new year is nearby, the year displayed at the january-dates is also 2006 and not 2007, as thy should be..

any ideas how to solve this?

Thanks in advance..

Matze

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: December 18, 2006, 09:43:00 PM »

How does it work when you specify a duration in days instead of weeks? Eg.

calendar.pl?template=ssi.html&duration=28d

Dan O.

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

Logged
matze.schrader
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: December 19, 2006, 05:05:00 AM »

Hi there,

tried it with 28d..and still the same thing.

Year is 2006.

Greetz,

Matze

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #3 on: December 19, 2006, 09:00:00 PM »

Are the events being displayed actually from 2006 or is it just displaying "2006" in the title(s) on the page but the events shown are actually from 2007?

Dan O.

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

Logged
matze.schrader
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: December 20, 2006, 03:23:00 PM »

Hi there,

the events which are shown are actually from the year 2007.
So, this works..

The year displayed via the ssi-template is stated to be 2006.

So,

events are catched correctly from the original calendar.
But the ssi-template does not switch into the new year.
It displayes the current year.

Any ideas?

Thanks in advance..

Matze

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #5 on: December 21, 2006, 01:45:00 AM »

** It displayes the current year. **

Than maybe try changing the following tag in the template

<%=$YEAR%>

to

<%=$DAY->{yyyy}%>

Dan O.

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

Logged
matze.schrader
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #6 on: December 21, 2006, 07:03:00 AM »

Yes,

that was the solution..

thanks


Matze

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

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: December 21, 2006, 12:26:00 PM »

** that was the solution.. **

Glad to hear it.

The $YEAR variable always displays the current value similar to the other script variables $MONTH, $MONTH_NAME, $DATE, $DATESTRING, etc.
as described in the Documentation: Defined Variables. Variables particular to a specific event are prefixed with $Grid->... or $DAY->...

JFYI

Dan O.

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

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