CSV import events and locations

Go in the EME events section and open up the import section there. Special care is to be taken when importing events, since many columns and properties exist, so importing events or locations takes time. Any suggestion or improvement to this doc is greatly appreciated.

Import events or locations
Importing events or locations into EME is done by using a CSV file (csv delimiter and encloser can be specified during import).
The first line should indicate the names of the columns being imported. Currently the names that are recognized (there are just too many columns to name them all) can best be found in the function eme_new_event in eme_events.php. Some (but not all) are: “event_name”,”event_status”,”event_start_date”,”event_start_time”,”event_end_date”,”event_end_time”,”event_notes” and “event_single_event_format”.
If you want to create a location at the same time, you can specify “location_name”,”location_address1″,”location_city” and other location info (all those can be found in the function eme_new_location in eme_locations.php). The 3 mentioned location columns are required if you want to create a new location. If not, you can specifiy “location_id” instead, pointing to an already existing location id.

There is 1 column required: “event_name”.
The column “event_status” should be “1” (public), “2” (private) or “5” (draft).
The columns “event_start_date” and “event_end_date” should be in the format YYYY-MM-DD
The columns “event_start_time” and “event_end_time” should be in the format HH:MM

Events and locations also have a lot of properties (in fact: those are just a new way of adding event properties without adding extra db columns). These can be found in the functions eme_init_event_props (in eme_events.php) and eme_init_location_props (in eme_locations.php).
Those can be imported by prepending the relevant property with ‘prop_’ (e.g. ‘prop_min_allowed’).

The same remark for properties also goes for attributes (but since attributes are defined a bit “at will”, there’s no function that lists these). Those can be imported by prepending the relevant property with ‘att_’ (e.g. ‘att_my_own_attributename’).

If you used custom fields in your events form, you can also import answers for those by adding columns named “answer_XX” with “XX” being either the id or the name of the corresponding custom field you want to import answers for.

[eme_gdpr_approve]

EME helps you to achieve GDPR compliance. While some things (like alerting your visitors of the fact that you use cookies and also inform them about your privacy policy) remains your own responsibility, you can put the eme_gdpr_approve shortcode on a regular wordpress page (with all the explaining you want to do) so people can easily and safely approve for their personal info to be stored in EME. The link generated by using #_GDPR_APPROVE_URL in the email the form sends out (the form is created by this shortcode) is only valid for X hours (the lifetime of a wordpress nounce, typical 24 hours).
The content of the email can be changed in the EME GDPR preferences.

So in fact it is a 2-step procedure:
1) create a wordpress page and put [eme_gdpr_approve] in it. Then let people know of this page (privacy policy, mail, …).
If the url you give to people contains the parameter eme_email (with value a valid email address), that email will be used to prefill the email field in the resulting form.
2) after the user enters his email and submits the form, he/she gets an email with a link that gives final approval to store personal data.

Example:
[eme_gdpr_approve]

The page containing this shortcode can then also be sent to all people that haven’t approved yet (from within the people admin overview), in order to ask for their approval.

Note: if the page that contains this shortcode has a parameter eme_email in it (e.g. this_page/?eme_email=mine@me.you ), then that email will be used to prefill the email field. This allows you to mail the url to this page (via EME) to a lot of people and have their email already filled in (so less work for the receiver).

[eme_unsubform]

Shows a form for email unsubscribe from a group.

  • template_id (optional): use a predefined format template for the form (see below).

If you use a template for this shortcode, the placeholders mentioned below can be used:

  • #_EMAIL asks for the email (required)
  • #_MAILGROUPS displays a list of EME groups designated as “mailgroups” a person can unsubscribe from
  • #_GDPR (optional) asks for confirmation to store your info
  • #_GDPR{} (optional) asks for confirmation to store your info with between the braces the text you want as extra label text for the field
  • #_SUBMIT{} displays displays the submit button with between the braces the text you want for the button (qtranslate compatible).
  • #_SUBMIT displays displays the submit button with the text you want for the button the text configured on the Settings page.
  • #_CAPTCHA displays the captcha part
  • #_RECAPTCHA (*) required if Google reCAPTCHA is configured to be used.

#_EMAIL and #_SUBMIT are required, and also #_CAPTCHA if the captcha option is activated

[eme_subform]

Shows a form for email subscribe to a group.

  • template_id (optional): use a predefined format template for the form (see below).

