X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/7213175b8391e8f47f54096fada4fdc33d82b8a1..d634e557c4fbdb23d054be46377da7cafb68d7f4:/widget/nieuws.php
diff --git a/widget/nieuws.php b/widget/nieuws.php
index 0dc8d7d..dd019a3 100644
--- a/widget/nieuws.php
+++ b/widget/nieuws.php
@@ -3,6 +3,7 @@ if (!function_exists('shownews')) {
function shownews($input, $limit = 1000)
{
if (!is_array($input)) $input = glob("$input/*.html");
+ print "
\n";
foreach (array_reverse($input) as $filename) {
$article = new ArchiveArticle($filename);
print '
';
@@ -16,7 +17,7 @@ function shownews($input, $limit = 1000)
print '';
printf(
'
',
- $article->link, $article->title, $article->date
+ $article->link, $article->title, showdate($article->dateparts)
);
print $article->story;
print '
';
@@ -24,6 +25,7 @@ function shownews($input, $limit = 1000)
if (--$limit <= 0) break;
}
+ print " \n";
}
function printtoc($input, $class = FALSE)
@@ -42,7 +44,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";
@@ -51,23 +53,26 @@ 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');
printf('
'."\n", $page, $year);
printtoc($page, 'gallery');
}
+ print "
\n";
return;
}
$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);
+$Page->raw = ob_get_clean();
+print $Page->render();