[eme_person]

[eme_person]
Returns info of a person (or the person linked to the current logged in user if person_id is not provided). Accepts the following arguments:

  • person_id: the ID of the EME person you want to show the info of. If not provided, the person linked to the current logged in user is used (if existing)
  • template_id (required): The template used to show the info on this person. See https://www.e-dynamics.be/wordpress/category/documentation/7-placeholders/7-12-people/ for the placeholders that can be used here.

The parameter person_id can be overriden via a url param (using the person’s random id). This allows to create 1 page where you can show other people’s info based on their random id (so not easy to guess) from e.g. within an event. The url parameter name is “prid”. The placeholder to get the random id for a person (contact or author) for an event is documented in the event/people placeholders. Example: this_page/?prid=#_CONTACTRANDOMID.

Language support

EME by default supports multiple languages for the backend (typically called the “plugin” language, which follows the wordpress language). However, in the case some kind of language plugin is installed to help your site be multi-lingual, things become more difficult. Reason is that the RSVP form, mail templates, event titles, etc … all need to support your languages of choice.
EME tries to detect the used language by checking the url. It supports “https://my.site/?lang=en” format or “https://my.site/en/” format.
When wanting to support multiple languages, EME works very nicely together with qtranslate-xt. But if you’re using another plugin for languages, EME can still help you. You just need to use language tags to indicate the language for a specific part of text. An example for an event title:
[:en]title in english[:de]title in German[:nl]title in Dutch[:]
Or for content of an event (or mail), as an example with sections that are not translated (like a name):

[:en]Hi[:nl]Hallo[:] #_FIRSTNAME,
[:en]Thank you for reserving for[:nl]Bedankt voor uw reservatie voor[:] #_EVENTNAME

When the language is English, this then gets presented as:
Hi #_FIRSTNAME,
Thank you for reserving for #_EVENTNAME

And in Dutch:
Hallo #_FIRSTNAME,
Bedankt voor uw reservatie voor #_EVENTNAME

If a section of text is not enclosed between language tags, it is used in all languages. If no language is detected, or the language of choice is not present in the text, the first language found is used as a “default”.

EME supports both the language tags [:xx]…[:] and {:xx}….{:} (both of which are also used by qtranslate-xt).

EME also follows the language of choice when sending mails to people (as indicated in their EME profile, not WP).

Send mail to group via script

Using the EME backend, you can send emails to groups of people. However, there’s now also the option of doing this via your favorite mail client, via a commandline script that EME provides (called “cli_mail.php”). For this to work, you need to be able to pipe emails to scripts, and below I’ll explain how it (can) works for Postfix as mailserver:

  1. in /etc/postfix/transport, add your email you want to forward to the group and a custom postfix transport. E.g.:
    mygroupemail@mydomain.com my-custom-transport:
  2. After that, compile the file (postmap /etc/postfix/transport)
  3. Define that custom transport in /etc/postfix/master.cf:
    my-custom-transport unix – n n – – pipe
    flags=DRhu user=www-data argv=/usr/bin/php -q /path/to/wp-content/plugins/events-made-easy/cli_mail.php -d ${recipient}
  4. reload postfix (postfix reload)

For all options available to cli_mail.php, do “/usr/bin/php -q /path/to/wp-content/plugins/events-made-easy/cli_mail.php -h”
(-f ${sender} and -d {$recipient} are typically used for postfix piping, but you can use other options too)

You can use (as in the example above) “-d <email>” as destination, after which EME will search all defined groups for that email address (there’s an option when editing a group to specify this email address). You can also use “–groupid=<groupid>” as destination (and then you don’t need to specify this email in your group).

[eme_bookings_report_link]

[eme_bookings_report_link]

If the user is logged in and has the permissions to list members, this shortcode generates a link to a CSV export for the members of the configured group or membership. It accepts the following parameters:

  • event_id event id you want to show the bookings for (required). If this shortcode is used inside a single event template, you can also use #_EVENTID as a value.
  • template_id the template defining one line in the CSV report. This needs to be a comma-separated list and contains usually booking placeholders.. Example of a template could be “#_LASTNAME,#_FIRSTNAME,#_SEATS”
  • template_id_header (optional) defines the first line in the CSV output. Useful to add headers for each column (also needs to be comma-separated, but can’t contain any placeholders)
  • title title of the link, if not given: “Bookings CSV”
  • public_access by default the report is only accessible to people with correct permissions. If you activate this option, this report becoms accessible for everyone on the condition the page that contains the shortcode is password protected.

 

