X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/1428caff970f73f026f1467c7741798ca7c9272c..234326791b1e8177eb475bffc5956d7086cfac4e:/nieuws.php
diff --git a/nieuws.php b/nieuws.php
index 338a6b6..15a0dfb 100644
--- a/nieuws.php
+++ b/nieuws.php
@@ -1,5 +1,56 @@
';
+ if ($article->thumb) {
+ $imgattr = ' class="left"';
+ if (preg_match('{ (\s alt="[^"]+") }x', $article->img, $img)) {
+ $imgattr .= $img[0]; # preserve alt value
+ }
+ printf('', $article->thumb, $imgattr);
+ }
+ print '
';
+ printf(
+ '
',
+ $article->link, $article->title, $article->date
+ );
+ print $article->body;
+ print '
';
+ print "\n\n";
+
+ if (--$limit <= 0) break;
+ }
+}
+
+function printtoc($input, $class = FALSE)
+{
+ if (!is_array($input)) $input = glob("$input/*.html");
+ print '';
+ foreach (array_reverse($input) as $page) {
+ $article = new ArchiveArticle($page);
+ $html = $article->safetitle;
+ $dateparts = $article->dateparts;
+ if ($class) {
+ $dateparts[0] = 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";
+ }
+ print "
\n";
+}
+}
+
$articles = (ltrim($Args, '/') ?: 'nieuws');
if (strpos($articles, '/') === FALSE) {
if (@$Place['view'] === 'toc') {