[geeklog-cvs] geeklog: Made the comment notification email a bit nicer and mor...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Apr 13 06:47:44 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/a815234a6238
changeset: 6934:a815234a6238
user:      Dirk Haun <dirk at haun-online.de>
date:      Mon Apr 13 10:07:09 2009 +0200
description:
Made the comment notification email a bit nicer and more personal

diffstat:

3 files changed, 18 insertions(+), 12 deletions(-)
language/english.php       |    7 ++++---
language/english_utf-8.php |    7 ++++---
system/lib-comment.php     |   16 ++++++++++------

diffs (62 lines):

diff -r 2be2c5fff798 -r a815234a6238 language/english.php
--- a/language/english.php	Mon Apr 13 08:47:58 2009 +0200
+++ b/language/english.php	Mon Apr 13 10:07:09 2009 +0200
@@ -215,9 +215,10 @@
     35 => 'Save Changes to Queue',
     36 => 'Notify me of new replies',
     37 => 'New Comment Reply',
-    38 => 'Someone has replied to your comment.',
-    39 => 'You may view the comment thread at the following address: ',
-    40 => 'If you wish to receive no further notifications of replies, visit the following link: '
+    38 => "A reply has been made to your comment '%s'.",
+    39 => 'You may view the comment thread at the following address:',
+    40 => 'If you wish to receive no further notifications of replies, visit the following link:',
+    41 => 'Hello %s,'
 );
 
 ###############################################################################
diff -r 2be2c5fff798 -r a815234a6238 language/english_utf-8.php
--- a/language/english_utf-8.php	Mon Apr 13 08:47:58 2009 +0200
+++ b/language/english_utf-8.php	Mon Apr 13 10:07:09 2009 +0200
@@ -215,9 +215,10 @@
     35 => 'Save Changes to Queue',
     36 => 'Notify me of new replies',
     37 => 'New Comment Reply',
-    38 => 'Someone has replied to your comment.',
-    39 => 'You may view the comment thread at the following address: ',
-    40 => 'If you wish to receive no further notifications of replies, visit the following link: '
+    38 => "A reply has been made to your comment '%s'.",
+    39 => 'You may view the comment thread at the following address:',
+    40 => 'If you wish to receive no further notifications of replies, visit the following link:',
+    41 => 'Hello %s,'
 );
 
 ###############################################################################
diff -r 2be2c5fff798 -r a815234a6238 system/lib-comment.php
--- a/system/lib-comment.php	Mon Apr 13 08:47:58 2009 +0200
+++ b/system/lib-comment.php	Mon Apr 13 10:07:09 2009 +0200
@@ -1739,14 +1739,18 @@
 
     if (($_USER['uid'] != $A['uid']) || $send_self) {
 
+        $name = COM_getDisplayName($A['uid']);
+        $title = DB_getItem($_TABLES['comments'], 'title', "cid = {$A['cid']}");
+        $commenturl = $_CONF['site_url'] . '/comment.php';
+
         $mailsubject = $_CONF['site_name'] . ': ' . $LANG03[37];
 
-        $mailbody  = $LANG03[38] . LB . LB;
-        $mailbody .= $LANG03[39] . LB . $_CONF['site_url']
-                  . '/comment.php?mode=view&cid=' . $A['cid'] . '&format=nested'
-                  . LB . LB;
-        $mailbody .= $LANG03[40] . LB . $_CONF['site_url']
-                  . '/comment.php?mode=unsubscribe&key=' . $A['deletehash'];
+        $mailbody  = sprintf($LANG03[41], $name) . LB . LB;
+        $mailbody .= sprintf($LANG03[38], $title) . LB . LB;
+        $mailbody .= $LANG03[39] . LB . '<' . $commenturl . '?mode=view&cid='
+                  . $A['cid'] . '&format=nested' . '>' . LB . LB;
+        $mailbody .= $LANG03[40] . LB . '<' . $commenturl
+                  . '?mode=unsubscribe&key=' . $A['deletehash'] . '>' . LB;
 
         $email = DB_getItem($_TABLES['users'], 'email', "uid = {$A['uid']}");
         if (!empty($email)) {



More information about the geeklog-cvs mailing list