Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

FileSize
1.21 KB

Patch enclosed that adds @guest_comment, @guest_response and @guest_totalguests.

DamienMcKenna’s picture

Status: Active » Needs review
DamienMcKenna’s picture

FileSize
1.22 KB

Small update that wraps the guest's comment in check_plain().

DamienMcKenna’s picture

FileSize
2.24 KB

A small improvement, now the @guest_response token returns the text_yes, text_no, text_maybe fields (or 'none') while the new @guest_response_raw field is the raw yes/no/maybe/none. Also, @event_datetime displays the event date using the correct formatting function (event_format_date or date_format_date).

DamienMcKenna’s picture

FileSize
5.31 KB

Here's another update that adds a whole bunch of fields for the event date & time: '@event_date_day', '@event_date_month', '@event_date_year', '@event_date_year_2', '@event_date_year_4', '@event_time_12', '@event_time_24', '@event_time_hours', '@event_time_hours_12', '@event_time_hours_24', '@event_time_minutes', '@event_time_peroid'.

DamienMcKenna’s picture

FileSize
5.93 KB

Missed an IF case.

DamienMcKenna’s picture

A full list of the date & time fields that were added:

  • @event_date_day - the numeric day, e.g. "24".
  • @event_date_month - the bare month, e.g. "January".
  • @event_date_year - the bare year, e.g. "2011".
  • @event_date_year_2 - the two digit year, e.g. "11".
  • @event_date_year_4 - the full four digit year, e.g. "2011".
  • @event_time_12 - the time in 12-hour format, e.g. "1:23pm".
  • @event_time_24 - the time in 24-hour format, e.g. "13:23".
  • @event_time_hours - the bare hours number, e.g. "1".
  • @event_time_hours_12 - the bare hours number in 12-hour format, e.g. "1".
  • @event_time_hours_24 - the bare hours number in 24-hour format, e.g. "13".
  • @event_time_minutes - the bare minutes number, e.g. "24" (prefixed by a '0' for numbers under 10).
  • @event_time_peroid - "am" or "pm" as appropriate.

These are compiled by either date_format_date() or event_format_date(), so should adhere to locales.

DamienMcKenna’s picture

FileSize
6.86 KB

Updated to add the old response fields from #1038730: Data inconsistency in email messages, so you can show the maintainer what the response changed from.

DamienMcKenna’s picture

FileSize
6.76 KB

Yet Another Update. This fixes the mis-named "period" field, correctly parses the stored datetime to identify the correct time.

DamienMcKenna’s picture

FileSize
6.97 KB

This patch fixes the date fields, which were being improperly parsed. It also changes the "friendly" message for "none" responses to t('No response'), similar to what is used in rsvp.module.

DamienMcKenna’s picture

FileSize
6.97 KB

Another small update that fixes the @event_time_minutes field.

DamienMcKenna’s picture

I just realized something - the Old Response fields are only present for the moderator notification message, they are not present for the guest notification message. Might need some more work.

sdsheridan’s picture

subscribe

Ihsees’s picture

Status: Needs review » Needs work

Hey DamienMcKenna,

great update on the RSVP Module! Thanks a lot! I've been playing around with it for a week or two now, and I've noticed a few things. I've also been trying to fix them, but I simply lack the knowledge to do so. Maybe you could tell me where I need to look.

1) the time is displayed the way it's stored in the database (UTC) and doesn't adapt to the timezones. I'm sure there is a drupal-function out there that does exactly that, but I can't find it.
2) @node_body and @node_title don't work. Also, they only appear in the code once as in:
$replacements['@node_body'] = '';
$replacements['@node_title'] = '';
it would be awesome if one could implement a function that could display the actual node information within the e-mail.

thanks in advance for any help that you could provide
-Ihsees

Ihsees’s picture

ugly workaround for (1). I'd appreciate it, if someone could make it somewhat prettier.

$event_date = date_make_date($rsvp->startdate);
becomes
$event_date = date_make_date(date("c", strtotime($rsvp->startdate) + variable_get('date_default_timezone', 0)));

same goes for the second function (untested)

$event_date = event_explode_date($rsvp->startdate);
becomes
$event_date = event_explode_date(date("c", strtotime($rsvp->startdate) + variable_get('date_default_timezone', 0)));