Additions:
===Sample output===
http://nitens.org/taraborelli/home/sitemap.xml
===Validation===
[[http://www.validome.org/google/validate?url=http://nitens.org/taraborelli/home/sitemap.xml&lang=en&googleTyp=SITEMAP Validome]]
===Code===
Save the following as ##handlers/page/sitemap.xml.php##
$xml .= '<?xml version="1.0" encoding="utf-8"?>'."\n";
header('Content-Type: text/xml; charset=utf-8');
http://nitens.org/taraborelli/home/sitemap.xml
===Validation===
[[http://www.validome.org/google/validate?url=http://nitens.org/taraborelli/home/sitemap.xml&lang=en&googleTyp=SITEMAP Validome]]
===Code===
Save the following as ##handlers/page/sitemap.xml.php##
$xml .= '<?xml version="1.0" encoding="utf-8"?>'."\n";
header('Content-Type: text/xml; charset=utf-8');
Deletions:
$xml .= '<?xml version="1.0" encoding="iso-8859-1"?>'."\n";
header('Content-Type: text/xml; charset=iso-8859-1');
Additions:
===Discussion===
It would be nice to calculate the optimal value for changefreq as a function of the actual history of revisions of a page. As a first approximation, the following query gives all the data one may need:
%%(sql)
SELECT SQL_NO_CACHE tag,
MAX(time) as latest,
MIN(time) as first,
DATEDIFF(MAX(time), MIN(time)) as history,
COUNT(id) as revisions
FROM wikka_pages
GROUP BY tag
ORDER BY revisions DESC;%%
Dividing the number of existing revisions by the number of days between the first and the last edit should give an approximate index of the frequency with which the page has been modified. Unfortunately this approach is not able to make any useful distinction between a page that has been modified several times per hour on a single date and has been unchanged for months vs. a page that has been modified on a regular basis every week or month.
It would be nice to calculate the optimal value for changefreq as a function of the actual history of revisions of a page. As a first approximation, the following query gives all the data one may need:
%%(sql)
SELECT SQL_NO_CACHE tag,
MAX(time) as latest,
MIN(time) as first,
DATEDIFF(MAX(time), MIN(time)) as history,
COUNT(id) as revisions
FROM wikka_pages
GROUP BY tag
ORDER BY revisions DESC;%%
Dividing the number of existing revisions by the number of days between the first and the last edit should give an approximate index of the frequency with which the page has been modified. Unfortunately this approach is not able to make any useful distinction between a page that has been modified several times per hour on a single date and has been unchanged for months vs. a page that has been modified on a regular basis every week or month.
Additions:
===handlers/page/sitemap.xml.php===