tweak html digest template (add excerpt)

This commit is contained in:
Andrew Dolgov 2007-10-30 08:13:06 +01:00
parent c62a2c21ba
commit 163a295e51
4 changed files with 12 additions and 9 deletions

View File

@ -149,7 +149,8 @@
define('DIGEST_FROM_NAME', 'Tiny Tiny RSS'); define('DIGEST_FROM_NAME', 'Tiny Tiny RSS');
define('DIGEST_FROM_ADDRESS', 'noreply@your.domain.dom'); 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', ''); define('DIGEST_SMTP_HOST', '');
// SMTP Host to send digests. When blank tt-rss uses // SMTP Host to send digests. When blank tt-rss uses
@ -160,7 +161,7 @@
// These two options enable SMTP authentication when sending // These two options enable SMTP authentication when sending
// digests. Require DIGEST_SMTP_HOST. // digests. Require DIGEST_SMTP_HOST.
define('CONFIG_VERSION', 10); define('CONFIG_VERSION', 11);
// Expected config version. Please update this option in config.php // Expected config version. Please update this option in config.php
// if necessary (after migrating all new options from this file). // if necessary (after migrating all new options from this file).

View File

@ -3231,7 +3231,7 @@
} }
$mail->IsHTML(true); $mail->IsHTML(true);
$mail->Subject = "[tt-rss] New headlines for last 24 hours"; $mail->Subject = DIGEST_SUBJECT;
$mail->Body = $digest; $mail->Body = $digest;
$mail->AltBody = $digest_text; $mail->AltBody = $digest_text;
@ -3323,8 +3323,8 @@
$tpl->setVariable('ARTICLE_TITLE', $line["title"]); $tpl->setVariable('ARTICLE_TITLE', $line["title"]);
$tpl->setVariable('ARTICLE_LINK', $line["link"]); $tpl->setVariable('ARTICLE_LINK', $line["link"]);
$tpl->setVariable('ARTICLE_UPDATED', $updated); $tpl->setVariable('ARTICLE_UPDATED', $updated);
// $tpl->setVariable('ARTICLE_EXCERPT', $tpl->setVariable('ARTICLE_EXCERPT',
// truncate_string(strip_tags($line["excerpt"]), 100)); truncate_string(strip_tags($line["excerpt"]), 100));
$tpl->addBlock('article'); $tpl->addBlock('article');

View File

@ -1,7 +1,7 @@
<?php <?php
require_once "functions.php"; require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 10); define('EXPECTED_CONFIG_VERSION', 11);
define('SCHEMA_VERSION', 24); define('SCHEMA_VERSION', 24);
if (!file_exists("config.php")) { if (!file_exists("config.php")) {

View File

@ -1,14 +1,16 @@
<!-- $BeginBlock digest --> <!-- $BeginBlock digest -->
<h1>New headlines for last 24 hours, as of ${CUR_DATE} ${CUR_TIME}</h1> <h1 style='font-size : x-large'>New headlines for last 24 hours, as of ${CUR_DATE} ${CUR_TIME}</h1>
<!-- $BeginBlock feed --> <!-- $BeginBlock feed -->
<h2>${FEED_TITLE}</h2> <h2 style='font-size : large'>${FEED_TITLE}</h2>
<ul> <ul>
<!-- $BeginBlock article --> <!-- $BeginBlock article -->
<li><a href="${ARTICLE_LINK}">${ARTICLE_TITLE}</a> - ${ARTICLE_UPDATED} <li><a href="${ARTICLE_LINK}">${ARTICLE_TITLE}</a> - ${ARTICLE_UPDATED}
<p style='color : gray'>${ARTICLE_EXCERPT}</p>
<!-- $EndBlock article --> <!-- $EndBlock article -->
</ul> </ul>
<!-- $EndBlock feed --> <!-- $EndBlock feed -->
<p><em>To unsubscribe, visit your configuration options or contact instance owner.</em></p> <hr>
<em>To unsubscribe, visit your configuration options or contact instance owner.</em>
<!-- $EndBlock digest --> <!-- $EndBlock digest -->