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
Calendar Script CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)Pulling events from different calendars
Pages: [1]   Go Down
Print
Author Topic: Pulling events from different calendars  (Read 452 times)
0 Members and 1 Guest are viewing this topic.
DavidH
Guest
« on: September 28, 2004, 02:57:00 PM »

I am running several seperate calendars on my web site. I would like to pull the events from all the calendars (for a given day) and display the events in a list form. I need to know how to sort out the events.txt and schedule.text data and decipher the numbers so I can display the current day.

My thoughts were to loop through each text file and select the current days' events. I will be using PHP for scripting.
However, I can't seem to figure out the relational query to do that.

Any ideas? Thanks

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: September 28, 2004, 03:38:00 PM »

Deriving the event schedules can be very complex matter, I do not know how you'd accomplish it without using CalendarScript's functions.

** Any ideas? **

Install the Meta Calendar plug-in available at the Unofficial CalendarScript - Mods and Plugins site and then call the defined meta calendar and ssi.html template with a simulated SSI call.

JMO

Dan O.

[This message has been edited by DanO (edited September 28, 2004).]

Logged
DavidH
Guest
« Reply #2 on: September 30, 2004, 08:27:00 AM »

Thanks for your response, DanO

I have installed the meta calendar, but I may have not edited the file correctly, I'm getting errors. I will take care of that issue.
However, if you wouldn't mind, could you explain the server side template and the simulated call procedure. I'm a little unclear on what that entails and what that will produce.

Thanks.

David

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: September 30, 2004, 12:50:00 PM »

** could you explain the server side template and the simulated call procedure. I'm a little unclear on what that entails and what that will produce. **

If you call your calendar like ...calendar.pl?template=ssi.html you will see basically what the SSI display looks like.

You can see one SSI call where the template variables are passed to the script in my second reply posted in the previous forum message "SSI head ache". You would have to duplicate that using PHP code.

Dan O.

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

Logged
DavidH
Guest
« Reply #4 on: October 05, 2004, 02:44:00 PM »

Dan:

Thanks, so far so good. I've managed to call the ssi.html and even sort out the page (in PHP)to only show a specific date. The problem I've run into is that it only shows the current month. I realize that it is using calendarscript.pl to establish the curent month.

Which brings me to the next issue: I need to be able to change the month in the ssi.html page. Visitors will need to able to look at an upcoming day. This could prove difficult on ,let's say, October 31 when they wish to see November. I need to tell the calendar which month's events to place in the ssi.html.

This is the link to move to a specific month but I have been unable to string together a proper call. district/calendar.pl?calendar=&month=11

This is the url call that displays the requested date in the ssi.html page (with variables I've set in the script). calendar.pl?template=ssi.html&day_var=Monday&month_var=October&dd_var=4

Thanks again for your help.

David

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 05, 2004, 06:30:00 PM »

** The problem I've run into is that it only shows the current month. **

If you call the template with a duration of a number of days, it should return that number of days' events regardless if they fall within a single month or not. Try it using a duration of 45d and see what you get (assuming there are events posted that far ahead).

It is only when calling the template without a duration parameter that it defaults to the current month.

Dan O.


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

Logged
DavidH
Guest
« Reply #6 on: October 18, 2004, 03:59:00 PM »

DanO: Your suggestions really helped. Thanks.

The solution is too long to post but if anyone would like to see the php code, email me at harrisdp@unit5.org. I'd be happy to share.

David

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