Example:
[eme_bookings_report_link template_id=6 event_id=2]

[eme_members_report_link]

[eme_members_report_link]

If the user is logged in and has the permissions to list members, this shortcode generates a link to a CSV export for the members of the configured group or membership. It accepts the following parameters:

  • membership_id membership id you want to show the members for. Either this or group_id is required.
  • group_id id of the group (of type “member”) you want to show the members for
  • template_id the template defining one line in the CSV report. This needs to be a comma-separated list and contains usually member placeholders.. Example of a template could be “#_LASTNAME,#_FIRSTNAME,#_MEMBERENDDATE”
  • template_id_header (optional) defines the first line in the CSV output. Useful to add headers for each column (also needs to be comma-separated, but can’t contain any placeholders)
  • link_text title of the link, if not given: “Members CSV”
  • public_access by default the report is only accessible to people with correct permissions. If you activate this option, this report becoms accessible for everyone on the condition the page that contains the shortcode is password protected.

 

Example:
[eme_members_report_link template_id=6 membership_id=2]

Generic placeholders

There are a number of generic placeholders, which can be used everywhere/always (even outside events/locations, if you’d use the eme_if shortcode standalone on a page). These are:

  • #_IS_USER_IN_GROUP{xxx} returns ‘1’if the logged in WP user is in the EME group called ‘xxx’, ‘0’ otherwise. Multiple groups can be specified, separated by “,”.
  • #_IS_USER_MEMBER_OF{xxx} returns ‘1’if the logged in WP user is an active member of the EME membership called ‘xxx’, ‘0’ otherwise. Multiple memberships can be specified, separated by “,”.
  • #_IS_USER_MEMBER_PENDING{xxx} returns ‘1’if the logged in WP user is a member with status pending of the EME membership called ‘xxx’, ‘0’ otherwise. Multiple memberships can be specified, separated by “,”.
  • #_IS_USER_MEMBER_EXPIRED{xxx} returns ‘1’if the logged in WP user is a member with status expired of the EME membership called ‘xxx’, ‘0’ otherwise. Multiple memberships can be specified, separated by “,”.
  • #_USER_HAS_ROLE{xxx} returns ‘1’if the logged in WP user is has the WP role called ‘xxx’, ‘0’ otherwise. Multiple roles can be specified, separated by “,”.
  • #_USER_HAS_CAP{xxx} returns ‘1’if the logged in WP user is has the WP capability called ‘xxx’, ‘0’ otherwise. Multiple capabilities can be specified, separated by “,”.
  • #_IS_SINGLE_DAY returns ‘1’ if you’re viewing a single day, ‘0’ otherwise
  • #_IS_SINGLE_EVENT returns ‘1’ if you’re viewing a single event details, ‘0’ otherwise
  • #_SINGLE_EVENTPAGE_EVENTID if viewing a single event, it will return the event id, empty otherwise
  • #_IS_SINGLE_LOC returns ‘1’ if you’re viewing a single location details, ‘0’ otherwise
  • #_IS_ADMIN_PAGE returns ‘1’ if on the admin pages, ‘0’ otherwise
  • #_IS_RSVP_PASSWORD_ENABLED returns ‘1’ if the event being watched is RSVP password protected, ‘0’ otherwise
  • #_CURDATE if you want to compare the current date in YYYY-MM-DD format
  • #_CURTIME if you want to compare the current date in HH:MM format
  • #_IS_LOGGED_IN returns ‘1’ if user is logged into WP, ‘0’ otherwise
  • #_LOCALE returns the current locale
  • #_LANG returns the current language
  • #_UNSUB_URL returns the unsubscribe url for mailings
  • #_MEMBERSHIP_PAYMENT_URL{xx} (with ‘xx’ being the name or id of a membership), returns the payment url of a member if the person is logged in and an pending or active member of the mentioned membership
  • #_EXPIRED_MEMBERSHIP_PAYMENT_URL{xx} (with ‘xx’ being the name or id of a membership), returns the payment url of a member if the person is logged in and an expired member of the mentioned membership
  • #_WPID returns the wordpress is of the current logged in user. This can then be used in included eme_events shortcodes (if e.g. you want to filter on contact id based on current logged in user).

