From db3b8b188b7cc8b93948fd09e537ce92a0146f7e Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 27 Apr 2021 16:41:44 +0200 Subject: [PATCH] nieuws: indicate abbreviated teaser contents In story text is not identical, advertise where to find more details. Assumes an external non-interactive display for now. --- widget/nieuws.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/widget/nieuws.php b/widget/nieuws.php index 49f0453..10e31a3 100644 --- a/widget/nieuws.php +++ b/widget/nieuws.php @@ -19,7 +19,16 @@ function shownews($input, $limit = 1000, $abbr = FALSE) '

%s %s

', $article->link, $article->title, showdate($article->dateparts) ); - print $abbr ? "

{$article->teaser}

\n" : $article->story; + if ($abbr) { + print '

' . $article->teaser; + if ($article->story != "

{$article->teaser}

\n\n") { + print ' (Meer op de site)'; + } + print "

\n"; + } + else { + print $article->story; + } print ''; print "\n\n"; -- 2.30.0