]));
}
+function shownewsimage($url)
+{
+ foreach (['jpg', 'png'] as $ext) {
+ if (file_exists("$url.$ext")) {
+ return "$url.$ext";
+ }
+ }
+}
+
function shownewsarticle($url, $link = TRUE, $title = NULL)
{
$html = ob_get_clean();
getoutput([1 => ' <small class="date">'.$date.'</small>']),
$url
);
+
+ if (!$link and $image = shownewsimage($url)) {
+ global $Place;
+ $Place['image'] = "https://lijtweg.nl/thumb/600x/".$image;
+ ob_start();
+ print '[[1]]';
+ $html .= getoutput([
+ 1 => sprintf("\n".'<p><img src="%s" /></p>', "/thumb/640x/".$image),
+ ]);
+ }
+
return preg_replace('{<h2>(.*?)</h2>}', $title, $html);
}