I wanted to change the look of the email RSVP was sending, so I made the email subject and body themeable. This will not change the default behavior, but admins can override if they know how to theme.
Check the attached patch for my changes to the RSVP module. I hope you'll consider incorporating these into HEAD.
Here's the theme functions I'm currently using to override the default look:
function phptemplate_rsvp_invite_mail_subject($invite) {
$subject = t('Event Invitation') . ' - ' . $invite->name;
return $subject;
}
function phptemplate_rsvp_invite_mail($invite) {
global $user;
$site = variable_get("site_name", "drupal");
$node = node_load(array('nid'=>$invite->nid));
$body = t("Hello!\n\nYou have been invited to attend %title by %owner at %site.\n\nRespond to this invitation by following this link: \n%url\n\n%text\n\nRead more about this event: %eventurl\n",
array('%owner'=>$user->name, '%site'=>$site, '%eventurl'=>url("node/$invite->nid", NULL, NULL, 1), '%url'=>url("rsvp/email/$invite->hash", NULL, NULL, 1), '%text'=>$invite->invite_text, '%title' => $node->title));
return $body;
}
This may be considered a duplicate of http://drupal.org/node/28530, but I did not post the patch there because I thought that was too specifically about the order of information. This fix allows for admins to format the mail however they want (including using node_view to include the entire node in the invite mail). However this fix does provide a way to solve that users problem, too.
| Comment | File | Size | Author |
|---|---|---|---|
| rsvp_theme_mail.patch | 2.2 KB | Dave Cohen |
Comments
Comment #1
owahab commentedComment #2
owahab commentedCommited to 4.7.
Comment #3
owahab commentedComment #4
owahab commentedPorted to 5.x.
Comment #5
owahab commented