If no template id is given, a default form layout will be used instead.
If you use a template for this shortcode, the placeholders mentioned below can be used:

  • #_EMAIL asks for the email (required)
  • #_LASTNAME and/or #_FIRSTNAME ask for lastname and/or firstname (not required)
  • #_MAILGROUPS displays a list of EME groups designated as “email only” a person can subscribe to. This “email only” option can be selected when you create/edit an EME group.
  • #_GDPR (optional) asks for confirmation to store your info
  • #_GDPR{} (optional) asks for confirmation to store your info with between the braces the text you want as extra label text for the field
  • #_SUBMIT{} displays displays the submit button with between the braces the text you want for the button (qtranslate compatible).
  • #_SUBMIT displays displays the submit button with the text you want for the button the text configured on the Settings page.
  • #_CAPTCHA displays the captcha part
  • #_RECAPTCHA (*) required if Google reCAPTCHA is configured to be used.

#_EMAIL and #_SUBMIT are required, and also #_CAPTCHA if the captcha option is activated

[eme_people]

[eme_people]
Returns a list of people, optionally limited to a specific EME group. Accepts the following arguments:

  • group_id: the ID of the EME group you want to show the members of.
  • template_id: use a predefined format template for each of the persons matching the group (or all). See https://www.e-dynamics.be/wordpress/category/documentation/7-placeholders/7-12-people/ for the placeholders that can be used here.
  • template_id_header and template_id_footer: a template for the header or footer of the list, no placeholders can be used here.

My Facebook Access Token stopped working

CSV import countries/states

Importing countries into EME is done by using a CSV file (csv delimiter and encloser can be specified during import).
The first line should indicate the names of the columns being imported. Currently these names are recognized (unknown columns will be ignored):
“alpha_2″,”alpha_3″,”num3″,”name”,”locale”

There are 2 columns required: “name”,”alpha_2″. The name is pretty obvious, but alpha_2, alpha_3 and num_3 are in fact part of the IS0 3166-1 standard. For more info (and all valid options), see this wikipedia page: https://en.wikipedia.org/wiki/ISO_3166-1
The locale should either be left empty as a default/fallback, or a specific existing wordpress locale (like nl_NL, en_US, see https://translate.wordpress.org/ for the whole list).

A simple example of a CSV file:

"name","alpha_2","locale"
"Belgium","BE",""
"België","BE","nl_BE"

An example countries CSV file can be downloaded here.

Importing states into EME is done by using a CSV file (csv delimiter and encloser can be specified during import).
The first line should indicate the names of the columns being imported. Currently these names are recognized (unknown columns will be ignored):
“code”,”name”,”country_id”

There are 3 columns required: “code”,”name”,”country_id”. The name is pretty obvious, but the state code is in fact part of the IS0 3166-2 standard. For more info (and all valid options), see this wikipedia page: https://en.wikipedia.org/wiki/ISO_3166-2
The country_id should be the id of a country already existing (or imported) in EME.

A simple example of a CSV file:

"name","code","country_id"
"Washington","WAS","5"

[eme_request_personal_info]

EME helps you to achieve GDPR compliance. While some things (like alerting your visitors of the fact that you use cookies and also inform them about your privacy policy) remains your own responsibility, you can put the eme_gdpr shortcode on a regular wordpress page (with all the explaining you want to do) so people can easily and safely request their personal info stored in EME. The link generated by using #_GDPR_URL in the email the form sends out (the form is created by this shortcode) is only valid for X hours (the lifetime of a wordpress nounce, typical 24 hours).
The content of the generated email can be changed in the EME GDPR preferences.

So in fact it is a 2-step procedure:
1) create a wordpress page and put [eme_request_personal_info] in it. Then let people know of this page (privacy policy, mail, …).
If the url you give to people contains the parameter eme_email (with value a valid email address), that email will be used to prefill the email field in the resulting form.
2) after the user enters his email and submits the form, he/she gets an email with a link towards the personal data stored.

Example:
[eme_request_personal_info]

To allow people to change some of their personal data, you can use the shortcode [eme_change_personal_info]

Note: if the page that contains this shortcode has a parameter eme_email in it (e.g. this_page/?eme_email=mine@me.you ), then that email will be used to prefill the email field. This allows you to mail the url to this page (via EME) to a lot of people and have their email already filled in (so less work for the receiver).

CSV import members

Go in the EME member section and open up the import section there.

Import members
Importing members into EME is done by using a CSV file (csv delimiter and encloser can be specified during import).
The first line should indicate the names of the columns being imported. Currently these names are recognized (unknown columns will be ignored):
“lastname”,”firstname”,”email”,”phone”,”address1″,”address2″,”city”,”state”,”zip”,”country”,”massmail”,”membership”,”status”,”status_automatic”,”paid”,”start_date”,”end_date”,”creation_date”

There are 5 columns required: “lastname”,”firstname”,”email”,”membership” and “start_date”. A corresponding person (based on lastname, firstname and email) will either be created or updated upon import.
The column “massmail” should be “0” or “1” (indicating whether or not that person wants newsletter and generic mails).
The columns “start_date”, “end_date” and “creation_date” should be in the format YYYY-MM-DD
The column “paid” should be “0” or “1” (“1” meaning “paid”).
The column “status” should be “pending”, “active” or “expired”.
The column “status_automatic” should be “0” or “1” (‘1’ indicating that the status should be recalculated on a daily basis).

