X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/d3ed59c2753c2babd5aa9a1c5e0109c644904ba8..HEAD:/widget/nieuws.php diff --git a/widget/nieuws.php b/widget/nieuws.php index c1b651a..10e31a3 100644 --- a/widget/nieuws.php +++ b/widget/nieuws.php @@ -1,6 +1,6 @@ \n"; @@ -17,9 +17,18 @@ function shownews($input, $limit = 1000) print '
'; printf( '

%s %s

', - $article->link, $article->title, $article->date + $article->link, $article->title, showdate($article->dateparts) ); - print $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"; @@ -44,7 +53,7 @@ function printtoc($input, $class = FALSE) $html .= sprintf(' %s', showdate($dateparts)); if ($class == 'gallery' and $article->img) { $html = "
$html
"; - $html = sprintf('', $article->thumb(200)) . $html; + $html = sprintf('', $article->thumb(200)) . $html; } $html = sprintf('%s', $article->link, $html); print "
  • $html
  • \n"; @@ -53,9 +62,9 @@ function printtoc($input, $class = FALSE) } } -$articles = (ltrim($Args, '/') ?: 'nieuws'); +$articles = $Page->place[0] ?? 'nieuws'; if (strpos($articles, '/') === FALSE) { - if (@$Place['view'] === 'toc') { + if (@$Page->place['view'] === 'toc') { print "
    \n"; foreach (array_reverse(glob("$articles/2???")) as $page) { $year = basename($page, '.html'); @@ -68,10 +77,11 @@ if (strpos($articles, '/') === FALSE) { $articles .= '/????'; } -if (@$Place['view'] === 'toc') { +if (@$Page->place['view'] === 'toc') { printtoc($articles); return; } ob_start(); -shownews($articles, @$Place['n'] ?: 5); -print getoutput(); +shownews($articles, @$Page->place['n'] ?: 5, !empty($Page->place['teaser'])); +$Page->raw = ob_get_clean(); +print $Page->render();