X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/053009b156c6f814fb405c8575bb294aab512627..0fc7deecbeed58bc99c94a1e0b89ac51f006a163:/sitemap.xml/index.php diff --git a/sitemap.xml/index.php b/sitemap.xml/index.php index 7d28815..a753b52 100644 --- a/sitemap.xml/index.php +++ b/sitemap.xml/index.php @@ -1,5 +1,5 @@ api) return; header('Content-Type: application/atom+xml; charset=utf-8'); print ''; $siteref = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST']; @@ -7,16 +7,25 @@ $siteref = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTT files() as $link) { - $article = new ArchiveArticle($link); +foreach ($search->files() as $article) { print ''; print "$siteref/{$article->link}"; + $score = 10; + if ($article->link) { + $score -= substr_count($article->link, '/') + 1; # -10% per subdir + $age = time() - strtotime($article->dateiso); + $age /= 3600 * 24 * 365; # years + if ($age > .1) $score -= $age / 10 + .1; # -1% per year + } + printf('%.2f', $score / 10); if ($article->last) { print "{$article->lastiso}"; } print "\n"; } +$Page = $caller; ?>