Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iCal feed for opencats calendar - contribution from the forums #13

Open
RussH opened this issue Sep 20, 2018 · 7 comments
Open

iCal feed for opencats calendar - contribution from the forums #13

RussH opened this issue Sep 20, 2018 · 7 comments
Assignees

Comments

@RussH
Copy link
Member

RussH commented Sep 20, 2018

from@dveos on the forum http://forums.opencats.org/viewtopic.php?f=2&t=572

Url works as follows:- http://site.url/ajax.php?f=iCalFeed&s=###&u=LOGINUSERNAME&p=LOGINPASSWORD

Replace the ### with your site id and the other url parts
lib.zip

@RussH RussH self-assigned this Sep 20, 2018
@robinrosenstock
Copy link

Is this functionality coming into OpenCATS?

@ManuelNL
Copy link

Interesting but a proper explanation how to use this feature would be nice

@RussH
Copy link
Member Author

RussH commented Oct 26, 2018

HI guys,

For now - the test instructions are to unzip the attached zip file into your root directory. Then hit the URL above to see your calendar feed. This was additional functionality commissioned by a user and in use in their instance.

@tonysamer2020
Copy link

can you please provide more details?
what is sit id?
where to add this file?

@ManuelNL
Copy link

ManuelNL commented Feb 21, 2021

can you please provide more details?
what is sit id?
where to add this file?

When you Unzip the downloaded file lib.zip you find a file Lib with two directories: Ajax and Lib.
Copy the files from those directories into the corresponding directories in the rooth of OpenCats. So if you open Ajax you find ïCalFeed.php. Copy this file into Ajax in the root of OpenCats.
Do the same with the file in the Lib directory and copy it to the Lib directory in the root of OpenCats

Now the URL, the hard part. :-)

http://site.url/ajax.php?f=iCalFeed&s=###&u=LOGINUSERNAME&p=LOGINPASSWORD

I think it's clear how to enter the site url and the login and username of the calander you want to use.
But what is a "site ID"?
Well I didn't know but knew I would find it in the Database and so I did.
When you open the database wit phpMyAdmin you find a table called "user". When you open it you will see the "site_id". In mine case all users have a site_id "1" Don't ask me why.

You can check your link by putting the url in you browser and a "calander.ics" file is created and possible to download. Download and open it in a teksteditor (notepad or notepad++) to see if the file is filled with your appointments.

My file with one appointment looked like this

BEGIN:VCALENDAR
METHOD:PUBLISH
VERSION:2.0
PRODID:-//Fenland Software//Calendar Feed//EN
BEGIN:VEVENT
SUMMARY:Intake
DESCRIPTION:Test with iCal
UID:66@_HERE YOU FIND YOUR URL
DTSTART:20210308T150000Z
DTEND:20210308T160000Z
LAST-MODIFIED:20210221T132117Z
END:VEVENT
END:VCALENDAR

I used the link in Outlook and it worked. The appointment showed up but .... was set one hour later. Must be a setting :-)

@RussH
Copy link
Member Author

RussH commented Feb 21, 2021

regarding the time difference - unfortunately it works fine for me..

possibly to resolve it (in iPhone);
Settings > Calendars

there is a option called "Time Zone override". Change the time zone from a GMT +- setting to your actual city.

View Calendar and you should observe that the meeting times are now correct.

@RussH RussH transferred this issue from opencats/OpenCATS Sep 2, 2022
@DHCPizza
Copy link

To address the time zone issue:
In ajax/iCalFeed.php
You can make it relative to your time zone by editing one line and deleting the "\Z". This is forcing it to be UTC/Zulu time.
Change
define('DATE_ICAL', 'Ymd\THis\Z');
to
define('DATE_ICAL', 'Ymd\THis');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants