Forum Moderators: coopster

Message Too Old, No Replies

PHP/MySQL calendar system & WebDAV

iCalendar

         

Psycho Mantis

1:10 pm on Dec 7, 2006 (gmt 0)

10+ Year Member



Hi all!

I have a PHP/MySQL-based event calendar system on my website. It's mostly homemade and serves my needs.

As a Mac user and fan of iCal, I was wondering, if it was possible to somehow export my calendar to an iCalendar format so that the visitors of my website could download the calendar to their home computer.

Unfortunately, I don't know too much about WebDAV, iCalendar, etc. and therefore don't quite understand what it takes to dynamically create such a file.

Thanks in advance for your input! :)

mcibor

2:25 pm on Dec 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you can create the file, send the appropriate headers for downloading and voile!

The internal file structure you can find at
[ietf.org...]

and example (however in Python)

[codespeak.net...]

Regards
Michal

[edited by: mcibor at 2:28 pm (utc) on Dec. 7, 2006]

whoisgregg

2:28 pm on Dec 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's also an open source PHP based iCal parser out there that will display your iCal files on the web in a similar look to the Mac app. Not sure of the name off hand... :/

mcibor

2:33 pm on Dec 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Parser:
[sourceforge.net...]

ICal under php
[phpicalendar.net...]

and this is what you're looking for
[phpicalendar.net...]

Michal

Psycho Mantis

7:39 pm on Dec 7, 2006 (gmt 0)

10+ Year Member



Thanks for your input. :)

What I want to do is the other way around from what you, whoisgregg, said. I have an online event calendar system (multiple users, online editing, etc.), which I'd like people to be able to download to their iCal-apps.

I found this class [phpclasses.org] which might be the one I'm looking for. Correct?

Thanks. :)

whoisgregg

9:21 pm on Dec 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That looks like it would do the trick. :)

The iCal file format is an open format [tools.ietf.org], so you can always just build something from scratch. Although I once spent 20 hours over a weekend trying to write something using that specification a year or so ago before the headache got so bad I had to stop and shelf the project. If only I'd found that class back then. :/

Psycho Mantis

12:15 pm on Dec 8, 2006 (gmt 0)

10+ Year Member



I tried to make the script work, but failed. After contacting the developer (who said the script was GPL and he won't continue working on the script) I know why: It requires PHP 5 and on my server only PHP 4 is installed.

Is there a way to still make the script work?

whoisgregg

2:33 pm on Dec 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll need to turn on error reporting [php.net] and find out which functions are undefined. Then check PHP Compat [pear.php.net] for those functions. If they exist, download them and include them in your script. If they don't exist there, write your own that replicate the behavior described on the functions manual page.

Psycho Mantis

3:13 pm on Dec 8, 2006 (gmt 0)

10+ Year Member



Thanks!

Unfortuately, still no luck here.
This is the error I'm getting:

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /.amd_mnt/server17.loop/export/www/vhosts_main/tu/htdocs/fb7/isr/termine/classes/class.iCal.inc.php on line 73

I could locate 'T_OLD_FUNCTION' in the PHP-Compat package, but not the other two.

I added (accordingly to the Compat manual)

require_once '/.amd_mnt/server17.loop/export/www/vhosts_main/tu/htdocs/fb7/isr/termine/classes/PHP_Compat/Compat.php';
PHP_Compat::loadConstant('T_OLD_FUNCTION');

to the class.iCal.inc.php from the iCal classes package. The error remains.

[edited by: Psycho_Mantis at 3:14 pm (utc) on Dec. 8, 2006]

Psycho Mantis

10:35 am on Dec 11, 2006 (gmt 0)

10+ Year Member



Sorry for bumping this thread.

Anyone?

Help! :-)