-
Notifications
You must be signed in to change notification settings - Fork 0
/
sitemap.php
29 lines (28 loc) · 1.15 KB
/
sitemap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
require_once(dirname(__FILE__).'/zp-core/folder-definitions.php');
define('OFFSET_PATH', 0);
require_once(ZENFOLDER . "/template-functions.php");
require_once(ZENFOLDER . "/zp-extensions/sitemap-extended.php");
if(!getOption('zp_plugin_sitemap-extended')) {
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
include(ZENFOLDER. '/404.php');
exit();
}
startSitemapCache();
// Output content type and charset
header('Content-Type: text/xml;charset=utf-8');
// Output XML file headers, and plug the plugin :)
sitemap_echonl('<?xml version="1.0" encoding="UTF-8"?>');
sitemap_echonl('<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">');
printSitemapIndexLinks();
printSitemapAlbumsAndImages();
// Optional Zenpage stuff
if(getOption('zp_plugin_zenpage')) {
printSitemapZenpagePages();
printSitemapZenpageNewsIndex();
printSitemapZenpageNewsArticles();
printSitemapZenpageNewsCategories();
}
sitemap_echonl('</urlset>');// End off the <urlset> tag
endSitemapCache();