{if $mimeType === 'text/plain'}
{capture assign='content'}
-{lang}wcf.user.notification.mail.plaintext.intro{/lang}
+{lang}wcf.user.notification.mail.daily.plaintext.intro{/lang}
-{foreach from=$notifications item='notification'}
+---------------
+
+{implode from=$notifications item='notification' glue="\n---------------\n\n"}
{assign var='event' value=$notification[event]}
{assign var='notificationContent' value=$notification[notificationContent]}
{assign var='notificationType' value=$notification[notificationType]}
{if $notificationContent|is_array}{include file=$notificationContent[template] application=$notificationContent[application] variables=$notificationContent[variables]}{*
-*}{else}{@$notificationContent}{/if}
-{/foreach}
+*}{else}{@$notificationContent|trim}{/if}
+{/implode}
-{*lang}TODO: wcf.user.notification.mail.plaintext.outro{/lang*}
+---------------
+{*lang}TODO: wcf.user.notification.mail.daily.plaintext.outro{/lang*}
{/capture}
{include file='email_plaintext'}
{else}
{capture assign='content'}
- {lang}wcf.user.notification.mail.html.intro{/lang}
+ {lang}wcf.user.notification.mail.daily.html.intro{/lang}
{foreach from=$notifications item='notification'}
{assign var='event' value=$notification[event]}
{assign var='notificationContent' value=$notification[notificationContent]}
{assign var='notificationType' value=$notification[notificationType]}
- <div>
+ <div class="largeMarginTop">
{if $notificationContent|is_array}
{include file=$notificationContent[template] application=$notificationContent[application] variables=$notificationContent[variables]}
{else}
</div>
{/foreach}
- {*lang}TODO: wcf.user.notification.mail.html.outro{/lang*}
+ {*lang}TODO: wcf.user.notification.mail.daily.html.outro{/lang*}
{/capture}
{include file='email_html'}
{/if}
font-weight: 300;
}
+ .largeMarginTop {
+ margin-top: 40px;
+ }
+
{* Buttons *}
td.button {
background-color: {$style->getVariable('wcfButtonPrimaryBackground', true)};
padding-left: 20px;
}
+ .box64 {
+ border-top: 1px solid {$style->getVariable('wcfContentBorder', true)};
+ border-bottom: 1px solid {$style->getVariable('wcfContentBorder', true)};
+ padding: 15px;
+ }
+
+ .box64 td.boxContent {
+ padding-left: 15px;
+ }
+
.containerHeadline h3 {
margin: 0;
padding: 0;
{else}
{lang}wcf.user.notification.follow.mail.html{/lang}
{assign var='user' value=$event->getAuthor()}
+
+ {if $notificationType == 'instant'}{assign var='avatarSize' value=128}
+ {else}{assign var='avatarSize' value=64}{/if}
{capture assign='userContent'}
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td><a href="{link controller='User' object=$user isEmail=true}{/link}" title="{$user->username}">{@$user->getAvatar()->getImageTag(128)}</a></td>
+ <td><a href="{link controller='User' object=$user isEmail=true}{/link}" title="{$user->username}">{@$user->getAvatar()->getImageTag($avatarSize)}</a></td>
<td class="boxContent">
{include file='email_userInformationHeadline'}
</td>
</tr>
</table>
{/capture}
- {include file='email_paddingHelper' block=true class='box128' content=$userContent sandbox=true}
+ {include file='email_paddingHelper' block=true class='box'|concat:$avatarSize content=$userContent sandbox=true}
{/if}
{if $mimeType === 'text/plain'}
{lang}wcf.user.notification.comment.mail.plaintext{/lang}
-{$event->getUserNotificationObject()->message}
+{$event->getUserNotificationObject()->message} {* this line ends with a space *}
{else}
{lang}wcf.user.notification.comment.mail.html{/lang}
{assign var='user' value=$event->getAuthor()}
{assign var='comment' value=$event->getUserNotificationObject()}
+
+ {if $notificationType == 'instant'}{assign var='avatarSize' value=128}
+ {else}{assign var='avatarSize' value=64}{/if}
{capture assign='commentContent'}
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td><a href="{link controller='User' object=$user isEmail=true}{/link}" title="{$comment->username}">{@$user->getAvatar()->getImageTag(128)}</a></td>
+ <td><a href="{link controller='User' object=$user isEmail=true}{/link}" title="{$comment->username}">{@$user->getAvatar()->getImageTag($avatarSize)}</a></td>
<td class="boxContent">
<div class="containerHeadline">
<h3>
</tr>
</table>
{/capture}
- {include file='email_paddingHelper' block=true class='box128' content=$commentContent sandbox=true}
+ {include file='email_paddingHelper' block=true class='box'|concat:$avatarSize content=$commentContent sandbox=true}
{/if}
{if $mimeType === 'text/plain'}
{lang}wcf.user.notification.commentResponse.mail.plaintext{/lang}
-{$event->getUserNotificationObject()->message}
+{$event->getUserNotificationObject()->message} {* this line ends with a space *}
{else}
{lang}wcf.user.notification.commentResponse.mail.html{/lang}
{assign var='user' value=$event->getAuthor()}
{assign var='comment' value=$event->getUserNotificationObject()}
+
+ {if $notificationType == 'instant'}{assign var='avatarSize' value=128}
+ {else}{assign var='avatarSize' value=64}{/if}
{capture assign='commentContent'}
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td><a href="{link controller='User' object=$user isEmail=true}{/link}" title="{$comment->username}">{@$user->getAvatar()->getImageTag(128)}</a></td>
+ <td><a href="{link controller='User' object=$user isEmail=true}{/link}" title="{$comment->username}">{@$user->getAvatar()->getImageTag($avatarSize)}</a></td>
<td class="boxContent">
<div class="containerHeadline">
<h3>
</tr>
</table>
{/capture}
- {include file='email_paddingHelper' block=true class='box128' content=$commentContent sandbox=true}
+ {include file='email_paddingHelper' block=true class='box'|concat:$avatarSize content=$commentContent sandbox=true}
{/if}
{if $mimeType === 'text/plain'}
{lang}wcf.user.notification.commentResponseOwner.mail.plaintext{/lang}
-{$event->getUserNotificationObject()->message}
+{$event->getUserNotificationObject()->message} {* this line ends with a space *}
{else}
{lang}wcf.user.notification.commentResponseOwner.mail.html{/lang}
{assign var='user' value=$event->getAuthor()}
{assign var='comment' value=$event->getUserNotificationObject()}
+
+ {if $notificationType == 'instant'}{assign var='avatarSize' value=128}
+ {else}{assign var='avatarSize' value=64}{/if}
{capture assign='commentContent'}
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td><a href="{link controller='User' object=$user isEmail=true}{/link}" title="{$comment->username}">{@$user->getAvatar()->getImageTag(128)}</a></td>
+ <td><a href="{link controller='User' object=$user isEmail=true}{/link}" title="{$comment->username}">{@$user->getAvatar()->getImageTag($avatarSize)}</a></td>
<td class="boxContent">
<div class="containerHeadline">
<h3>
</tr>
</table>
{/capture}
- {include file='email_paddingHelper' block=true class='box128' content=$commentContent sandbox=true}
+ {include file='email_paddingHelper' block=true class='box'|concat:$avatarSize content=$commentContent sandbox=true}
{/if}
$message = $class->getEmailMessage('daily');
if (is_array($message)) {
+ if (!isset($message['variables'])) $message['variables'] = [];
$variables = [
'notificationContent' => $message,
'event' => $class,
- 'notificationType' => 'daily'
+ 'notificationType' => 'daily',
+ 'variables' => $message['variables']
];
- if (isset($message['variables'])) {
- $variables['variables'] = $message['variables'];
- }
return $variables;
}
$message = $event->getEmailMessage('instant');
if (is_array($message)) {
+ if (!isset($message['variables'])) $message['variables'] = [];
$variables = [
'notificationContent' => $message,
'event' => $event,
- 'notificationType' => 'instant'
+ 'notificationType' => 'instant',
+ 'variables' => $message['variables']
];
- if (isset($message['variables'])) {
- $variables['variables'] = $message['variables'];
- }
+
if (isset($message['message-id'])) {
$email->setMessageID($message['message-id']);
}
<p>Wenn {if LANGUAGE_USE_INFORMAL_VARIANT}du{else}Sie{/if} nur diese E-Mail-Benachrichtigung nicht mehr erhalten {if LANGUAGE_USE_INFORMAL_VARIANT}möchtest{else}möchten{/if}, dann {if LANGUAGE_USE_INFORMAL_VARIANT}kannst du{else}können Sie{/if} diese direkt <a href="{link controller='NotificationDisable' isEmail=true}eventID={@$event->eventID}&userID={@$mailbox->getUser()->userID}&token={@$mailbox->getUser()->notificationMailToken}{/link}">abbestellen</a>.</p>]]></item>
<item name="wcf.user.notification.mail.daily.subject"><![CDATA[{if $count == 1}Neue Benachrichtigung{else}{#$count} neue Benachrichtigungen{/if}]]></item>
+ <item name="wcf.user.notification.mail.daily.plaintext.intro"><![CDATA[Hallo {@$mailbox->getUser()->username},
+
+{if LANGUAGE_USE_INFORMAL_VARIANT}du hast{else}Sie haben{/if} derzeit insgesamt {#$notifications|count} ungelesene Benachrichtigungen, die älter als 24 Stunden sind:]]></item>
+ <item name="wcf.user.notification.mail.daily.html.intro"><![CDATA[<h1>Hallo {@$mailbox->getUser()->username},</h1>
+
+<p>{if LANGUAGE_USE_INFORMAL_VARIANT}du hast{else}Sie haben{/if} haben derzeit insgesamt {#$notifications|count} ungelesene Benachrichtigungen, die älter als 24 Stunden sind:</p>]]></item>
<item name="wcf.user.notification.mail.daily.footer"><![CDATA[Diese E-Mail ist eine automatische Benachrichtigung. BITTE {if LANGUAGE_USE_INFORMAL_VARIANT}ANTWORTE{else}ANTWORTEN SIE{/if} NICHT AUF DIESE E-MAIL.
{if LANGUAGE_USE_INFORMAL_VARIANT}Du kannst{else}Sie können{/if} die Einstellungen für {if LANGUAGE_USE_INFORMAL_VARIANT}deine{else}Ihre{/if} Benachrichtigungen auf {@PAGE_TITLE|language} unter folgender URL detailliert konfigurieren:
<p>You can <a href="{link controller='NotificationDisable' isEmail=true}eventID={@$event->eventID}&userID={@$mailbox->getUser()->userID}&token={@$mailbox->getUser()->notificationMailToken}{/link}">disable only this type of notification</a> as well.</p>]]></item>
<item name="wcf.user.notification.mail.daily.subject"><![CDATA[{if $count == 1}New Notification{else}{#$count} New Notifications{/if}]]></item>
+ <item name="wcf.user.notification.mail.daily.plaintext.intro"><![CDATA[Dear {@$mailbox->getUser()->username},
+
+you currently have got {#$notifications|count} unread notifications that are older than 24 hours:]]></item>
+ <item name="wcf.user.notification.mail.daily.html.intro"><![CDATA[<h1>Hallo {@$mailbox->getUser()->username},</h1>
+
+<p>you currently have got {#$notifications|count} unread notifications that are older than 24 hours:</p>]]></item>
<item name="wcf.user.notification.mail.daily.footer"><![CDATA[This is an automatic notification, PLEASE DO NOT REPLY TO THIS EMAIL!
You can manage your notification settings for {@PAGE_TITLE|language} on the page below: