X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/f74276ad4a38479c8a5f7ccf065ab576cf2d192d..HEAD:/nieuws.inc.php diff --git a/nieuws.inc.php b/nieuws.inc.php deleted file mode 100644 index ca16b4a..0000000 --- a/nieuws.inc.php +++ /dev/null @@ -1,44 +0,0 @@ -%s %s %s', - intval($day), $monthname[intval($month)], $year); -} - -function shownewsarticle($url, $link = TRUE, $title = NULL) -{ - $html = ob_get_clean(); - $date = shownewsdate($url); - ob_start(); - print $title ?: '\1'; - print '[[1]]'; - - $title = sprintf( - $link ? '

%s

' : '

%s

', - getoutput([1 => ' '.$date.'']), - preg_replace('/\.html$/', '', $url) - ); - return preg_replace('{

(.*?)

}', $title, $html); -} - -function shownews($root, $limit = 5) -{ - foreach (array_reverse(glob("$root/*/*.html")) as $url) { - print "
"; - ob_start(); - include $url; - print shownewsarticle($url); - print "
\n\n"; - - if (--$limit <= 0) break; - } -}