';
printf(
X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/1428caff970f73f026f1467c7741798ca7c9272c..fd777fa3e0ebcb76bb6fdfadbc257b451d5db925:/nieuws.inc.php diff --git a/nieuws.inc.php b/nieuws.inc.php index 40313e4..a0fa821 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -78,16 +78,25 @@ class ArchiveArticle { $this->title; $rest = fread($this->file, filesize($this->page)); - if ( preg_match('{\n
(]*>)
}', $rest, $img, PREG_OFFSET_CAPTURE) ) { - $this->img = $img[1][0]; + if ( preg_match('{\n < (?: p | figure [^>]* ) > (]*>) | \n(.*?)
}s', $this->body, $bodyp)) { + return $bodyp[1]; + } + } + function img() { + $this->img = NULL; $this->body; return $this->img; } @@ -113,9 +122,11 @@ function shownews($input, $limit = 1000) $article = new ArchiveArticle($filename); print '