From 163a295e514cceffa8bcb6d027e3458127f0a779 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 30 Oct 2007 08:13:06 +0100 Subject: [PATCH] tweak html digest template (add excerpt) --- config.php-dist | 5 +++-- functions.php | 6 +++--- sanity_check.php | 2 +- templates/digest_template_html.txt | 8 +++++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/config.php-dist b/config.php-dist index 6da8eb1f..55c06844 100644 --- a/config.php-dist +++ b/config.php-dist @@ -149,7 +149,8 @@ define('DIGEST_FROM_NAME', 'Tiny Tiny RSS'); define('DIGEST_FROM_ADDRESS', 'noreply@your.domain.dom'); - // Name and address for sending email digests from. + define('DIGEST_SUBJECT', '[tt-rss] New headlines for last 24 hours'); + // Name, address and subject for sending email digests from. define('DIGEST_SMTP_HOST', ''); // SMTP Host to send digests. When blank tt-rss uses @@ -160,7 +161,7 @@ // These two options enable SMTP authentication when sending // digests. Require DIGEST_SMTP_HOST. - define('CONFIG_VERSION', 10); + define('CONFIG_VERSION', 11); // Expected config version. Please update this option in config.php // if necessary (after migrating all new options from this file). diff --git a/functions.php b/functions.php index 2303f54a..ab03832b 100644 --- a/functions.php +++ b/functions.php @@ -3231,7 +3231,7 @@ } $mail->IsHTML(true); - $mail->Subject = "[tt-rss] New headlines for last 24 hours"; + $mail->Subject = DIGEST_SUBJECT; $mail->Body = $digest; $mail->AltBody = $digest_text; @@ -3323,8 +3323,8 @@ $tpl->setVariable('ARTICLE_TITLE', $line["title"]); $tpl->setVariable('ARTICLE_LINK', $line["link"]); $tpl->setVariable('ARTICLE_UPDATED', $updated); -// $tpl->setVariable('ARTICLE_EXCERPT', -// truncate_string(strip_tags($line["excerpt"]), 100)); + $tpl->setVariable('ARTICLE_EXCERPT', + truncate_string(strip_tags($line["excerpt"]), 100)); $tpl->addBlock('article'); diff --git a/sanity_check.php b/sanity_check.php index 21fc0380..b9290b50 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -1,7 +1,7 @@ -

New headlines for last 24 hours, as of ${CUR_DATE} ${CUR_TIME}

+

New headlines for last 24 hours, as of ${CUR_DATE} ${CUR_TIME}

-

${FEED_TITLE}

+

${FEED_TITLE}

-

To unsubscribe, visit your configuration options or contact instance owner.

+
+To unsubscribe, visit your configuration options or contact instance owner.