Revision history for GoogleSitemapHandler


Revision [23398]

Last edited on 2016-05-20 07:38:48 by DarTar [Replaces old-style internal links with new pipe-split links.]
Additions:
This is a drop-in extension that provides support for [[https://www.google.com/webmasters/tools/docs/en/protocol.html | Google Sitemaps]] in Wikka. Priority and frequency can be customized for a specific list of pages. The sitemap can be accessed by appending ##/sitemap.xml## to the full URL of any page.
**Note** this is a preliminary implementation based on a previous [[GoogleSitemap | draft]] by BarkerJr, improvements are welcome. Tested on 1.1.6.5.
[[http://www.validome.org/google/validate?url=http://nitens.org/taraborelli/home/sitemap.xml&lang=en&googleTyp=SITEMAP | Validome]]
Deletions:
This is a drop-in extension that provides support for [[https://www.google.com/webmasters/tools/docs/en/protocol.html Google Sitemaps]] in Wikka. Priority and frequency can be customized for a specific list of pages. The sitemap can be accessed by appending ##/sitemap.xml## to the full URL of any page.
**Note** this is a preliminary implementation based on a previous [[GoogleSitemap draft]] by BarkerJr, improvements are welcome. Tested on 1.1.6.5.
[[http://www.validome.org/google/validate?url=http://nitens.org/taraborelli/home/sitemap.xml&lang=en&googleTyp=SITEMAP Validome]]


Revision [20454]

Edited on 2009-02-10 11:21:42 by DarTar [sample output and validation]
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');
Deletions:
===handlers/page/sitemap.xml.php===
$xml .= '<?xml version="1.0" encoding="iso-8859-1"?>'."\n";
header('Content-Type: text/xml; charset=iso-8859-1');


Revision [20450]

Edited on 2009-02-10 08:00:56 by DarTar [discussion]
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.


Revision [20449]

Edited on 2009-02-10 06:31:43 by DarTar [[m] fixed path]
Additions:
===handlers/page/sitemap.xml.php===
Deletions:
===handlers/sitemap.xml.php===


Revision [20447]

The oldest known version of this page was created on 2009-02-10 06:30:04 by DarTar [[m] fixed path]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki