X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/58445e7f5d88512e4b558fc1b9658e9ce49e273a..a6e2e74ced2c2a0aa816b2002c5d7d037b45f436:/nieuws.inc.php?ds=sidebyside
diff --git a/nieuws.inc.php b/nieuws.inc.php
index 1565c63..40313e4 100644
--- a/nieuws.inc.php
+++ b/nieuws.inc.php
@@ -130,14 +130,24 @@ function shownews($input, $limit = 1000)
}
}
-function printtoc($input)
+function printtoc($input, $class = FALSE)
{
if (!is_array($input)) $input = glob("$input/*.html");
- print '
';
+ print '';
foreach (array_reverse($input) as $page) {
$article = new ArchiveArticle($page);
$html = $article->safetitle;
- $html .= sprintf(' %s', $article->date);
+ $dateparts = $article->dateparts;
+ if ($class) {
+ $dateparts[1] = NULL; # omit year
+ }
+ $html .= sprintf(' %s', showdate($dateparts));
+ if ($class == 'gallery' and $article->img) {
+ $html = "$html
";
+ $html = sprintf('', $article->thumb(200)) . $html;
+ }
$html = sprintf('%s', $article->link, $html);
print "- $html
\n";
}