Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-18 08:51:21

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

jmd_sitemap: Sitemap generator

Download 0.1.2. Requires 4.0.6 and PHP 5.

Features

  • Follows most of the sitemaps.org protocol (priority and changefreq elements are omitted)
  • Excludable sections
  • Manual sitemap creation by clicking “Update” in the extensions tab
  • Sitemap automatically generated upon article creation and modification

Notes

  • I didn’t implement the priority and changefreq elements because they don’t seem useful.
  • You must create and chmod 666 sitemap.xml.gz in your web root (i.e., alongside images/ and index.php).
  • Validate your sitemap with Google Webmaster Tools – the gzip’ed sitemap will return errors for most sitemap validators, unless you gunzip it and validate the XML file.

Todo (next version)

Todo (maybe/someday)

  • gbp_permanent_links compatibility

Changelog

  • 2008-05-18: 0.1: Initial release
  • 2008-05-18: 0.1.1: Corrected XML declaration
  • 2008-06-07: 0.1.2: Fixed a future articles bug

Last edited by jm (2008-07-23 06:31:47)

Offline

#2 2008-05-18 09:48:36

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: jmd_sitemap: Sitemap generator

Awesome, thank you!

Offline

#3 2008-05-18 10:23:42

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,058
Website GitHub Mastodon Twitter

Re: jmd_sitemap: Sitemap generator

hi JM,

What’s the difference between yours and sencer’s implementation?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2008-05-18 10:54:06

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: jmd_sitemap: Sitemap generator

I get an error from Google Sitemaps with this plugin :-(

Sencer’s one was working

Unsupported file format
Your Sitemap does not appear to be in a supported format. Please ensure it meets our Sitemap guidelines and resubmit.

Last edited by FireFusion (2008-05-18 11:28:56)

Offline

#5 2008-05-18 11:05:06

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: jmd_sitemap: Sitemap generator

Maybe this can help

About Sitemap errors and warnings
XML Sitemap Format

Only thing I could spot int the header was the header order. I changed this and i’m waiting to see if it has an effect….

<?xml encoding="utf-8" version="1.0"?>

To this…

<?xml version="1.0" encoding="UTF-8"?>

Last edited by FireFusion (2008-05-18 11:18:31)

Offline

#6 2008-05-18 11:28:42

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: jmd_sitemap: Sitemap generator

^ Changing the header as above fixed the sitemap.

Google is fussy.

Last edited by FireFusion (2008-05-18 11:55:57)

Offline

#7 2008-05-18 11:54:03

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: jmd_sitemap: Sitemap generator

No, Google merely follows W3C specifications for XML

[23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

The encoding value is case insensitive, so it could be either UTF-8 or utf-8.

Offline

#8 2008-05-18 14:53:40

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_sitemap: Sitemap generator

Whoops! I fixed the attribute order for 0.1.1 – thanks Ruud.

colak wrote:

What’s the difference between yours and sencer’s implementation?

Mainly excludable sections (without editing source code). My plugin doesn’t manually ping Google either – it’s no longer needed after you add your sitemap via robots.txt or Google webmaster tools.

Offline

#9 2008-05-19 11:03:30

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: jmd_sitemap: Sitemap generator

> Requires 4.0.6 and PHP5.

I am having PHP-Version: 4.4.8 in my shared hosting environment :-(

Would it be possible to get a PHP4 version or simply run the old version (as I do)?


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#10 2008-05-19 14:50:04

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_sitemap: Sitemap generator

It is possible, but it isn’t worth the effort. Did your host miss gophp5?

If you do want to backport it to PHP 4, you’ll need to add an ISO 8601 function to replace date('c'), and you’ll need to remove every private and public keyword, basically making OOP worthless.

But really, make your host upgrade. A number of shared hosts have two versions of PHP running – you just “turn on” PHP 5 with a line in a .htaccess file.

Last edited by jm (2008-05-19 14:50:25)

Offline

#11 2008-05-21 21:33:30

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: jmd_sitemap: Sitemap generator

Thanks for the tip. I will ask my hosting company (1&1 Germany).


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#12 2008-05-22 02:38:37

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_sitemap: Sitemap generator

Markus – check this out :).

Offline

Board footer

Powered by FluxBB