From 43992dc463575655a5767fcb1a8dcb18a1d4ffdf Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 19 Feb 2018 14:11:58 +0100 Subject: [PATCH] do not show summary if it is equal to body and some styling for the summary/article toggle links --- include/bbcode.php | 2 +- include/feedutils.php | 3 +++ view/css/conversation.css | 10 +++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 86fd24696..03a46444b 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -438,7 +438,7 @@ function bb_summary($match) { $rnd3 = mt_rand(); $rnd4 = mt_rand(); - return $match[1] . '
' . $match[2] . '
'; + return $match[1] . '
' . $match[2] . '
' . t('View article') . '
'; } diff --git a/include/feedutils.php b/include/feedutils.php index c4e9790de..369193fce 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -436,6 +436,9 @@ function get_atom_elements($feed, $item) { $summary = unxmlify($item->get_description(true)); + if($summary === $res['body']) + $summary = ''; + if(($summary) && ((strpos($summary,'<') !== false) || (strpos($summary,'>') !== false))) { $summary = purify_html($summary); $summary = html2bbcode($summary); diff --git a/view/css/conversation.css b/view/css/conversation.css index 77a600deb..f7ab3dcdd 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -286,7 +286,6 @@ img.smiley.emoji:hover { height: 32px; } - .checklist input { margin: 0px; vertical-align: middle; @@ -296,6 +295,15 @@ img.smiley.emoji:hover { padding: 15px; } +.view-summary { + margin-bottom: 1rem; +} + +.view-article { + margin-top: 1rem; +} + + #filer_save { margin-left: 15px; }