Legacy syntax and deprecated placeholders

Reason

In the past, there was an inconsistent behaviour when placeholders needed options:

#_ATT{…}{…}
#_TOTALPRICE…
#_SUBMIT[…]
and others

This resulted also in some unwanted behaviour where square brackets of wordpress shortcodes were matched as possible options for placeholders. This has now been made consistent and the syntax for #_ATT{…}{…} is being taken as a reference.

Legacy placeholder syntax

The following 4 event placeholders are now deemed “legacy”, which means you should avoid using them and also the usage is by default “off”. The new syntax is described next to it each placeholder. The only placeholders here are event placeholders using square brackets:

  • #_EVENTPAGEURL[xx] becomes #_EVENTPAGEURL{xx}
  • #_EVENTCATEGORIES[..][..] becomes #_EVENTCATEGORIES{..}{..}
  • #_EVENTIMAGETHUMB[MyCustomSize] becomes #_EVENTIMAGETHUMB{MyCustomSize}
  • #_EVENTIMAGETHUMBURL[MyCustomSize] becomes #_EVENTIMAGETHUMBURL{MyCustomSize}

The old syntax can be restored by checking the new option “Re-enable legacy placeholder behaviour” in the EME general settings tab, but I encourage everyone to switch to the new notation if/when possible. If you enable the old syntax, the new syntax is not possible. This option does not influence in any way the new syntax for the deprecated placeholders mentioned next.

Deprecated placeholders

Some placeholders are now deemed “deprecated”, which means you should avoid using them but you’re still allowed to use them so as to give you the time needed to switch to the new syntax.

For event placeholders, the following changes:

  • #_PRICExx or #_EVENTPRICExx becomes #_PRICE{xx} or #_EVENTPRICE{xx}
  • #_AVAILABLESPACESxx or #_AVAILABLESEATSxx becomes #_AVAILABLESPACES{xx} or #_AVAILABLESEATS{xx}
  • #_TOTALSPACESxx or #_TOTALSEATSxx becomes #_TOTALSPACES{xx} or #_TOTALSEATS{xx}
  • #_RESERVEDSPACESxx or #_BOOKEDSEATSxx becomes #_RESERVEDSPACES{xx} or #_BOOKEDSEATS{xx}

For RSVP placeholders, the following change:

  • #_RESPSPACESxx becomes #_RESPSPACES{xx}
  • #_TOTALPRICExx becomes #_TOTALPRICE{xx}
  • #_FIELDxx becomes #_FIELD{xx}
  • #_FIELDNAMExx becomes #_FIELDNAME{xx}

For booking form placeholders, the following change:

  • #_SEATSxx becomes #_SEATS{xx}
  • #_CAPTCHAHTML[..] becomes #_CAPTCHAHTML{..}
  • #_SUBMIT[..] becomes #_SUBMIT{..}

You can still use them, but a warning will be shown until you deactivate the new option “Allow deprecated placeholders” in the EME general settings tab, but I encourage everyone to switch to the new notation if/when possible.
Remark: the newer placeholder notation for the deprecated placeholders is not influenced by the new option “Re-enable legacy placeholder behaviour”, so whether or not you activate that option, the new syntax for these placeholders will always work.

[eme_attendees]

[eme_attendees]
Returns a list of attendees for a single event. Accepts the following arguments:

  • id: the ID of the event you want to show the attendees for.
  • template_id, template_id_header, template_id_footer (optional): use a predefined format template for the attendee list header, footer or list entry, instead of the default settings configured. See http://www.e-dynamics.be/wordpress/?cat=51. Because the attendees returned are a list, you can define specific templates for the header, footer and an entry in that list.
  • approval_status can be used to show only attendees with bookings with a certain approval status (approved, pending, all). Values: 0=all, 1=approved, 2=pending. Default: 0
  • paid_status: only show attendees with bookings with a specific payment status (paid, unpaid, all). Values: 0=all, 1=unpaid, 2=paid. Default: 0

In the templates for this shortcode, the standard placeholders for events AND the extra placeholders mentioned below can be used:

  • #_ATTENDNAME displays the name of the attendee.
  • #_ATTENDEMAIL displays the e-mail address of the attendee.
  • #_ATTENDPHONE displays the phone of the attendee.
  • #_ATTENDID displays the numerical ID of the attendee.
  • #_ATTENDSEATS displays the total amount of seats booked by the attendee.