If you used custom fields in your membership form, you can also import answers for those by adding columns named “answer_XX” with “XX” being either the id or the name of the corresponding custom field you want to import answers for.

A simple example of a CSV file:

"Firstname","Lastname","Membership"
"Franky","Van Liedekerke","My membership name"

A more complete example (with an unused column, custom field and start_date)

"Firstname","Lastname","Membership","start_date","answer_instructionlevel","other columnname"
"Franky","Van Liedekerke","My membership name","2010-12-16","answer_instructionlevel","other unused info"

Importing values for multiselect fields is as simple as concatenating the answers with “||”:

"Firstname","Lastname","Membership","start_date","answer_instructionlevel","other columnname","answer_classes"
"Franky","Van Liedekerke","My membership name","2010-12-16","answer_instructionlevel","other unused info","class A||class B"

(make sure your multiselect answers correspond with the definition given in the custom field of course).

Import dynamic field answers

Of course, for memberships, there’s also the possibility to use dynamic fields. Importing these is also possible, albeit a bit more complex.
First: import your members as indicated above. Then use the second import (with the button labelled ‘Import dynamic field answers’) to import dynamic field answers.
The reason this is a second import option is because is: you need to take the condition index (used to be called “grouping index”) into account if you use multiple field conditions (you just need to check the condition index in the membership definition for your dynamic fields). If you only have 1 condition, then the condition index is always ‘1’ (or should be) and doesn’t need to be specified.
The next example is based on a membership called “Familie lidmaatschap” and has 2 conditions defined in the membership:
– the columns “answer_DogRace”,”answer_Name dog”,”answer_Birthday dog”,”answer_Class” (in condition with index “2”)
– the columns “answer_Name family member”,”answer_Firstname familymember” (in condition with index “1”)
When importing, we can import multiple answers (if the condition is set to ‘repeat’) and we just indicate the condition index when importing:

"Firstname","Lastname","email","Membership","answer_DogRace","answer_Name dog","answer_Birthday dog","answer_Class","answer_Name family member","answer_Firstname familymember","index"
"Eddy","Dummy","xxx@gmail.com","Familie lidmaatschap","Leonberger","Dogname1","2016-08-21","Basis-klas","","","2"
"Eddy","Dummy","xxx@gmail.com","Familie lidmaatschap","Leonberger","Dogname2","2017-02-11","Junior klas","","","2"
"John","Smith","yyy@telenet.be","Familie lidmaatschap","Labrador zwart","Dogname3","2016-10-01","A-klas","","","2"
"Jane","Doe","zzz@hotmail.com","Familie lidmaatschap","Mechelse herder","Dogname5","2016-08-10","A-klas","","","2"
"Jane","Doe","zzz@hotmail.com","Familie lidmaatschap","","","","","Lastname member1","FirstnameA","1"
"Jane","Doe","zzz@hotmail.com","Familie lidmaatschap","","","","","Lastname member1","FirstnameB","1"
"Jane","Doe","zzz@hotmail.com","Familie lidmaatschap","","","","","Lastname member1","FirstnameC","1"
"Jane","Doe","zzz@hotmail.com","Familie lidmaatschap","","","","","Lastname member1","FirstnameD","1"
"Eddy","Dummy","xxx@gmail.com","Familie lidmaatschap","","","","","Lastname member1","FirstnameE","1"
"Eddy","Dummy","xxx@gmail.com","Familie lidmaatschap","","","","","Lastname member1","FirstnameF","1"
"Eddy","Dummy","xxx@gmail.com","Familie lidmaatschap","","","","","Lastname member1","FirstnameG","1"
"John","Smith","yyy@telenet.be","Familie lidmaatschap","","","","","Lastname member1","FirstnameH","1"
"John","Smith","yyy@telenet.be","Familie lidmaatschap","","","","","Lastname member1","FirstnameI","1"
"John","Smith","yyy@telenet.be","Familie lidmaatschap","","","","","Lastname member1","FirstnameJ","1"

Member placeholders

