#808 CSV plugin

Parent Category:
Calendar plugins
Last Updated:
Allon Moritz, Thursday, 09 April 2020 15:36 (Thursday, 09 April 2020)
Thursday, 08 May 2014 15:26 (Thursday, 08 May 2014)


The CSV plugin creates out of a CSV file, events which can be displayed in DPCalendar. The file can be locally on your web server it can be a link to a website that automatically produces the proper formatted output.

If the file is on your server it must have proper permissions to access it. Make sure that the file is accessible to DPCalendar through your Joomla hosting server. If the file is not physically on your server you can define an url like http://example.com/data/test.csv To get remote files the server must be able to open connections to the remote server. Ask your hosting company first if outbound connections are included in your hosting plan.

File Format

The CSV plugin comes with an example file which has a structure that works out of the box. For every CSV calendar you can define a column name which is mapped to an event attribute. For example if the title of the event is in a column with the name csv_title then fill that value as option in the external calendar configuration.

The following example should give you a rough idea about the structure. The first row defines always the columns of the file.

"Yearly","yearly","FREQ=YEARLY;UNTIL=20200514T000000Z","2007-05-23 14:12:35","2007-05-23 14:22:35","0",,"27CC37",,"Sample description"
"single event","single-event",,"2007-05-29 22:00:00","2007-05-29 22:20:00","0",,"A32929",,
"All day event","allday",,"2007-05-29 00:00:00","2007-05-30 00:00:00","1",,"A32929",,
"Weekly Demo Events","weekly","FREQ=WEEKLY;BYDAY=TU,TH,SA;COUNT=1000","2014-04-10 20:00:00","2007-07-10 22:30:00","0","New York",,"http://www.digital-peak.com","<p>Desc</p><ul><li>with HTML</li><li>content</li></ul><p><strong>Strong text</strong></p>"
"Daily event","daily","FREQ=DAILY","2007-07-10 20:00:00","2007-07-11 01:30:00","0","London",,"http://joomla.digital-peak.com","<p>Desc</p><ul><li>with HTML</li><li>content</li></ul><p><strong>Strong text</strong></p>"

Libre Office, Openoffice or Excel

CSV files are easier to work with using Excel or Libre Office spreadsheets. In either case the file will be broken down into cells. Make sure to always save the file as a CSV (comma separated values) file. Not as a spreadsheet, xlsx or ods, file. These are binary files and can't be read by PHP.

DPCalendar Options

These settings are the same for every calendar configured in the plugin.

Uri [Type: Text]
An uri to an online file like http://www.example.com/files/data.csv or a local path like plugins/dpcalendar/csv/examples/example.csv. If the uri is a file and starts with a '/' DPCalendar will interprete it as an absolute path otherwise relative to the joomla installation folder.
Delimiter [Type: Text] [Default: ,]
The delimiter of the CSV file.
Enclosure [Type: Text] [Default: "]
The enclosure of the CSV file.
Has Header Row [Type: Radio] [Default: Yes]
Does the CSV file has a header row.
The following options are available:
  1. Yes
  2. No
Start Date Column [Type: Text] [Default: start_date]
The column for the start date.
End Date Column [Type: Text] [Default: end_date]
The column for the end date.
Show End Time Column [Type: Text] [Default: show_end_time]
The column for the show end time.
All Day Column [Type: Text] [Default: all_day]
The column for the all day.
Title Column [Type: Text] [Default: title]
The column for the title.
Description Column [Type: Text] [Default: description]
The column for the description.
RRule Column [Type: Text] [Default: rrule]
The column for the recurrence rule.
Location Column [Type: Text] [Default: location]
The column for the location.
Url Column [Type: Text] [Default: url]
The column for the url.
Alias Column [Type: Text] [Default: alias]
The column for the alias.
Colour Column [Type: Text] [Default: color]
The column for the colour.

Plugin Options

Caching [Type: List] [Default: Joomla]
Select whether to cache the calendar data.
The following options are available:
  1. Joomla
  2. Database
  3. Never
Cache Time [Type: Text] [Default: 900]
The time for the cache in sec.
Sync Start [Type: Text] [Default: -3 year]
The relative start date to sync from.
Sync End [Type: Text] [Default: +3 year]
The relative end date to sync from.
Sync Steps [Type: Text] [Default: 1 year]
The sync steps.

Comments (0)

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.