font-size: {$style->getVariable('wcfFontSizeTitle')};
color: {$style->getVariable('wcfContentHeadlineText')};
}
+ small {
+ font-size: {$style->getVariable('wcfFontSizeSmall')};
+ font-weight: 300;
+ }
{* Buttons *}
td.button {
padding: 20px;
}
+ .box128 td.boxContent {
+ padding-left: 20px;
+ }
+
.containerHeadline h3 {
margin: 0;
padding: 0;
+ font-weight: 400;
}
</style>
</head>
{if $mimeType === 'text/plain'}
{lang}wcf.user.notification.follow.mail.plaintext{/lang}
{else}
+ {lang}wcf.user.notification.follow.mail.html{/lang}
{assign var='user' value=$event->getAuthor()}
{capture assign='userContent'}
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td><a href="{link controller='User' object=$user}{/link}" title="{$user->username}">{@$user->getAvatar()->getImageTag(128)}</a></td>
- <td>
+ <td><a href="{link controller='User' object=$user isEmail=true}{/link}" title="{$user->username}">{@$user->getAvatar()->getImageTag(128)}</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}
- <br style="clear:both">
- {lang}wcf.user.notification.follow.mail.html{/lang}
{/if}
--- /dev/null
+{if $mimeType === 'text/plain'}
+{lang}wcf.user.notification.comment.mail.plaintext{/lang}
+{$event->getUserNotificationObject()->message}
+{else}
+ {lang}wcf.user.notification.comment.mail.html{/lang}
+ {assign var='user' value=$event->getAuthor()}
+ {assign var='comment' value=$event->getUserNotificationObject()}
+ {capture assign='userContent'}
+ <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 class="boxContent">
+ <div class="containerHeadline">
+ <h3>
+ {if $comment->userID}
+ <a href="{link controller='User' object=$user isEmail=true}{/link}">{$comment->username}</a>
+ {else}
+ {$comment->username}
+ {/if}
+ ·
+ <small>{$comment->time|plainTime}</small>
+ </h3>
+ </div>
+ <div>
+ {$comment->message}
+ </div>
+ </td>
+ </tr>
+ </table>
+ {/capture}
+ {include file='email_paddingHelper' block=true class='box128' content=$userContent sandbox=true}
+{/if}
<?php
namespace wcf\system\user\notification\event;
+use wcf\data\user\User;
use wcf\system\cache\runtime\UserProfileRuntimeCache;
use wcf\system\request\LinkHandler;
use wcf\system\user\notification\object\CommentUserNotificationObject;
* @inheritDoc
*/
public function getEmailMessage($notificationType = 'instant') {
- $user = UserProfileRuntimeCache::getInstance()->getObject($this->getUserNotificationObject()->objectID);
-
- $authors = $this->getAuthors();
- if (count($authors) > 1) {
- if (isset($authors[0])) {
- unset($authors[0]);
- }
- $count = count($authors);
-
- return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.mail.stacked', [
- 'author' => $this->author,
- 'authors' => array_values($authors),
- 'count' => $count,
- 'others' => $count - 1,
- 'owner' => $user,
- 'notificationType' => $notificationType,
- 'guestTimesTriggered' => $this->notification->guestTimesTriggered
- ]);
- }
-
- return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.mail', [
- 'comment' => $this->userNotificationObject,
- 'author' => $this->author,
- 'owner' => $user,
- 'notificationType' => $notificationType
- ]);
+ return [
+ 'template' => 'email_notification_userProfileComment',
+ 'application' => 'wcf',
+ 'variables' => [
+ 'owner' => new User($this->getUserNotificationObject()->objectID)
+ ]
+ ];
}
/**
<item name="wcf.user.notification.follow.message"><![CDATA[{@$author->getAnchorTag()} folgt {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if}.]]></item>
<item name="wcf.user.notification.follow.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$others} weiteren{/if} folgen {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if}.]]></item>
<item name="wcf.user.notification.follow.mail.plaintext"><![CDATA[{@$event->getAuthor()->username} [URL:{link controller='User' object=$event->getAuthor() isEmail=true}{/link}] folgt {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if}.]]></item>
- <item name="wcf.user.notification.follow.mail.html"><![CDATA[<p><a href="{link controller='User' object=$event->getAuthor() isEmail=true}{/link}">{$event->getAuthor()->username}</a> folgt {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if}.</p>]]></item>
+ <item name="wcf.user.notification.follow.mail.html"><![CDATA[<p><a href="{link controller='User' object=$event->getAuthor() isEmail=true}{/link}">{$event->getAuthor()->username}</a> folgt {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if}:</p>]]></item>
<item name="wcf.user.notification.comment.title"><![CDATA[Neuer Kommentar (Pinnwand)]]></item>
<item name="wcf.user.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} neue Kommentare (Pinnwand)]]></item>
<item name="wcf.user.notification.comment.message"><![CDATA[{if !$author->userID}Ein Gast{else}{@$author->getAnchorTag()}{/if} hat einen Kommentar an <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">{if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand</a> verfasst.]]></item>
<item name="wcf.user.notification.comment.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count != 1}{if $count == 2 && !$guestTimesTriggered} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3}{if !$guestTimesTriggered} und {else}, {/if} {@$authors[2]->getAnchorTag()}{/if}{/if}{if $guestTimesTriggered} und {if $guestTimesTriggered == 1}ein Gast{else}Gäste{/if}{/if}{else}{@$authors[0]->getAnchorTag()}{if $guestTimesTriggered},{else} und{/if} {#$others} weitere Benutzer {if $guestTimesTriggered}und {if $guestTimesTriggered == 1}ein Gast{else}Gäste{/if}{/if}{/if} haben Kommentare an <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">{if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand</a> verfasst.]]></item>
- <item name="wcf.user.notification.comment.mail"><![CDATA[{if !$author->userID}ein Gast{else}{@$author->username}{/if} hat einen Kommentar an {if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand verfasst:
-{if $notificationType == 'instant'}
----------------------------------
-{@$comment->message}
----------------------------------
-{/if}{link controller='User' object=$owner isEmail=true}#wall{/link}]]></item>
- <item name="wcf.user.notification.comment.mail.stacked"><![CDATA[{if $count < 4}{@$authors[0]->username}{if $count != 1}{if $count == 2 && !$guestTimesTriggered} und {else}, {/if}{@$authors[1]->username}{if $count == 3}{if !$guestTimesTriggered} und {else}, {/if} {@$authors[2]->username}{/if}{/if}{if $guestTimesTriggered} und {if $guestTimesTriggered == 1}ein Gast{else}Gäste{/if}{/if}{else}{@$authors[0]->username}{if $guestTimesTriggered},{else} und{/if} {#$others} weitere Benutzer {if $guestTimesTriggered}und {if $guestTimesTriggered == 1}ein Gast{else}Gäste{/if}{/if}{/if} haben Kommentare an Ihrer Pinnwand verfasst:
-{link controller='User' object=$owner isEmail=true}#wall{/link}]]></item>
+ <item name="wcf.user.notification.comment.mail.plaintext"><![CDATA[{if !$event->getAuthor()->userID}ein Gast{else}{@$event->getAuthor()->username} [URL:{link controller='User' object=$event->getAuthor() isEmail=true}{/link}]{/if} hat einen Kommentar an {if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand [URL:{link controller='User' object=$notificationContent[variables][owner] isEmail=true}#wall{/link}] verfasst:]]></item>
+ <item name="wcf.user.notification.comment.mail.html"><![CDATA[<p>{if !$event->getAuthor()->userID}ein Gast{else}<a href="{link controller='User' object=$event->getAuthor() isEmail=true}{/link}">{@$event->getAuthor()->username}</a>{/if} hat einen Kommentar an <a href="{link controller='User' object=$notificationContent[variables][owner] isEmail=true}#wall{/link}">{if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand</a> verfasst:</p>]]></item>
<item name="wcf.user.notification.comment.like.title"><![CDATA[Gefällt ein Kommentar (Pinnwand)]]></item>
<item name="wcf.user.notification.comment.like.title.stacked"><![CDATA[{#$count} Benutzern gefällt {if LANGUAGE_USE_INFORMAL_VARIANT}dein{else}Ihr{/if} Kommentar (Pinnwand)]]></item>
<item name="wcf.user.notification.comment.like.message"><![CDATA[{@$author->getAnchorTag()} gefällt {if LANGUAGE_USE_INFORMAL_VARIANT}dein{else}Ihr{/if} Kommentar an {if $owner === null}<a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">{if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand</a>{else}der <a href="{link controller='User' object=$owner}#wall{/link}">Pinnwand von {$owner->username}</a>{/if}.]]></item>
<item name="wcf.user.notification.follow.message"><![CDATA[{@$author->getAnchorTag()} follows you.]]></item>
<item name="wcf.user.notification.follow.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} and {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} and {#$others} others{/if} follow you.]]></item>
<item name="wcf.user.notification.follow.mail.plaintext"><![CDATA[{@$event->getAuthor()->username} [URL:{link controller='User' object=$event->getAuthor() isEmail=true}{/link}] is following you.]]></item>
- <item name="wcf.user.notification.follow.mail.html"><![CDATA[<a href="{link controller='User' object=$event->getAuthor() isEmail=true}{/link}">{$event->getAuthor()->username}</a> is following you.]]></item>
+ <item name="wcf.user.notification.follow.mail.html"><![CDATA[<p><a href="{link controller='User' object=$event->getAuthor() isEmail=true}{/link}">{$event->getAuthor()->username}</a> is following you:</p>]]></item>
<item name="wcf.user.notification.comment.title"><![CDATA[New Comment (Wall)]]></item>
<item name="wcf.user.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} new comments (Wall)]]></item>
<item name="wcf.user.notification.comment.message"><![CDATA[{if !$author->userID}A guest{else}{@$author->getAnchorTag()}{/if} wrote a comment on <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>.]]></item>
<item name="wcf.user.notification.comment.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count != 1}{if $count == 2 && !$guestTimesTriggered} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3}{if !$guestTimesTriggered} and {else}, {/if} {@$authors[2]->getAnchorTag()}{/if}{/if}{if $guestTimesTriggered} and {if $guestTimesTriggered == 1}a guest{else}guests{/if}{/if}{else}{@$authors[0]->getAnchorTag()}{if $guestTimesTriggered},{else} and{/if} {#$others} other users {if $guestTimesTriggered}and {if $guestTimesTriggered == 1}a guest{else}guests{/if}{/if}{/if} wrote comments on <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>.]]></item>
- <item name="wcf.user.notification.comment.mail"><![CDATA[{if !$author->userID}a guest{else}{@$author->username}{/if} wrote a comment on your wall:
-{if $notificationType == 'instant'}
----------------------------------
-{@$comment->message}
----------------------------------
-{/if}{link controller='User' object=$owner isEmail=true}#wall{/link}]]></item>
- <item name="wcf.user.notification.comment.mail.stacked"><![CDATA[{if $count < 4}{@$authors[0]->username}{if $count != 1}{if $count == 2 && !$guestTimesTriggered} and {else}, {/if}{@$authors[1]->username}{if $count == 3}{if !$guestTimesTriggered} and {else}, {/if} {@$authors[2]->username}{/if}{/if}{if $guestTimesTriggered} and {if $guestTimesTriggered == 1}a guest{else}guests{/if}{/if}{else}{@$authors[0]->username}{if $guestTimesTriggered},{else} and{/if} {#$others} other users {if $guestTimesTriggered}and {if $guestTimesTriggered == 1}a guest{else}guests{/if}{/if}{/if} wrote comments on your wall:
-{link controller='User' object=$owner isEmail=true}#wall{/link}]]></item>
+ <item name="wcf.user.notification.comment.mail.plaintext"><![CDATA[{if !$event->getAuthor()->userID}ein Gast{else}{@$event->getAuthor()->username} [URL:{link controller='User' object=$event->getAuthor() isEmail=true}{/link}]{/if} wrote a comment on your wall [URL:{link controller='User' object=$notificationContent[variables][owner] isEmail=true}#wall{/link}]:]]></item>
+ <item name="wcf.user.notification.comment.mail.html"><![CDATA[<p>{if !$event->getAuthor()->userID}ein Gast{else}<a href="{link controller='User' object=$event->getAuthor() isEmail=true}{/link}">{@$event->getAuthor()->username}</a>{/if} wrote a comment <a href="{link controller='User' object=$notificationContent[variables][owner] isEmail=true}#wall{/link}">your wall</a>:</p>]]></item>
<item name="wcf.user.notification.comment.like.title"><![CDATA[Likes a comment (Wall)]]></item>
<item name="wcf.user.notification.comment.like.title.stacked"><![CDATA[{#$count} users like your comment (Wall)]]></item>
<item name="wcf.user.notification.comment.like.message"><![CDATA[{@$author->getAnchorTag()} likes your comment on {if $owner === null}<a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>{else}<a href="{link controller='User' object=$owner}#wall{/link}">{$owner->username}’s wall</a>{/if}.]]></item>