X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/2e10347a695b92658507b8422eb9694412737361..c00b91e7b8738a6f6a6c61dddc44b532c0d131d2:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index 678c3db..468de28 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -12,63 +12,18 @@ if ($page and !is_numeric($page)) { if ($article->image) { $Place['image'] = "https://lijtweg.nl/".$article->thumb('600x'); } - if ($replyform) { - print '

Reacties

'."\n"; - $pagelink = $Page.$Args; - - if ($_POST) { - try { - @mkdir($pagelink); - $target = $pagelink.'/'.date('YmdHis').':'.$User['name'].'.txt'; - $written = file_put_contents($target, $_POST['reply']); - if ($written === FALSE) { - throw new Exception('Fout bij opslaan'); - } - $_POST['reply'] = NULL; - } - catch (Exception $e) { - print '

Antwoord niet opgeslagen.

'."\n\n"; - } - } - - print '\n\n"; + print placeholder_include('nieuws/replies'); } - return 1; } if ($year) { ob_clean(); + $match = $Page; $title = "Nieuws"; if (is_numeric($year) and $year > 999) { - $match = "$Page/$year/"; + $match .= "/$year"; if (is_numeric($page)) { $title .= ' '.$monthname[intval($page)]; $match .= sprintf('%02d-', $page); @@ -76,17 +31,20 @@ if ($year) { $title .= ' '.$year; } elseif ($year === '19') { - $match = "$Page/19??/"; + $match .= "/19??"; $title .= " vóór 2000"; } print "

$title

\n\n"; - shownews(glob($match.'*.html')); + print placeholder_include('nieuws', [$match]); return 1; } $html = ob_get_clean(); -printf(''."\n", "/$Page/feed"); +printf(''."\n", + "/$Page/feed", + ' rel="alternate" title="Atom feed van nieuwsberichten" type="application/atom+xml"' +); print $html; print '
'."\n\n";