From: Mischa POSLAWSKY Date: Tue, 27 Apr 2021 14:41:44 +0000 (+0200) Subject: nieuws: indicate abbreviated teaser contents X-Git-Tag: v5.3~21 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/db3b8b188b7cc8b93948fd09e537ce92a0146f7e?hp=dbca237bfe80d6479802b6089c9213aaece4ff6d 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. --- 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";