Example usage:
[eme_if tag='#_IS_LOGGED_IN' value='0'] You are NOT logged in [/eme_if]
[eme_if tag='#_IS_LOGGED_IN' value='1'] You are logged in [/eme_if]
[eme_if tag='#ESC_CATEGORIES' contains='red'] The event is in at least the red category [/eme_if]
[eme_if tag="#ESCj #ESCM #ESCY" value="#ESC@j #ESC@M #ESC@Y"] The start and end date of this event is the same, so just showing start: #j #M #Y [/eme_if]
Or, print start date, and print end date only if different : #_STARTDATE [eme_if tag="#ESC_STARTDATE" notvalue="#ESC_ENDDATE"] #_ENDDATE [/eme_if]
A variant of the above, using curly brackets:
[eme_if tag="#ESC_{j M Y}" value="#ESC@_{j M Y}"] The start and end date of this event is the same: #{j M Y} [/eme_if]
Print start date, and print end date only if different:
#_{j M Y} [eme_if tag="#ESC_{j M Y}" notvalue="#ESC@_{j M Y}"] #@_{- j M Y} [/eme_if]
Print the list of attendees if at least one person signed up:
[eme_if tag='#_AVAILABLESEATS' lt='#_TOTALSEATS']<p>The following people have signed up for this event:#_ATTENDEES</p>[/eme_if]

Newsletter

EME can send a newsletter concerning upcoming events (to be configured via the submenu “Scheduled actions”).
This newsletter consist of 4 templates:
– Mail subject template: the template to be used as the subject for the mail
– Mail body header: the header-part of your email, this is in fact the text in the email body above the list of events (can also contain html of course)
– Mail body single event entry: this template will get repeated for each matching event (can also contain html of course). In this template you can use all event related placeholders.
– Mail body footer: the footer-part of your email, this is in fact the text in the email body below the list of events (can also contain html of course)

In all these templates you can use people placeholders.

[eme_change_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_change_personal_info shortcode on a regular wordpress page (with all the explaining you want to do) so people can easily and safely request to change (some of) their personal info stored in EME (not all personal data, like memberships of course). The link generated by using #_CHANGE_PERSON_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 3-step procedure:
1) Decide what you want people to be able to change and set that in the setting “Change personal info Form template” in the EME settings page, tab “Data protection”. The placeholders you can use in this setting are : #_LASTNAME, #_EMAIL, #_PHONE, #_FIRSTNAME, #_ADDRESS1, #_ADDRESS2, #_CITY, #_STATE, #_ZIP, #_COUNTRY, #_OPT_IN, #_OPT_OUT, #_GDPR and all #_FIELD{xx} placeholders for custom fields of type ‘person’
2) create a wordpress page and put [eme_change_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.
3) after the user enters his email and submits the form, he/she gets an email with a link towards the personal data.

Example:
[eme_change_personal_info]

It accepts the following optional parameter:

  • show_form_if_logged_in if set to “1” or “true the shortcode will immediately show the form if the person viewing the page is logged in and a linked EME user is found. Defaults to false. Possible values: 0 or false, 1 or true

To allow people to view all their personal data, you can use the shortcode [eme_request_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).

[eme_members]

[eme_members]
Returns a list of members, optionally limited to specific EME groups. Accepts the following arguments:

  • group_id: the ID of the EME group you want to show the members of. Multiple ids can be provided, comma-separated. Either this or the membership_id option is required.
  • membership_id: the ID of the EME membership you want to show the members of. Either this or the group_id option is required
  • template_id: use a predefined format template for each of the members matching the group (or all). See https://www.e-dynamics.be/wordpress/category/documentation/7-placeholders/7-14-members/ for the placeholders that can be used here. This is also required.
  • template_id_header and template_id_footer: a template for the header or footer of the list, no placeholders can be used here.

Example:
[eme_memberss membership_id=5 template_id=3]