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 and MetaCalendar  (Read 316 times)
0 Members and 1 Guest are viewing this topic.
Lindau
New Member
*

Karma: 0
Offline Offline

Posts: 30


WWW
« on: March 18, 2006, 03:29:00 PM »

I want to use SSI to pull events from only one of my calendars and put them on the home page.

On my home page I have:

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

That pulls events from the default MetaCalendar (the one that shows all events)

I want to only show events from one of the sub-calendars.

Can this be done?

Logged
Lindau
New Member
*

Karma: 0
Offline Offline

Posts: 30


WWW
« Reply #1 on: March 18, 2006, 04:35:00 PM »

I got it working!

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #2 on: March 18, 2006, 11:58:00 PM »

Maybe you could tell others how you managed it in case they come across you posting looking for the same answer?

Dan O.

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

Logged
Lindau
New Member
*

Karma: 0
Offline Offline

Posts: 30


WWW
« Reply #3 on: March 19, 2006, 01:09:00 AM »

I changed the name of my home page to index.shtml and I used these two lines on my home page to call two different calendars:

<!--#include virtual="/calendar/calendar.cgi?duration=30d&calendar=battmtg&template=ssi.html"-->

<!--#include virtual="/calendar/calendar.cgi?duration=120d&calendar=levels&template=ssi.html"-->

I'm using table_ssi.html. I uploaded it to the templates directory that each of my calendars uses and changed its name to ssi.html on my server. So it was uploaded to calendarscript/templates/calendars/battmtg/ and calendarscript/templates/calendars/levels/

IMPORTANT: If any of your other pages link to  your home page, remember to change their links to index.shtml

You can see the results at http://www.cert-la.com  in the New to CERT? and Advanced CERT sections.

------------------
If you're using a version of CalendarScript previous to version 3.21 you should upgrade it as previous versions contain a security flaw which could make your server vulnerable to hackers!

If you're still using an earlier version:

From Topic:   calling more than one calendar using SSI

From DanO's messages on March 20, 2002 and March 22, 2002

   In calendar.pl find the subroutine
   sub getInput {
   after the line:
   $no_session = 1;  (I changed this line to DanO's suggestion on 3/22/02)

   add this code:


      ###### ADDED to accept variables passed with SSI query string #####
      if ($ENV{'QUERY_STRING'})
         {
          $in = $ENV{'QUERY_STRING'};
          @in = split(/&/,$in);
          # First get all the raw form vars
          foreach $i (0 .. $#in) {
           $in[$i] =~ s/\+/ /g;    ($key, $val) = split(/=/,$in[$i],2);
           $key =~ s/%(..)/pack("c",hex($1))/ge;
           $val =~ s/%(..)/pack("c",hex($1))/ge;

      $in{$key} = $val;

      # Keep a record of their order, because later values take precendent
         push(@keys,$key);
      $formvars{$key} = $val;
      }

      }
      ###### End ADDED #####

[This message has been edited by LindaU (edited March 20, 2006).]

[This message has been edited by LindaU (edited March 21, 2006).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #4 on: March 19, 2006, 02:42:00 PM »

Thanks for the follow up.

BTW. Current versions of CalendarScript (3.2+) shouldn't need any modifications to the calendar.pl file itself, only the addition of the &calendar=Calendar_Name_Here to the SSI tag call.

 PS. If you're using a version of CalendarScript previous to version 3.21 you should upgrade it as previous versions contain a security flaw which could make your server vulnerable to hackers!

JFYI

Dan O.

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

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