Improved e-mail notifications
authorMarcel Werk <burntime@woltlab.com>
Fri, 7 Jun 2013 20:06:19 +0000 (22:06 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 7 Jun 2013 20:06:19 +0000 (22:06 +0200)
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentUserNotificationEvent.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index e20a2cd01ba79cd0cef22a195798793dd940b617..b5570d2eeba9c11519dacfdabf61c5bcc141d34f 100644 (file)
@@ -47,9 +47,11 @@ class UserProfileCommentResponseOwnerUserNotificationEvent extends AbstractUserN
                $owner = new User($comment->objectID);
                
                return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponseOwner.mail', array(
+                       'response' => $this->userNotificationObject,
                        'author' => $this->author,
                        'commentAuthor' => $commentAuthor,
-                       'owner' => $owner
+                       'owner' => $owner,
+                       'notificationType' => $notificationType
                ));
        }
        
index 54772a584e1dbaad8049e7e52b754562ee566218..26a613551fd05fa8c5518abf048cc72f31c2f036 100644 (file)
@@ -45,8 +45,10 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractUserNotifi
                $user = new User($comment->objectID);
                
                return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponse.mail', array(
+                       'response' => $this->userNotificationObject,
                        'author' => $this->author,
-                       'owner' => $user
+                       'owner' => $user,
+                       'notificationType' => $notificationType
                ));
        }
        
index e562acf24f1f29ddc7d78c4924223b4a19dea75b..c0eb133db7cc82db8390e6a6f7247bb94553ccc5 100644 (file)
@@ -39,8 +39,10 @@ class UserProfileCommentUserNotificationEvent extends AbstractUserNotificationEv
                $user = new User($this->userNotificationObject->objectID);
                
                return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.mail', array(
+                       'comment' => $this->userNotificationObject,
                        'author' => $this->author,
-                       'owner' => $user
+                       'owner' => $user,
+                       'notificationType' => $notificationType
                ));
        }
        
index fe3e0995ae799972b4f0ed65ecc0fcaad3d4be46..eeae882054be131f45a3e3a12ce04bcc31f52d57 100644 (file)
@@ -2253,15 +2253,27 @@ Möchten Sie diese E-Mail-Benachrichtigung in Zukunft nicht mehr erhalten, könn
                <item name="wcf.user.notification.comment.title"><![CDATA[Neuer Kommentar (Pinnwand)]]></item>
                <item name="wcf.user.notification.comment.message"><![CDATA[Hat einen Kommentar an Ihrer Pinnwand verfasst.]]></item>
                <item name="wcf.user.notification.comment.mail"><![CDATA[{@$author->username} hat einen Kommentar an Ihrer Pinnwand verfasst:
-{link controller='User' object=$owner encode=false forceFrontend=true}{/link}#wall]]></item>
+{if $notificationType == 'instant'}
+---------------------------------
+{@$comment->message} 
+---------------------------------
+{/if}{link controller='User' object=$owner encode=false forceFrontend=true}{/link}#wall]]></item>
                <item name="wcf.user.notification.commentResponse.title"><![CDATA[Neue Antwort (Pinnwand)]]></item>
                <item name="wcf.user.notification.commentResponse.message"><![CDATA[Hat eine Antwort zu Ihrem Kommentar an der Pinnwand von {$owner->username} verfasst.]]></item>
                <item name="wcf.user.notification.commentResponse.mail"><![CDATA[{@$author->username} hat eine Antwort zu Ihrem Kommentar an der Pinnwand von "{@$owner->username}" verfasst:
-{link controller='User' object=$owner encode=false forceFrontend=true}{/link}#wall]]></item>
+{if $notificationType == 'instant'}
+---------------------------------
+{@$response->message} 
+---------------------------------
+{/if}{link controller='User' object=$owner encode=false forceFrontend=true}{/link}#wall]]></item>
                <item name="wcf.user.notification.commentResponseOwner.title"><![CDATA[Neue Antwort (Pinnwand)]]></item>
                <item name="wcf.user.notification.commentResponseOwner.message"><![CDATA[Hat eine Antwort zum Kommentar von {$commentAuthor->username} an Ihrer Pinnwand verfasst.]]></item>
                <item name="wcf.user.notification.commentResponseOwner.mail"><![CDATA[{@$author->username} hat eine Antwort zum Kommentar von "{@$commentAuthor->username}" an Ihrer Pinnwand verfasst:
-{link controller='User' object=$owner encode=false forceFrontend=true}{/link}#wall]]></item>
+{if $notificationType == 'instant'}
+---------------------------------
+{@$response->message} 
+---------------------------------
+{/if}{link controller='User' object=$owner encode=false forceFrontend=true}{/link}#wall]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.notification.comment"><![CDATA[Neuer Kommentar an Ihrer Pinnwand]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.response.notification.commentResponse"><![CDATA[Neue Antwort auf einen Kommentar an Ihrer Pinnwand]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.response.notification.commentResponseOwner"><![CDATA[Neue Antwort auf einen Kommentar von Ihnen]]></item>
index 4fcc3360465bd847bc67e29eaee8220b783cfe8d..2d19e03039d80ab8527ae3f254bea13dba38ece8 100644 (file)
@@ -2209,15 +2209,27 @@ If you do not want to receive further email notifications for this event, you ca
                <item name="wcf.user.notification.comment.title"><![CDATA[New Comment (Wall)]]></item>
                <item name="wcf.user.notification.comment.message"><![CDATA[Wrote a comment on your wall.]]></item>
                <item name="wcf.user.notification.comment.mail"><![CDATA[{@$author->username} wrote a comment on your wall:
-{link controller='User' object=$owner encode=false forceFrontend=true}#wall{/link}]]></item>
+{if $notificationType == 'instant'}
+---------------------------------
+{@$comment->message} 
+---------------------------------
+{/if}{link controller='User' object=$owner encode=false forceFrontend=true}#wall{/link}]]></item>
                <item name="wcf.user.notification.commentResponse.title"><![CDATA[New Reply (Wall)]]></item>
                <item name="wcf.user.notification.commentResponse.message"><![CDATA[Wrote a reply to your comment on {$owner->username}’s wall.]]></item>
                <item name="wcf.user.notification.commentResponse.mail"><![CDATA[{@$author->username} wrote a reply to your comment on {@$owner->username}’s wall:
-{link controller='User' object=$owner encode=false forceFrontend=true}{/link}#wall]]></item>
+{if $notificationType == 'instant'}
+---------------------------------
+{@$response->message} 
+---------------------------------
+{/if}{link controller='User' object=$owner encode=false forceFrontend=true}{/link}#wall]]></item>
                <item name="wcf.user.notification.commentResponseOwner.title"><![CDATA[New Reply (Wall)]]></item>
                <item name="wcf.user.notification.commentResponseOwner.message"><![CDATA[Wrote a reply to {$commentAuthor->username}’s comment on your wall.]]></item>
                <item name="wcf.user.notification.commentResponseOwner.mail"><![CDATA[{@$author->username} wrote a reply to {@$commentAuthor->username}’s comment on your wall:
-{link controller='User' object=$owner encode=false forceFrontend=true}{/link}#wall]]></item>
+{if $notificationType == 'instant'}
+---------------------------------
+{@$response->message} 
+---------------------------------
+{/if}{link controller='User' object=$owner encode=false forceFrontend=true}{/link}#wall]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.notification.comment"><![CDATA[New comment on your wall]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.response.notification.commentResponse"><![CDATA[New reply to a comment on your wall]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.response.notification.commentResponseOwner"><![CDATA[New reply to one of your comments]]></item>