dolibarr  9.0.0
Functions
xcal.lib.php File Reference

Function to manage calendar files (vcal/ical/...) More...

Go to the source code of this file.

Functions

 build_calfile ($format, $title, $desc, $events_array, $outputfile)
 Build a file from an array of events All input params and data must be encoded in $conf->charset_output. More...
 
 build_rssfile ($format, $title, $desc, $events_array, $outputfile, $filter='')
 Build a file from an array of events. More...
 
 format_cal ($format, $string)
 Encode for cal export. More...
 
 calEncode ($line)
 Cut string after 75 chars. More...
 
 quotedPrintEncode ($str, $forcal=0)
 Encode into vcal format. More...
 
 quotedPrintDecode ($str)
 Decode vcal format. More...
 

Detailed Description

Function to manage calendar files (vcal/ical/...)

Definition in file xcal.lib.php.

Function Documentation

◆ build_calfile()

build_calfile (   $format,
  $title,
  $desc,
  $events_array,
  $outputfile 
)

Build a file from an array of events All input params and data must be encoded in $conf->charset_output.

Parameters
string$format'vcal' or 'ical'
string$titleTitle of export
string$descDescription of export
array$events_arrayArray of events ('eid','startdate','duration','enddate','title','summary','category','email','url','desc','author')
string$outputfileOutput file
Returns
int <0 if ko, Nb of events in file if ok

Definition at line 35 of file xcal.lib.php.

◆ build_rssfile()

build_rssfile (   $format,
  $title,
  $desc,
  $events_array,
  $outputfile,
  $filter = '' 
)

Build a file from an array of events.

All input data must be encoded in $conf->charset_output

Parameters
string$format'rss'
string$titleTitle of export
string$descDescription of export
array$events_arrayArray of events ('uid','startdate','summary','url','desc','author','category')
string$outputfileOutput file
string$filterFilter
Returns
int <0 if ko, Nb of events in file if ok

Definition at line 295 of file xcal.lib.php.

◆ calEncode()

calEncode (   $line)

Cut string after 75 chars.

Add CRLF+Space. line must be encoded in UTF-8

Parameters
string$lineString to convert
Returns
string String converted

Definition at line 428 of file xcal.lib.php.

◆ format_cal()

format_cal (   $format,
  $string 
)

Encode for cal export.

Parameters
string$formatvcal or ical
string$stringstring to encode
Returns
string string encoded

Definition at line 398 of file xcal.lib.php.

◆ quotedPrintDecode()

quotedPrintDecode (   $str)

Decode vcal format.

Parameters
string$strString to convert
Returns
string String converted

Definition at line 516 of file xcal.lib.php.

◆ quotedPrintEncode()

quotedPrintEncode (   $str,
  $forcal = 0 
)

Encode into vcal format.

Parameters
string$strString to convert
int$forcal1=For cal
Returns
string String converted

Definition at line 479 of file xcal.lib.php.