forked from iCalcreator/iCalcreator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
summary.html
534 lines (503 loc) · 28.3 KB
/
summary.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>iCalcreator 2.20 summary</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="author" content="Kjell-Inge Gustafsson, kigkonsult, All rights reserved">
<meta name="copyright" content="2007-2014 Kjell-Inge Gustafsson, kigkonsult">
<meta name="keywords" content="ical, calendar, calender, xcal, xml, icalender, rfc2445, rfc5545, vcalender, php, create">
<meta name="description" content="iCalcreator summary" />
<style type="text/css">
body {
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : small;
MARGIN : 10px;
WIDTH : 800px;
}
h1 {
FONT-SIZE : large;
FONT-WEIGHT : bold;
}
h2 {
FONT-SIZE : large;
}
h3 {
FONT-SIZE : medium;
}
h4 {
FONT-SIZE : small;
FONT-WEIGHT : bold;
}
h5 {
FONT-SIZE : small;
FONT-WEIGHT : normal;
TEXT-DECORATION : underline;
}
pre {
BACKGROUND-COLOR: #DCDCDC;
FONT-FAMILY : monospace;
FONT-SIZE : medium;
LETTER-SPACING : 0.1em;
LINE-HEIGHT : 1.5em;
WHITE-SPACE : pre-wrap; /* css-3 */
WHITE-SPACE : -moz-pre-wrap; /* Mozilla, since 1999 */
WHITE-SPACE : -pre-wrap; /* Opera 4-6 */
WHITE-SPACE : -o-pre-wrap; /* Opera 7 */
WORD-WRAP : break-word; /* Internet Explorer 5.5+ */
}
.comment {
FONT-FAMILY : arial;
FONT-SIZE : small;
FONT-STYLE : italic;
}
</style>
</head>
<body>
<h1>iCalcreator v2.20</h1>
<p>
iCalcreator v2.20<br>
Copyright (c) 2007-2014 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
<a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
<a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se contact" target="_blank">kigkonsult.se contact</a>
</p>
<h4>Preface</h2>
<p>
This document is provided by kigkonsult for informational purposes
and is provided on an "as is" basis without any warranties expressed or implied.
</p>
<p>
Information in this document is subject to change without notice and does
not represent a commitment on the part of kigkonsult.
The software described in this document is provided under a license agreement, <a href="http://kigkonsult.se/downloads/dl.php?f=GPL">GNU Lesser General Public License</a>.
The software may be used only in accordance with the terms of that license agreement.
It is against the law to copy or use the software except as specifically allowed in the license agreement.
</p>
<p>
It is the users responsibility to ensure the suitability of the software before using it.
In no circumstances will kigkonsult be responsible for
the use of the software's outcomes or results or any loss
or damage of data or programs as a result of using the software.
The use of the software implies acceptance of these terms.
</p>
<p>
This document makes previous versions obsolete.
</p>
<h4>The software</h2>
<p>
This document describes a <b>short summary</b> usage of iCalcreator, a <em>PHP</em> software implementation of standards rfc5545/rfc5546 (rfc2445/rfc2446) to manage iCal formatted files.
</p>
<p>
iCalcreator is a <em>PHP</em> class package managing iCal files, supporting (non-)<strong>calendar</strong>
systems and applications to process and communicate <strong>calendar</strong> information like
events, agendas, tasks, reports, totos and journaling information.
</p>
<p>
The iCalcreator package, built of a <strong>calendar</strong> class with support of a function class and helper functions, are <strong>calendar</strong>
component property oriented. Development environment is <em>PHP</em> version 5.x but coding is done
to meet 4.x backward compatibility and may work. Some functions requires <em>PHP</em> >= 5.2.0.
</p>
<p>
The iCalcreator main class, utility class and helper functions are included in the "iCalcreator.class.php" file.
</p>
<p>
More iCalcreator supplementary, usage and "howto" information will be found at kigkonsult.se iCalcreator
<a href="http://kigkonsult.se/test/index.php" title="kigkonsult.se iCalcreator implement and test examples" target="_blank">coding and test</a> pages.
A strong recommendation is to have the document
<a href="http://kigkonsult.se/iCalcreator/docs/using.html" title="iCalcreator user's Manual" target="_blank">user's manual</a>
open in parallel when exploiting the link.
</p>
<h4>iCal</h4>
<p>
A short iCal description is found at <a href="http://en.wikipedia.org/wiki/ICalendar#Core_object" title="iCalendar From Wikipedia, the free encyclopedia" target="_blank">Wikipedia</a>.
If You are not familiar with iCal, read this first!
</p>
<p>
Knowledge of <strong>calendar</strong> protocol rfc5545/rfc5546 is to recommend;
</p>
<dl>
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a>
<dd>Internet Calendaring and Scheduling Core Object Specification (iCalendar)
<dd>obsoletes <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="Download RFC2445 in text format">rfc2445</a>
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
<dd>iCalendar Transport-Independent Interoperability Protocol (iTIP) Scheduling Events, BusyTime, To-dos and Journal Entries
<dd>obsoletes <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2446" title="Download RFC2446 in text format">rfc2446</a>.
</dl>
<h4>xCal</h4>
<p>
iCalcreator also supports xCal (iCal xml).
</p>
<dl>
<dt>
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc6321" title="Download RFC6321 in text format" target="_blank">rfc6321</a>
<dd>xCal: The XML Format for <strong>iCalendar</strong>
</dl>
<h4>SUPPORT</h4>
<p>
The main support channel is using iCalcreator
<a title="Sourceforge" href="http://sourceforge.net/projects/icalcreator/forums/" target="_blank">Sourceforge</a> forum.
</p>
<p>
Support and development is now focused on iCalcreator (Pro) 3.x versions, which, in turn, will affect future releases
of iCalcreator 2.x.
</p>
<p>
kigkonsult offer professional services for software support, design and new/re-development, customizations and adaptations
of <em>PHP</em>/<em>MySQL</em> solutions with focus on software lifecycle management, including long term utility, reliability and maintainability.
</p>
<h4>DONATE</h4>
<p>
You can show your appreciation for our free software,
and can support future development by making a donation to the kigkonsult GPL/LGPL projects.
</p>
<p>
Make a donation of any size by clicking <a href="http://kigkonsult.se/contact/index.php#Donate" title="Donate" target="_blank">here</a>.
Thanks in advance!
</p>
<h4>Contact</h4>
<p>
Use the <a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se/contact" target="_blank">contact page</a>
for queries, improvement/development issues or professional support and development.
Please note that paid support or consulting service has the highest priority.
</p>
<h4>Downloads and usage examples</h4>
<p>
At <a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult iCalcreator" target="_blank">kigkonsult.se</a> you can download the
<a href="http://kigkonsult.se/downloads/index.php#iCalcreator" title="iCalcreator complete manual" target="_blank">complete manual</a>
and review and explore iCalcreator usage at the
<a href="http://kigkonsult.se/test/index.php" title="kigkonsult.se iCalcreator implement and test examples" target="_blank">coding and test</a> pages.
</p>
<h4>INSTALL</h4>
<dl>
<dt>Unpack to any folder
<dd>add this folder to your include-path
<dd>or unpack to your application-(include)-folder<br>
</dl>
<p>
Add
</p>
<pre><?php
.. .
require_once './iCalcreator.class.php';
.. .
?>
</pre>
<p>
to your php-script.
</p>
<p>
When creating a new calendar(/component) object instance, review config settings.
</p>
<h2>CREATE</h2>
<pre><?php
.. .
require_once( "iCalcreator.class.php" );
$tz = "Europe/Stockholm"; // <span class="comment">define time zone</span>
$config = array( "unique_id" => "kigkonsult.se", // <span class="comment">set Your unique id, </span>
// <span class="comment">required if any component UID is missing</span>
"TZID" => $tz ); // <span class="comment">opt. set "calendar" timezone</span>
$v = new vcalendar( $config ); // <span class="comment">create a new calendar object instance</span>
$v->setProperty( "method", "PUBLISH" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "x-wr-calname", "Calendar Sample" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "X-WR-CALDESC", "Calendar Description" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "X-WR-TIMEZONE", $tz ); // <span class="comment">required of some <strong>calendar</strong> software</span>
.. .
$xprops = array( "X-LIC-LOCATION" => $tz ); // <span class="comment">required of some <strong>calendar</strong> software</span>
iCalUtilityFunctions::createTimezone( $v, $tz, $xprops ); // <span class="comment">create timezone component(-s) <b>opt. 1</b></span>
.. . // <span class="comment">based on present date</span>
.. .
$vevent = & $v->newComponent( "vevent" ); // <span class="comment">create an event <strong>calendar</strong> component</span>
$vevent->setProperty( "dtstart", array( "year" => 2007
, "month" => 4
, "day" => 1
, "hour" => 19
, "min" => 0
, "sec" => 0 ));
$vevent->setProperty( "dtend", array( "year" => 2007
, "month" => 4
, "day" => 1
, "hour" => 22
, "min" => 30
, "sec" => 0 ));
$vevent->setProperty( "LOCATION", "Central Placa" ); // <span class="comment">property name - case independent</span>
$vevent->setProperty( "summary", "PHP summit" );
$vevent->setProperty( "description", "This is a description" );
$vevent->setProperty( "comment", "This is a comment" );
$vevent->setProperty( "attendee", "[email protected]" );
.. .
$valarm = & $vevent->newComponent( "valarm" ); // <span class="comment">create an event alarm</span>
$valarm->setProperty("action", "DISPLAY" );
$valarm->setProperty("description", $vevent->getProperty( "description" );
.. . // <span class="comment">reuse the event description</span>
$d = sprintf( '%04d%02d%02d %02d%02d%02d', 2007, 3, 31, 15, 0, 0 );
iCalUtilityFunctions::transformDateTime( $d, $tz, "UTC", "Ymd\THis\Z");
$valarm->setProperty( "trigger", $d ); // <span class="comment">create alarm trigger (in UTC datetime)</span>
.. .
$vevent = & $v->newComponent( "vevent" ); // <span class="comment">create next event calendar component</span>
$vevent->setProperty( "dtstart", "20070401", array("VALUE" => "DATE"));// <span class="comment">alt. date format,</span>
// <span class="comment"> now for an all-day event</span>
$vevent->setProperty( "organizer" , "[email protected]" );
$vevent->setProperty( "summary", "ALL-DAY event" );
$vevent->setProperty( "description", "This is a description for an all-day event" );
$vevent->setProperty( "resources", "COMPUTER PROJECTOR" );
$vevent->setProperty( "rrule", array( "FREQ" => "WEEKLY", "count" => 4));// <span class="comment">weekly, four occasions</span>
$vevent->parse( "LOCATION:1CP Conference Room 4350" ); // <span class="comment">supporting parse of</span>
// <span class="comment"> strict rfc5545 formatted text</span>
.. .
.. .// <span class="comment">all calendar components are described in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="RFC5545" target="_blank">rfc5545</a></span>
.. .// <span class="comment">a complete iCalcreator function list (ex. setProperty) in <a href="http://kigkonsult.se/downloads/index.php#iCalcreator" title="iCalcreator complete manual" target="_blank">iCalcreator manual</a></span>
.. .
iCalUtilityFunctions::createTimezone( $v, $tz, $xprops); // <span class="comment">create timezone component(-s) <b>opt. 2</b></span>
// <span class="comment">based on all start dates in events</span>
// <span class="comment">(i.e. dtstart)</span>
.. .
?>
</pre>
<h2>PARSE</h2>
<h4>iCal, rfc5545 / rfc2445 </h4>
<h5>create iCalcreator object instance</h5>
<pre><?php
.. .
require_once( "iCalcreator.class.php" );
$config = array( "unique_id" => "kigkonsult.se" ); // <span class="comment">set Your unique id, </span>
.. . // <span class="comment">required if any component UID is missing</span>
$v = new vcalendar( $config ); // <span class="comment">create a new <strong>calendar</strong> object instance</span>
.. .
</pre>
<h5>when parse a local iCal file</h5>
<pre>.. .
$config = array( "directory" => "calendar", "filename" => "file.ics" );
$v->setConfig( $config ); // <span class="comment">set directory and file name</span>
$v->parse();
.. . // <span class="comment">continue process (edit, parse,select)</span>
.. . // <span class="comment"> the iCalcreator object instance</span>
.. .
?>
</pre>
<h5>or parse a remote iCal file (resource)</h5>
<pre>.. .
$v->setConfig( "url", "http://www.aDomain.net/file.ics" ); // <span class="comment">supporting parse of remote files</span>
$v->parse();
.. .
$v->sort(); // <span class="comment">ensure start date order</span>
.. . // <span class="comment">(opt., <b>NOT</b> required after parse)</span>
.. .
.. . // <span class="comment">continue process (edit, parse,select)</span>
.. . // <span class="comment"> the iCalcreator object instance</span>
.. .
?>
</pre>
<p>
On error, the parse method returns FALSE.
</p>
<h4>xCal, rfc6321 (XML)</h4>
<pre><?php
.. .
require_once( "iCalcreator.class.php" );
$config = array( "unique_id" => "kigkonsult.se" ); // <span class="comment">set Your unique id, </span>
.. . // <span class="comment">required if any component UID is missing</span>
.. .
$filename = 'xmlfile.xml'; // <span class="comment">use a local xCal file</span>
// $filename = 'http://kigkonsult.se/xcal.php?a=1&b=2&c=3';// <span class="comment"> or a remote xCal resource</span>
if( FALSE === ( $v = XMLfile2iCal( $filename, $config ))) // <span class="comment">convert the XML resource</span>
exit( "Error when parsing $filename" ); // <span class="comment"> to an iCalcreator object instance</span>
.. . // <span class="comment">continue process (edit, parse,select)</span>
.. . // <span class="comment"> the iCalcreator object instance</span>
.. .
?>
</pre>
<h2>EDIT</h2>
<pre><?php
.. .
require_once( "iCalcreator.class.php" );
$config = array( "unique_id" => "kigkonsult.se" // <span class="comment">set Your unique id,</span>
, "directory" => "calendar" // <span class="comment">import directory</span>
, "filename" => "file.ics" ); // <span class="comment"> and file name</span>
$v = new vcalendar( $config ); // <span class="comment">create a new calendar object instance</span>
$v->parse();
$v->setProperty( "method", "PUBLISH" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "x-wr-calname", "Calendar Sample" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "X-WR-CALDESC", "Calendar Description" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
while( $vevent = $v->getComponent( "vevent" )) { // <span class="comment">read events, one by one</span>
$uid = $vevent->getProperty( "uid" ); // <span class="comment">uid required, one occurrence</span>
.. . // <span class="comment"> (unique id/key for component)</span>
$dtstart = $vevent->getProperty( "dtstart" ); // <span class="comment">dtstart required, one occurrence</span>
.. .
if( $description = $vevent->getProperty( "description", 1 )) { // <span class="comment">opt. description, 1st occurrence</span>
.. . // <span class="comment">edit the description</span>
$vevent->setProperty( "description", $description, FALSE, 1 ); // <span class="comment">update/replace the description</span>
}
while( $comment = $vevent->getProperty( "comment" )) { // <span class="comment">optional comments</span>
.. . // <span class="comment">manage comments</span>
}
.. .
while( $vevent->deleteProperty( "attendee" ))
continue; // <span class="comment">remove all ATTENDEE properties .. .</span>
.. .
$v->setComponent ( $vevent, $uid ); // <span class="comment">update/replace event in calendar</span>
// <span class="comment"> with <b>UID</b> as key</span>
}
.. .
.. .// <span class="comment">a complete iCalcreator function list (ex. getProperty, deleteProperty) in <a href="http://kigkonsult.se/downloads/index.php#iCalcreator" title="iCalcreator complete manual" target="_blank">iCalcreator manual</a></span>
.. .
?>
</pre>
<br>
<br>
<h2>SELECT</h2>
<pre><?php
.. .
require_once( "iCalcreator.class.php" );
$config = array( "unique_id" => "kigkonsult.se" ); // <span class="comment">set Your unique id</span>
$v = new vcalendar( $config ); // <span class="comment">create a new <strong>calendar</strong> object instance</span>
$v->setConfig( "url", "http://www.aDomain.net/file.ics" ); // <span class="comment">iCalcreator also support remote files</span>
$v->parse();
$v->setProperty( "method", "PUBLISH" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "x-wr-calname", "Calendar Sample" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "X-WR-CALDESC", "Calendar Description" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
.. .
?>
</pre>
<h4>Date based select</h4>
<pre><?php
.. .
$eventArray = $v->selectComponents(); // <span class="comment">select components occurring <b>today</b></span>
// <span class="comment">(including components</span>
// <span class="comment">with recurrence pattern)</span>
foreach( $eventArray as $year => $yearArray) {
foreach( $yearArray as $month => $monthArray ) {
foreach( $monthArray as $day => $dailyEventsArray ) {
foreach( $dailyEventsArray as $vevent ) {
$currddate = $event->getProperty( "x-current-dtstart" );
// <span class="comment">if member of a recurrence set</span>
// <span class="comment">(2nd occurrence etc)</span>
// <span class="comment">returns array( </span>
// <span class="comment"> "x-current-dtstart"</span>
// <span class="comment"> , (string) date(</span>
// <span class="comment"> "Y-m-d [H:i:s][timezone/UTC offset]"))</span>
$dtstart = $vevent->getProperty( "dtstart" ); // <span class="comment">dtstart required, one occurrence,</span>
// <span class="comment"> (orig. start date)</span>
$summary = $vevent->getProperty( "summary" );
$description = $vevent->getProperty( "description" );
.. .
.. .
}
}
}
}
.. .
?>
</pre>
<h4>Select specific property values</h4>
<pre><?php
.. .
$valueOccur = $v->getProperty( "RESOURCES" ); // <span class="comment">fetch specific property</span>
// <span class="comment">(unique) values and occurrences</span>
// <span class="comment">ATTENDEE, CATEGORIES, CONTACT,</span>
// <span class="comment">DTSTART, LOCATION, ORGANIZER,</span>
// <span class="comment">PRIORITY, RESOURCES, STATUS,</span>
// <span class="comment">SUMMARY, UID, URL,</span>
// <span class="comment">GEOLOCATION<sup>*</sup></span>
foreach( $valueOccur as $uniqueValue => $occurCnt ) {
echo "The RESOURCES value <b>$uniqueValue</b> occurs <b>$occurCnt</b> times<br />";
.. .
}
.. .
?>
</pre>
<p>
<sup>*</sup>) Using the non-standard directive "GEOLOCATION", iCalcreator returns output supporting
ISO6709 "Standard representation of geographic point location by coordinates",
by combining the "LOCATION" and "GEO" property values (only if "GEO" is set).
</p>
<h4>Select components based on specific property value</h4>
<pre><?php
.. .
$selectSpec = array( "CATEGORIES" => "course1" );
$specComps = $v->selectComponents( $selectSpec ); // <span class="comment">selects components</span>
// <span class="comment">based on specific property value(-s)</span>
// <span class="comment">ATTENDEE, CATEGORIES, CONTACT,</span>
// <span class="comment">LOCATION, ORGANIZER,</span>
// <span class="comment">PRIORITY, RESOURCES, STATUS,</span>
// <span class="comment">SUMMARY, URL, UID</span>
foreach( $specComps as $comp ) {
.. .
}
.. .
?>
</pre>
<br>
<br>
<h2>OUTPUT</h2>
<h5>create iCalcreator object instance</h5>
<pre><?php
.. .
require_once( "iCalcreator.class.php" );
$config = array( "unique_id" => "kigkonsult.se" ); // <span class="comment">set Your unique id</span>
$v = new vcalendar( $config ); // <span class="comment">create a new calendar object instance</span>
$v->setProperty( "method", "PUBLISH" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "x-wr-calname", "Calendar Sample" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "X-WR-CALDESC", "Calendar Description" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
$v->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" ); // <span class="comment">required of some <strong>calendar</strong> software</span>
.. .
.. . // <span class="comment">continue process (edit, parse,select)</span>
.. . // <span class="comment"> the iCalcreator object instance</span>
.. .
?>
</pre>
<h5>opt 1</h5>
<pre><?php
.. .
$v->returnCalendar(); // <span class="comment">redirect calendar file to browser</span>
?>
</pre>
<h5>opt 2</h5>
<pre><?php
.. .
$config = array( "directory" => "depot", "filename" => "calendar.ics" );
$v->setConfig( $config ); // <span class="comment">set output directory and file name</span>
$v->saveCalendar(); // <span class="comment">save calendar to (local) file</span>
.. .
?>
</pre>
<h5>opt 3, xCal</h5>
<pre><?php
.. .
$mlstr = iCal2XML( $v ); // <span class="comment">create well-formed XML, rfc6321</span>
.. .
?>
</pre>
<br>
<br>
<h2>COPYRIGHT AND LICENSE</h2>
<h4>Copyright</h4>
<p>
iCalcreator v2.20<br>
Copyright (c) 2007-2014 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
<a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
<a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se contact" target="_blank">kigkonsult.se contact</a>
</p>
<h4>License</h4>
<p>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
</p>
<p>
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
</p>
<p>
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
or download it <a href="http://kigkonsult.se/downloads/dl.php?f=LGPL" target="_blank">here</a>.
</p>
<br>
<br>
</body>
</html>