Can replace homepage controller to inline latest news.
$monthname = ['?',
'januari', 'februari', 'maart', 'april', 'mei', 'juni',
'juli', 'augustus', 'september', 'oktober', 'november', 'december',
$monthname = ['?',
'januari', 'februari', 'maart', 'april', 'mei', 'juni',
'juli', 'augustus', 'september', 'oktober', 'november', 'december',
return preg_replace('{<h2>(.*?)</h2>}', $title, $html);
}
return preg_replace('{<h2>(.*?)</h2>}', $title, $html);
}
-function shownews($root, $limit = 5)
+function shownews($root, $limit = 1000)
{
if (strpos($root, '/') === FALSE) $root .= '/*';
foreach (array_reverse(glob("$root/*.html")) as $url) {
{
if (strpos($root, '/') === FALSE) $root .= '/*';
foreach (array_reverse(glob("$root/*.html")) as $url) {
--- /dev/null
+<?php
+include_once 'nieuws.inc.php';
+$articles = ($Page ?: 'nieuws') . '/????/??';
+shownews($articles, @$_GET['n'] ?: 5);
print "<h2>$title</h2>\n\n";
print '<div id="news">'."\n\n";
print "<h2>$title</h2>\n\n";
print '<div id="news">'."\n\n";
print "</div>\n\n";
return 1;
}
print "</div>\n\n";
return 1;
}