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 fgets($this->file);
42 return preg_replace('{<h2>(.*)</h2>\s*}', '\1', $this->rawtitle);
46 return trim(strip_tags($this->title));
50 return $this->safetitle ?: $this->link;
55 return filemtime($this->page);
59 return date(DATE_ATOM, $this->last);
64 preg_match('< / (\d{4}) [/-] (\d{2}) (?:- (\d{2}) )? - >x', $this->page, $ymd);
70 return implode('-', $this->dateparts()) . 'T12:00:00+02:00';
74 return showdate($this->dateparts);
79 if (!$this->file) return;
81 return fread($this->file, filesize($this->page) ?: 1);
86 \n (?: < (?: p | figure [^>]* ) >\s* )+ (<img\ [^>]*>) | \n <hr\ />
87 }x', $this->body, $img, PREG_OFFSET_CAPTURE) ) {
88 # strip part after matching divider (image)
90 $this->img = $img[1][0];
92 return substr($this->body, 0, $img[0][1]);
99 return $this->rawtitle . $this->body;
103 if (preg_match('{<p>(.*?)</p>}s', $this->story, $bodyp)) {
116 if ( preg_match('/\bsrc="([^"]*)"/', $this->img, $src) ) {
120 function thumb($size = '300x')
122 if (!$this->image or $this->image[0] !== '/') return;
124 ['{^(?:/thumb/[^/]*)?}', '/\.groot(?=\.\w+$)/'], ["thumb/$size", ''],