Example:
[eme_attendees id=1 template_id=3 template_id_header=7 template_id_footer=9]
Or, when using it inside a single event format:
[eme_attendees id=#_EVENTID template_id=3 template_id_header=7 template_id_footer=9]

[eme_bookings]

[eme_bookings]
Returns the page describing the bookings for a single event. Accepts the following arguments:

  • id: the ID of the event you want to show the bookings for. This options is required.
  • template_id, template_id_header, template_id_footer (optional): use a predefined format template for the booking list header, footer or list entry, instead of the default settings configured. See http://www.e-dynamics.be/wordpress/?cat=51. Because the bookings returned are a list, you can define specific templates for the header, footer and an entry in that list.
  • approval_status can be used to show only bookings with a certain approval status (approved, pending, all). Values: 0=all, 1=approved, 2=pending. Default: 0
  • paid_status: only show bookings with a specific payment status (paid, unpaid, all). Values: 0=all, 1=unpaid, 2=paid. Default: 0

See the doc concerning RSVP mails for the placeholders you can use in the templates for this shortcode.

Example:
[eme_bookings id=1 template_id=3 template_id_header=7 template_id_footer=9]
Or, when using it inside a single event format:
[eme_bookings id=#_EVENTID template_id=3 template_id_header=7 template_id_footer=9]

[eme_location]

[eme_location]
Returns the page describing a single location. Accepts the following arguments:

  • id: the ID of the location you want show.
  • template_id (optional): use a predefined format template for the location, instead of the setting configured in ‘Default single location page format’. See http://www.e-dynamics.be/wordpress/?cat=51
  • ignore_url (optional): allows you to ignore the external url for this location, so clicking on the location details or showing this location doesn’t automatically redirect to an external page. You can still use the relevant placeholder to show the external url of course. Value: 0 or 1, default: 0

Example:
[eme_location id=1 template_id=3]

Format templates

Format templates are just the same as what you would enter in the header, footer, events list or location list format settings in the general EME settings.

But sometimes you want to define a different format for event or location listings, depending on the page you are. In this case you can use the old “format” option for the [eme_events] shortcode, but that is not a very flexible solution. So now you can just define templates and use them with the option template_id. E.g.:

[eme_events template_id=3]

You can also use templates for header and footers in the eme_events and eme_locations shortcodes, using the options template_id_header and template_id_footer. Also many other shortcodes support placeholders, see their explanation for that.

Multiseat events

Multiseat events are just like multiprice events. But where you create price categories (or price levels) with multiprice events, here you can define (if wanted) the maximum available seats per price category.
This means that if you define multiseats, the number of seat “categories” must correspond with the number of price categories (even if the price is the same).

You can also still just define a “single” seat maximum for multiprice events, which means what it has always meant: the maximum number of seats, even if you define multipe price categories.

A screenshot for multiseat categories (3 seat categories: 10 seats at €7 each, 20 seats at €6 each, 25 seats at €5 each):

Multiprice events

If you want an event to have multiple prices (e.g. different prices for students, children, …), it’s as easy as entering a price in the “Add New Event” window in the EME admin pages.The value entered should just specify all prices, seperated by “||”.
An example (see also screenshot) for an event having 3 prices: 22||20.50||18

multiprice1

Now, as you specified 3 prices in the example above, people should be able to book for those 3 as well. For this you need to change the setting “Registration form format” for the event.
Usually you just enter the shortcode #_SEATS there, to have a dropdown to select a number of seats to book. Now in this case, you need 3 of those, with a number behind them: #_SEATS{1}, #_SEATS{2}, #_SEATS{3}
E.g. the “Registration form format” could then be like this:

<table class='eme-rsvp-form'>
<tr><th scope='row'>Name*:</th><td>#_NAME</td></tr>
<tr><th scope='row'>E-Mail*:</th><td>#_EMAIL</td></tr>
<tr><th scope='row'>Phone number:</th><td>#_PHONE</td></tr>
<tr><th scope='row'>Seats for children:</th><td>#_SEATS{1}</td></tr>
<tr><th scope='row'>Seats for adults:</th><td>#_SEATS{2}</td></tr>
<tr><th scope='row'>Seats for students:</th><td>#_SEATS{3}</td></tr>
<tr><th scope='row'>Comment:</th><td>#_COMMENT</td></tr>
#_CAPTCHAHTML[<tr><th scope='row'>Please fill in the code displayed here:</th><td>#_CAPTCHA</td></tr>]
</table>
#_SUBMIT

See screenshot:

multiprice2

For more info about formfields, read the doc concerning that 🙂

Attendees list

This defines the layout of the attendees list when using the placeholder #_ATTENDEES or when defining templates for use in the shortcode [eme_attendees]. The standard placeholders for events and people AND the extra placeholders mentioned below can be used:

  • #_ATTENDSEATS displays the total amount of seats booked by the attendee for the relevant event.
  • #_ATTENDSEATS{xx} displays the number of seats reserved for a specific price for a multi-price event

[eme_cancel_all_bookings_form]

[eme_cancel_all_bookings_form]
Inserts a unsubscribe form on a regular wordpress page. Accepts the following parameters:

  • id: the ID of the event for which the unsubscribe form should be shown.

The layout of the form is defined in the EME settings page, tab RSVP. There you’ll find “Cancel all bookings form format”. The placeholders can be found here.

Example:
[eme_cancel_all_bookings_form id=4]