+ function dateparts()
+ {
+ preg_match('</(\d{4})/(\d{2})-(\d{2})->', $this->page, $ymd);
+ return $ymd;
+ }
+
+ function dateiso()
+ {
+ return implode('-', $this->dateparts());
+ }
+
+ function date()
+ {
+ return showdate($this->dateparts);
+ }
+
+ function body()
+ {
+ return fread($this->file, filesize($this->page));
+ }
+
+ function image()
+ {
+ foreach (['jpg', 'png'] as $ext) {
+ if (file_exists("{$this->link}.$ext")) {
+ return "{$this->link}.$ext";
+ }
+ }
+ }
+
+ function thumb($size = '300x')
+ {
+ if ($this->image)
+ return "thumb/$size/{$this->image}";
+ }