When defining a membership, a huge amount of work will go into the definition of the mails being send when someone becomes a member, pays, expires, etc …
These mails can contain placeholders to make your life easier and be able to reuse these for other membership definitions.
For members, all the placeholders used for people can be used (except #_FIELD or #_FIELDVALUE: these will be replaced by the member info, see below):

  • #_MEMBERID displays person’s member ID
  • #_MEMBERPRICE displays the membership price for a member (this differs from #_MEMBERSHIPPRICE i that way that discounts are taken into account).
  • #_MEMBERPRICE_NO_VAT returns the membership price for a member, VAT excluded
  • #_MEMBERPRICE_VAT_ONLY returns the VAT part of the membership price for this member
  • #_CURRENCY returns the currency of a membership (if any)
  • #_CURRENCYSYMBOL returns the currency symbol for the price of a membership (if any)
  • #_MEMBERCREATIONDATE displays the date the member signed up, formatted according to the wordpress preferences
  • #_MEMBERSTARTDATE displays the start date of the membership, formatted according to the wordpress preferences
  • #_MEMBERENDDATE displays the end date of the membership, formatted according to the wordpress preferences
  • #_MEMBER_STATUS displays the member status (“Pending”, “Active”, “Grace period” or “Expired”)
  • #_MEMBERCREATIONDATE{xx}, #_MEMBERSTARTDATE{xx} and #_MEMBERENDDATE{xx} displays relevant dates formatted by ‘xx’ (‘xx’ being a valid PHP date format).
  • #_MEMBERSHIPNAME displays the name of the membership
  • #_MEMBERSHIPDESCRIPTION displays the description of the membership
  • #_MEMBERSHIPPRICE displays the membership price
  • #_CONTACTNAME or #_CONTACTPERSON displays the dispname of the membership contact person if that user is not linked to an EME person, or the full EME name if that user is linked to an EME person. If the membership contact (it is a WP account) is linked to an EME person, you can use #_CONTACT followed by any person placeholders (e.g. #_CONTACTNAME, #_CONTACTADDRESS1, all people placeholders preceded by “CONTACT”) to show EME info from that person. If the contact is not linked to an EME person, the placeholders #_CONTACTDISPNAME, #_CONTACTLASTNAME and #_CONTACTLASTNAME are still supported as well.
  • #_CONTACTEMAIL displays the e-mail of the event contact person
  • #_CONTACTPHONE displays the phone of the event contact person
  • #_QRCODE returns a QR-code that allows an EME member administrator to validate if someone is an active member or not. The intended use is in the template for the optional PDF sent to a member when signing up (a member card), or e.g. in the payment mail after someones is marked as paid. In the EME settings you can configure what is shown when scanning the qrcode with sufficient rights or when not logged in.
  • #_QRCODE{xx} returns #_QRCODE but with an optional size attribute (default: 2). The different options are: any number from 1 to 8 or the predefined sizes small (=1), medium (=2, the default), large (=4), huge (=8). Examples: #_QRCODE{small} or #_QRCODE{4}
  • #_FIELD{xx} returns the answer (the tag, not the real value chosen for multi-option fields) for the extra form field with ID or name xx
  • #_FIELDVALUE{xx} returns the answer (not the tag, but the real value chosen for multi-option fields) for the extra form field with ID or name xx
  • #_DYNAMICDATAshows the dynamic data entered based on the defined membership conditions.
  • #_DYNAMICFIELD{xx} works like #_FIELD but for dynamically added fields. Since these can be repeated multiple times, those answers will be separated by a carriage return or a br-tag
  • #_PAYMENT_URL returns a link to the payment form (the buttons for paypal and all other payment gateways), in case you want to mail it to people that did not yet pay again.
  • #_FILES: returns the files uploaded for that member (all files uploaded!). However: a custom field that was
    marked as “Person field” (so asking for personal info) will not be returned when using #_FILES, use #_PERSONAL_FILES for that
  • #_PERSONAL_FILES: returns the files uploaded for the relevant person
  • #_MEMBERPDF_URL{xx}(with ‘xx’ being a template id) that allows you to generate pdf’s with member info in them and mail that url to the person in question. If this placeholder is used multiple times with the same template (e.g. when you use it in “pending” and “approved” mail templates), the newest one remains and the older ones get removed. These placeholders can also be used in the member sign-up message.
  • #_PAYMENTGATEWAYUSED If this is a mail sent after payment, this placeholder will return the payment gateway used to pay online.
  • #_TOTALDISCOUNT returns the total discount applied.
  • #_APPLIEDDISCOUNTNAMES returns a comma-seperated list of discount names applied to this booking.
  • #_DISCOUNTCODES_ENTERED returns a comma-seperated list of discount names entered for this booking. Since it is no longer allowed to enter invalid discount codes, the placeholder #_DISCOUNTCODES_ENTERED and #_DISCOUNTCODES_VALID now return the same result.
  • #_DISCOUNTCODES_VALID (or #_DISCOUNTCODES_USED) returns a comma-seperated list of the valid discount codes entered for this booking.
  • Conditional placeholders #_IS_MEMBER_PENDING, #_IS_MEMBER_ACTIVE, #_IS_MEMBER_GRACE, #_IS_MEMBER_EXPIRED (returns 1 if the status of the member is pending/active/grace/expired, or 0 otherwise)