Skip to content

EelcoA/events-manager-file-upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Events Manager File Upload

A non-official 'Events Manager' add-on to import events from a CSV file, Github page: https://github.com/EelcoA/events-manager-file-upload

Dependencies

  • PHP 8.1.14
  • Wordpress, latest tested version: 6.1.1
  • Event Manager, latest tested version: 6.3
  • JwRender, 1.0.8

Warning

This plugin is NOT created by the people of Events Manager (https://wordpress.org/plugins/events-manager/). It is created because we needed a simple but efficient csv file import function.

Installation

As long as this plugin is not available in the Wordpress plugin repositories, install it by:

Functionality

The user can upload a .csv file with events to be imported. Before importing the events, they are shown to the user. Then the user gives the command to import the data. The result is shown to the user after importing the events. It shows which events were created and which ones failed, including the reason.

Input file

A .csv file containing the following fields in this order:

Field Format Required
event_start_date YYYY-MM-DD yes
event_start_time hh:mm:ss yes
event_end_date YYYY-MM-DD no, if empty, start date is taken
event_end_time hh:mm:ss no, if empty, start time is taken
event_name text yes
post_excerpt text no
post_content text yes
location-slug text yes, must exist
category-slug text yes, must exist
checks
  1. duplicates - when an event already exists with the same location, event_name, start date and start time the event is not created and an error is shown in the result page.
Screenprints
  1. Browse for csv file to upload alt text

  2. Show preview uploaded events from file alt text

  3. Show result processing the events with some errors and some successfull creations. alt text

Example file

There is a file with example data in the doc directory.

That file is created by a webpage scraper, written in python, using Scrapy. If you want to see how that works, see my other github project: https://github.com/EelcoA/fabriekscraper

Author