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: link to events in SSIs  (Read 441 times)
0 Members and 1 Guest are viewing this topic.
simma
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: October 05, 2003, 11:34:00 PM »

I have tryied the modification I've seen on other posts to allow the default ssi.html to link to events, but it doesn't work.

It does add a link but, when clicked it shows again the same list of events.

Here is my code, it would be great if someone can help me to catch the bug, thanks!

<!--#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'})) { %> : <% } %>
                       <A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>"
    STYLE="text-decoration:underline;" CLASS="text"><%= EVENT FIELD(title)
    %></A> <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
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 06, 2003, 06:47:00 PM »

** it doesn't work. **

What exactly doesn't work about it?

Or maybe I should ask, what does happen when that code is used? Do you have an example we can look at??

Dan O.

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

Logged
simma
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: October 07, 2003, 11:01:00 PM »

Hi Dan, thanks for helping on this one.

here is the link where you can see the issue:
http://www.virtualitalia.com/calendar/ssi_calendar.shtml

as you see, the latest events (extracted from a more comprhensive calendar for San Francisco) are show correctly.
However, when you click on the link it doesn't go to the details of the event.

It just shows the same list again (without my Web site wrap around ... but that is ok, different issue probably)

Also the link to the bottom: "View Calendar" doesn't go to the right one (which is supposed to be San Francisco), and instead it goes to the Los Angeles calendar.
This is my include line:
<!--#include
virtual="/cgi-bin/calendar/calendar.pl?duration=10d&template=ssi.html&calendar=san_francisco"-->

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

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

Try changing the
<A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>"
in your SSI template's link code to
<A HREF="<%=$CGI_URL%>?calendar=<%=$calendar_key%>&view=Event&event_id=<%= EVENT FIELD(id) %>"

You may need to remove the "?" (question mark) from that code as the <%=$CGI_URL%> variable may include it already. Look at the URL of the page you're taken to to see if there are 2 (??) in it.

Dan O.

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

[This message has been edited by DanO (edited October 08, 2003).]

Logged
simma
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: October 08, 2003, 04:07:00 PM »

Dan,

almost there, please check again with the modifications you have suggested:
http://www.virtualitalia.com/calendar/ssi_calendar.shtml  

I see that is not passing correctly the name of the calendar (calendar=san_francisco in this case) to the template ssi.html, so the event doesn't get retrieved correctly ...

Here is my "calling": include statement (in the test page ssi_calendar.shtml):

<!--#include
virtual="/cgi-bin/calendar/calendar.pl?duration=10d&template=ssi.html&calendar=san_francisco"
-->

any idea why is that happening?

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

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: October 08, 2003, 08:06:00 PM »

I see that the <%=$calendar_key%> tag isn't providing the calendar key for the link at the bottom of the ssi.html template either. Try changing both to:

<%=$in{'calendar'}%>

Dan O.

[This message has been edited by DanO (edited October 08, 2003).]

Logged
simma
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #6 on: October 09, 2003, 11:06:00 PM »

Dan,

great, it works perfect! I owe you a pizza ...

Should I upload the complete code for reference to others?
The origianl code I downloaded from http://www.much2.com  wasn't really working 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 #7 on: October 10, 2003, 08:31:00 PM »

** Should I upload the complete code for reference to others? **

If you want to zip up the file, you can email it to me and I'll add it to the Mods and Plug-ins site. BTW. Which template did you modify to make it, the original ssi.html file of one downloaded from the site?

Dan O.

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

Logged
simma
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #8 on: October 11, 2003, 11:57:00 PM »

Dan,

I sent you the zipped ssi.html in an e-mail.

I have modified the default ssi.html file only.

The ones provided in the plug-in (ssi_max...) where not displaying in the format that I was looking for.

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

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