X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/ae841e9139f7eb89f8f5fc2242d4b0d7c121418a..11c30da0ff491c29301ec1a42e7873d556364c74:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index 374b9b0..b4191ce 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -6,56 +6,15 @@ $replyform = $Page == 'melding' && !empty($User); if ($page and !is_numeric($page)) { $edit = !empty($User['admin']) ? htmlspecialchars(@$_GET['edit']) : NULL; - print shownewsarticle($Page.$Args, FALSE, $edit); - + $article = new ArchiveArticle("$Page$Args.html"); + $Place[1] = ' '.$article->date.''; + print preg_replace('{(?<=

)(.*?)(?=

)}', ($edit ?: '\1').' [[1]]', ob_get_clean()); + 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; } @@ -80,6 +39,10 @@ if ($year) { return 1; } +$html = ob_get_clean(); +printf(''."\n", "/$Page/feed"); +print $html; + print '
'."\n\n"; foreach (array_reverse(glob("$Page/2???")) as $page) {