';
printf(
X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/1428caff970f73f026f1467c7741798ca7c9272c..c0f916285fa69edb97a6c8311f567b90b3959ed3:/nieuws.inc.php diff --git a/nieuws.inc.php b/nieuws.inc.php index 40313e4..1a68993 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -78,16 +78,27 @@ 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 [^>]* ) >\s* )+ (]*>) | \n(.*?)
}s', $this->body, $bodyp)) { + return $bodyp[1]; + } + } + function img() { + $this->img = NULL; $this->body; return $this->img; } @@ -113,9 +124,11 @@ function shownews($input, $limit = 1000) $article = new ArchiveArticle($filename); print '