PHP icalendar | Google Calendar and PHP icalendar | MRBS Room booking Calendar |
|
Below are directions for using SFU's Fraser server to parse ical and sunbird calendar files. Additional help for php icalendar is available from http://phpicalendar.net/forums/ and http://phpicalendar.net/documentation/. My directions are for Macintosh OS X but can easily be modified for any connection to Fraser. These work for me but I do not guarantee that they will work for you, or that they will meet your security needs.
A) Open a Terminal window and SSH to your SFU UNIX account (fraser). Follow ACS instructions for creating a secure server at http://www.sfu.ca/acs/sfuwebhelp/cgi.htm, I have the basic information below with additional information helpful for php icalendar.
ssh YOURACCOUNT@fraser.sfu.ca
mkdir sec_html
chmod 711 sec_html
cd sec_html
mkdir biology (or whatever you want your directory to be called)
B) Download and extract phpicalendar http://sourceforge.net/projects/phpicalendar/ on your computer.
C) Connect to afp://YOURACCOUNT@home.sfu.ca/ (with OS X) or ftp://YOURACCOUNT@ftp.sfu.ca/
D) Open the directory you created (sec_html/whatever) and transfer the extracted files. Use TextWrangler to open and modify files:
E1) A new first line of program files needs to be added to 12 .php files:
#!/usr/local/bin/php
index.php
week.php
month.php
day.php
year.php
print.php
search.php
preferences.php
[Do not add it to config.inc.php or error.php]
includes/todo.php
includes/event.php
includes/login.php
admin/index.php
E2) Modify config.inc.php-
F) Change permissions for directories and files- search/replace YOURACCOUNT & biology in the 22 lines of commands below, then you may copy and paste them all at once in your terminal window
chmod 711 /home/YOURACCOUNT/sec_html/biology
chmod 711 /home/YOURACCOUNT/sec_html/biology/rss
chmod 711 /home/YOURACCOUNT/sec_html/biology/includes
chmod 711 /home/YOURACCOUNT/sec_html/biology/admin
chmod 711 /home/YOURACCOUNT/sec_html/biology/images
chmod 711 /home/YOURACCOUNT/sec_html/biology/languages
chmod 711 /home/YOURACCOUNT/sec_html/biology/calendars
chmod 711 /home/YOURACCOUNT/sec_html/biology/templates
chmod 711 /home/YOURACCOUNT/sec_html/biology/templates/default
chmod 711 /home/YOURACCOUNT/sec_html/biology/templates/default/images
chmod 711 /home/YOURACCOUNT/sec_html/biology/functions
chmod 700 /home/YOURACCOUNT/sec_html/biology/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/rss/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/includes/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/admin/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/languages/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/calendars/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/functions/*.php
chmod 644 /home/YOURACCOUNT/sec_html/biology/images/*.gif
chmod 644 /home/YOURACCOUNT/sec_html/biology/calendars/*.ics
chmod 644 /home/YOURACCOUNT/sec_html/biology/templates/default/*.*
chmod 644 /home/YOURACCOUNT/sec_html/biology/templates/default/images/*.gif
G) Now you should be able to go to a web browser and view the included calendars-
https://cgi.sfu.ca/~YOURACCOUNT/whatever
https://cgi.sfu.ca/~science/biology
H) I replace the calendars in the calendar folder with a small calendar file (such as Canadian holidays or a Lunar calendar) as Fraser does not support webdav (and iCal/Sunbird do not do FTP). [I have not got it to work with only web calendars, but I have blacklisted the single file successfully ($blacklisted_cals[]]
I) You may automatically publish your iCal or Sunbird calendar(s) to your SFU webdav space and place a link to it in config.inc.php.
J) You may create a link to your Google calendar- as of August 2006 you must modify the ical_parser.php file to show duration of repeating events. Directions are at http://www.sfu.ca/biology2/facilities/computer/calendar/phpical-google-calendar.html