<?php
-global $monthname;
-$monthname = ['?',
- 'januari', 'februari', 'maart', 'april', 'mei', 'juni',
- 'juli', 'augustus', 'september', 'oktober', 'november', 'december',
-];
-
-function showdate($parts)
-{
- global $monthname;
- return implode(' ', array_filter([
- intval(@$parts[2]), $parts[1] > 0 ? $monthname[intval($parts[1])] : '', $parts[0],
- count($parts) > 5 ? "$parts[3]:$parts[4]" : '',
- ]));
-}
-
class ArchiveArticle
{
public $raw, $title, $body; # file contents
{
return implode('-', $this->dateparts()) . 'T12:00:00+02:00';
}
- function date()
- {
- return showdate($this->dateparts);
- }
function story()
{
--- /dev/null
+<?php
+global $monthname;
+$monthname = ['?',
+ 'januari', 'februari', 'maart', 'april', 'mei', 'juni',
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december',
+];
+
+function showdate($parts)
+{
+ global $monthname;
+ return implode(' ', array_filter([
+ intval(@$parts[2]), $parts[1] > 0 ? $monthname[intval($parts[1])] : '', $parts[0],
+ count($parts) > 5 ? "$parts[3]:$parts[4]" : '',
+ ]));
+}
+
$Page->title = $edit;
}
if ($Page->dateparts) {
- $Page->place[1] = ' <small class="date">'.$Page->date.'</small>';
+ $Page->place[1] = ' <small class="date">'.showdate($Page->dateparts).'</small>';
}
else {
$Page->place[1] = '';
# output dynamic and/or static html
+include_once 'format.inc.php';
+
ob_start();
if ($Page->handler and !require("./{$Page->handler}/index.php")) {
# replace contents by code output on false return
print '<div>';
printf(
'<h3><a href="/%s">%s <small class="date">%s</small></a></h3>',
- $article->link, $article->title, $article->date
+ $article->link, $article->title, showdate($article->dateparts)
);
print $article->story;
print '</div>';