4 'januari', 'februari', 'maart', 'april', 'mei', 'juni',
5 'juli', 'augustus', 'september', 'oktober', 'november', 'december',
8 function showdate($parts)
11 return implode(' ', array_filter([
12 intval(@$parts[2]), $parts[1] > 0 ? $monthname[intval($parts[1])] : '', $parts[0],
13 count($parts) > 5 ? "$parts[3]:$parts[4]" : '',
19 function __construct($path)
22 $this->link = preg_replace('{(?:/index)?\.html$}', '', $path);
27 return $this->$col = $this->$col(); # run method and cache
32 if (!file_exists($this->page)) return;
33 return fopen($this->page, 'r');
38 return preg_replace('{<h2>(.*)</h2>\s*}', '\1', fgets($this->file));
43 return trim(strip_tags($this->title));
48 return $this->safetitle ?: $this->link;
53 return filemtime($this->page);
58 return date(DATE_ATOM, $this->last);
63 preg_match('< / (\d{4}) [/-] (\d{2}) (?:- (\d{2}) )? - >x', $this->page, $ymd);
70 return implode('-', $this->dateparts()) . 'T12:00:00+02:00';
75 return showdate($this->dateparts);
81 $rest = fread($this->file, filesize($this->page));
83 \n (?: < (?: p | figure [^>]* ) >\s* )+ (<img\ [^>]*>) | \n <hr\ />
84 }x', $rest, $img, PREG_OFFSET_CAPTURE) ) {
86 $this->img = $img[1][0];
88 return substr($rest, 0, $img[0][1]);
95 if (preg_match('{<p>(.*?)</p>}s', $this->body, $bodyp)) {
109 if ( preg_match('/\bsrc="([^"]*)"/', $this->img, $src) ) {
114 function thumb($size = '300x')
116 if (!$this->image or $this->image[0] !== '/') return;
118 ['{^(?:/thumb/[^/]*)?}', '/\.groot(?=\.\w+$)/'], ["thumb/$size", ''],