Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv30653
Modified Files:
NEWS serendipity_lang_en.inc.php serendipity_lang_de.inc.php
serendipity_functions.inc.php
Log Message:
ALternate subscription mail for TRACKBACKs
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- NEWS 18 Sep 2003 12:57:46 -0000 1.24
+++ NEWS 20 Sep 2003 12:19:06 -0000 1.25
@@ -2,6 +2,8 @@
Version 0.3 ()
------------------------------------
+ * Differentiate subscription mails between regular comment and trackback and adjust the mail's content corresponding to this (garvinhicking)
+ * Verbose output for DB creation on installation, PostgreSQL DB-setup fixes (jtate)
* Made XHTML-compatibility fix to radio buttons of the installer (garvinhicking)
* Browse categories (on multiple pages) and have per-category RSS-feed (garvinhicking+sbergmann)
* Fixed display of category in full article (garvinhicking)
Index: serendipity_lang_en.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_lang_en.inc.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- serendipity_lang_en.inc.php 20 Sep 2003 03:43:56 -0000 1.40
+++ serendipity_lang_en.inc.php 20 Sep 2003 12:19:06 -0000 1.41
@@ -256,6 +256,7 @@
@define('UNSUBSCRIBE_OK', "%s is now unsubscribed from this entry");
@define('NEW_COMMENT_TO_SUBSCRIBED_ENTRY', 'New comment to subscribed entry "%s"');
@define('SUBSCRIPTION_MAIL', "Hello %s,\n\nA new comment was made to the entry you are monitoring on \"%s\", entitled \"%s\"\nThe name of the poster is: %s\n\nYou can find the entry here: %s\n\nYou can unsubscribe by clicking on this link: %s\n");
+@define('SUBSCRIPTION_TRACKBACK_MAIL', "Hello %s,\n\nA new trackbacke was added to the entry you are monitoring on \"%s\", entitled \"%s\"\nThe name of the poster is: %s\n\nYou can find the entry here: %s\n\nYou can unsubscribe by clicking on this link: %s\n");
@define('SIGNATURE', "\n-- \n%s is powered by Serendipity.\nThe best blog around, you can use it too.\nCheck out <http://s9y.org> to find out how.");
@define('DATABASE_ALREADY_INSTALLED', 'SKIPPED: Database already installed');
@define('SYNDICATION_PLUGIN_091', 'RSS 0.91 feed');
Index: serendipity_lang_de.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_lang_de.inc.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- serendipity_lang_de.inc.php 20 Sep 2003 12:07:30 -0000 1.32
+++ serendipity_lang_de.inc.php 20 Sep 2003 12:19:06 -0000 1.33
@@ -257,6 +257,7 @@
@define('UNSUBSCRIBE_OK', 'TRANSLATE_ME');
@define('NEW_COMMENT_TO_SUBSCRIBED_ENTRY', 'Benachrichtigung zu neuem Kommentar des Eintrags "%s"');
@define('SUBSCRIPTION_MAIL', "Hallo %s,\n\nEin neues Kommentar wurde dem Eintrag hinzugefügt, den Sie auf \"%s\" namens \"%s\" finden.\nDer Name des Autoren ist: %s\n\nSie können den Eintrag hier finden: %s\n\nSie können diese Benachrichtung mit folgender URL kündigen: %s\n");
+@define('SUBSCRIPTION_TRACKBACK_MAIL', "Hallo %s,\n\nEin neues Trackback wurde dem Eintrag hinzugefügt, den Sie auf \"%s\" namens \"%s\" finden.\nDer Name des Autoren ist: %s\n\nSie können den Eintrag hier finden: %s\n\nSie können diese Benachrichtung mit folgender URL kündigen: %s\n");
@define('SIGNATURE', "\n-- \n%s wird betrieben mit Serendipity.\nDas allerbeste blog, Sie können es auch nutzen.\nWie das geht, sehen Sie auf <http://s9y.org>.");
@define('DATABASE_ALREADY_INSTALLED', 'ÜBERSPRUNGEN: Datenbank besteht bereits');
@define('SYNDICATION_PLUGIN_091', 'RSS 0.91 feed');
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- serendipity_functions.inc.php 20 Sep 2003 03:43:56 -0000 1.154
+++ serendipity_functions.inc.php 20 Sep 2003 12:19:06 -0000 1.155
@@ -1012,7 +1012,7 @@
$entryURI = serendipity_archiveURL($entry_id, $title);
$subject = '[' . $serendipity['blogTitle'] . '] ' . sprintf(NEW_COMMENT_TO_SUBSCRIBED_ENTRY, $title);
- $sql = "SELECT author, email
+ $sql = "SELECT author, email, type
FROM {$serendipity['dbPrefix']}comments
WHERE entry_id = $entry_id
AND email <> '$posterMail'
@@ -1025,16 +1025,29 @@
}
foreach ($subscribers as $subscriber) {
- $text = sprintf(
- SUBSCRIPTION_MAIL,
+ if ($subscriber['type'] == 'TRACKBACK') {
+ $text = sprintf(
+ SUBSCRIPTION_TRACKBACK_MAIL,
- $subscriber['author'],
- $serendipity['blogTitle'],
- $title,
- $poster,
- $entryURI,
- $serendipity['baseURL'] .'unsubscribe/'. urlencode($subscriber['email']) .'/'. $entry_id
- );
+ $subscriber['author'],
+ $serendipity['blogTitle'],
+ $title,
+ $poster,
+ $entryURI,
+ $serendipity['baseURL'] .'unsubscribe/'. urlencode($subscriber['email']) .'/'. $entry_id
+ );
+ } else {
+ $text = sprintf(
+ SUBSCRIPTION_MAIL,
+
+ $subscriber['author'],
+ $serendipity['blogTitle'],
+ $title,
+ $poster,
+ $entryURI,
+ $serendipity['baseURL'] .'unsubscribe/'. urlencode($subscriber['email']) .'/'. $entry_id
+ );
+ }
mail($subscriber['email'], $subject, $text . $serendipity['signature'], "From: {$serendipity['blogTitle']} <$fromEmail>\r\n". $serendipity['mailheaders']);
}
|