diff options
Diffstat (limited to 'classes/digest.php')
-rw-r--r-- | classes/digest.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/classes/digest.php b/classes/digest.php index 0d2cac77e..68859d67c 100644 --- a/classes/digest.php +++ b/classes/digest.php @@ -166,6 +166,15 @@ class Digest $line['feed_title'] = $line['cat_title'] . " / " . $line['feed_title']; } + $article_labels = Article::get_article_labels($line["ref_id"], $user_id); + $article_labels_formatted = ""; + + if (is_array($article_labels) && count($article_labels) > 0) { + $article_labels_formatted = implode(", ", array_map(function($a) { + return $a[1]; + }, $article_labels)); + } + $tpl->setVariable('FEED_TITLE', $line["feed_title"]); $tpl->setVariable('ARTICLE_TITLE', $line["title"]); $tpl->setVariable('ARTICLE_LINK', $line["link"]); @@ -174,6 +183,7 @@ class Digest truncate_string(strip_tags($line["content"]), 300)); // $tpl->setVariable('ARTICLE_CONTENT', // strip_tags($article_content)); + $tpl->setVariable('ARTICLE_LABELS', $article_labels_formatted, true); $tpl->addBlock('article'); @@ -181,8 +191,9 @@ class Digest $tpl_t->setVariable('ARTICLE_TITLE', $line["title"]); $tpl_t->setVariable('ARTICLE_LINK', $line["link"]); $tpl_t->setVariable('ARTICLE_UPDATED', $updated); -// $tpl_t->setVariable('ARTICLE_EXCERPT', -// truncate_string(strip_tags($line["excerpt"]), 100)); + $tpl_t->setVariable('ARTICLE_LABELS', $article_labels_formatted, true); + $tpl_t->setVariable('ARTICLE_EXCERPT', + truncate_string(strip_tags($line["excerpt"]), 300), true); $tpl_t->addBlock('article'); |