![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Using iCal 1.5 with WebDAV and PHPiCal 1.1 |
|||
Version 10.3 |
|||
| Conventions used in this workbook | File names and file paths Since file paths in Mac OS X are delimited by the / character references to directories (folders in the Finder) will use the directory names with the slash ( / ) character in between. The beginning of the file system or the top level of the hard drive is noted as just the slash ( / ) character by itself. Whenever a file path is cited that begins with a slash that indicates the beginning of the file system or root of the file system. If I’m referring to the Applications folder of the main boot partition called Macintosh HD then I would indicate that path as: /Applications. Literals The Courier font in bold will denote literal input Bachus-Naur Form or BNF BNF is a standard syntax for logic especially when used in pseudocode for programming. The only use of it here is where values in between the < > characters are meant to be substituted with other non-literal values. In other words using what appears between the < > characters won’t work; you’ll have to substitute something. |
||
| |
|
|
|
Exercise 0.9.5Setup your web site with WebDAV
|
Before you can start publishing your iCal files on the Internet you’ll need a domain name. These insructions assume you already have a domain name and a Mac OS X Server running Mac OS X Server v10.3.x. You will need at least one domain served by the web server process on your server. If you haven’t already you should read the entire guide on web services for Mac OS X in the Mac OSX Server Web Technologies Administration manual. It is a free PDF you can get here: http://docs.info.apple.com/article.html?artnum=107912 You’ll also need a client copy of Mac OS X with a reasonably current copy of iCal. All references here are from iCal v1.5.2 |
||
| 1 |
Launch Server Admin and login to the machine that will be your web server | ||
| 2 |
Under the Computers &
Services list select the server and click on the disclosure
triangle. |
||
| 3 |
Select Web |
||
| 4 |
Click on Settings |
||
| 5 |
Click on the Modules tab towards
the top of the screen and make sure the dav_module (mod_dav.c) and the
php4_module (mod_php4.c) are enabled. If you haven't already enable the apple_digest_module. Click Save![]() |
||
| 6 |
Click on the Sites tab near the
top. We’ll make a new site called ical.l3training.com. You
can use the default web site or make a new one.![]() |
||
| 7 |
Click on + button to add a site | ||
| 8 |
![]() Enter a valid domain name and choose the IP address you want this site to answer on. We’ll choose any. We’ll also leave the port at 80. The big deal here is to make sure the Web folder: is pointing to the right place. You may have to login to your server to create this folder. This will be the folder we will copy the phpicalendar 1.1 files into. Click Save when you’re done. |
||
| 9 |
Click on the Options tab and
enable the WebDAV check box. |
||
| 10 |
Click on the Realms tab and
click the + button near the bottom |
||
| 11 |
Make the realm name ical.
Set the authorization to digest. Make sure the folder for the
realm is the same folder and the Web folder chosen in step 10 above. |
||
| 12 |
Now we need to make sure
somebody can publish files here. Everyone is already entered. |
||
| 13 |
Click on the Users & Groups
button and choose a user that will have access to publish iCal
calendars. Drag the users’s name entry from the Users &
Groups drawer to the right side of the screen under Can Browse Can
Author section |
||
| 14 |
Enable the Can Browse and Can
Author checkboxes for your user. If you want to allow anonymous
access to your calendar you will need to enable the Can Browse check
box for Everyone.![]() |
||
| 15 |
Click Save |
||
Exercise 1.1Download and "install" phpiCalendar |
1 |
You will need to download the
latest version of PHPiCalendar which is version 1.1 as of this writing. You can find PHPiCalendar here: http://prdownloads.sourceforge.net/phpicalendar/phpicalendar-1.1.zip?download |
|
| 2 |
The zip file should be expanded
automatically by Stuffit Expander. |
||
| 3 |
Locate the folder you created or
referenced in step 10 of exercise 0.9.5. |
||
| 4 |
Copy the expanded files from
inside the phpicalendar-1.1 folder on your Desktop to the newly created
ical folder on your web server. ![]() |
||
| 5 |
You’ll need to make sure that
the phpicalendar folder defined as the realm is owned by the user and
group called ‘www’ this is a pre-defined system level group and user.
WebDAV won’t work if the permissions are wrong. Use Workgroup
Manager to fix the permissions. Launch Workgroup Manager & authenticate to you server |
||
| 6 |
Click on Sharing |
||
| 7 |
Click on the All tab and
navigate to your folder somewhere inside /Library/WebServer/Documents/ |
||
| 8 |
Set the owner and group to www
with Read & Write privileges |
||
| 9 |
|
||
| 10 |
Click the Copy button next to
"Copy these privileges to enclosed items" |
||
Exercise 2.1Publishing Your Calendar |
1 |
Switch to your client
machine. Launch iCal |
|
| 2 |
Create a new calendar![]() |
||
| 3 |
Select today’s date and
double-click to make a new event or, if you’re in week view drag across
a range of time to make an event. Name the event something
interesting |
||
| 4 |
Choose Publish… from the
Calendar menu |
||
| 5 |
Change the Publish Calendar
pop-up from ‘on .Mac’ to ‘on a WebDAV server’ Don’t put spaces in
the publish name like I did.![]() |
||
| 6 |
Enter the base URL and include
the path to the calendars: http://ical.L3Training.com/calendars |
||
| 7 |
Enter the user name and password
for the user defined to have access to the WebDAV realm you defined in
step 16 of Exercise 0.9.5 |
||
| 8 |
If all goes well you'll see the
success dialog box. Web servers don't like spaces in file names. Because of this the file has been renamed. Instead of a space there is a 32 - so I get the file named L332Training.ics. The value for my default calendar in my config.inc.php file is that name (L332Training.ics) minus the .ics suffix.
![]() |
||
Exercise 3.1Tweak the config.inc.php file & Test out the Calendar |
1 |
Open Safari and point your web
browser at your calendar site – mine is http://ical.L3Training.com |
|
| 2 |
Make sure the web page
loads. If it doesn’t you should check the file permissions
and check to make sure the PHP modules are loaded. |
||
| 3 |
Look on your site for today’s
event – created in step 3 of Exercise 2.1 |
||
| 4 |
Now it’s time to make your
calendar the default calendar. |
||
| 5 |
Open the file config.inc.php in
your favorite text editor. |
||
| 6 |
Find the entry for $default_path
– change the value in quotes to the URL for your server – mine is
“http://ical.L3Training.com”![]() |
||
| 7 |
You may want to change the
$default_cal variable to the exact name of your calendar and remove all
the sample calendars from the /calendar directory inside your
phpicalendar folder in your web site’s document root. The exact name of your calendar can be seen in the screen shot from step 8 of Exercise 2.1 - just remove the .ics suffix. |
||
| 8 |
Save the file – you may have to
fix the permissions here. |
||
| 9 |
Check your page again in your
web browser. |
||