Zenphoto plugin: Zenphoto Sitemap
I have been coding a bit the last couple of days on a plugin for the gallery system Zenphoto. I wasn't very happy with how the images where indexed from my gallery, and I couldn't find any other decent coded sitemap generators for Zenphoto, so I decided to create one on my own.
The result is a one-file plugin for Zenphoto, which is being activated by putting ?sitemap in the URL for your Zenphoto gallery. When that is in the URL, a sitemap index will be generated, pointing to a new sitemap for each album in the gallery, which then contains links for each image in the album. The result is a sitemaps.org compatible sitemap structure which can be used with several search engines, ie. Google, Live Search among many others.
You can find more information on how to get the plugin and install it one the sub-page I have created for it. It is to be found at Open source -> Zenphoto Sitemap. Enjoy!
Comments
8 Responses to “Zenphoto plugin: Zenphoto Sitemap”
Leave a Reply

Google Buzz
Launchpad
Hello Jeppe,
I'm using this plugin now and added the sitemap to my google account.
It seems like everything is fine, except for ?sitemap=root. Here Google gives me a warning which I will try to translate from dutch into english ;) :
'All URL's in your sitemap have the same priority (not the standard priority). Priority will tell Google about the importance of one URL over another. If all URL's have the same priority, Google doesn't know which one is more important'.
I don't know if this can do 'harm' to how the sitemap functions or that I could be banned. I guess not, but perhaps this ?root isn't even necessary?
Hi!
The '?sitemap=root' page only holds information about the front page of the gallery. This is since I'm using a sitemap index as the root sitemap, and that doesn't allow me to put in page entries on the root sitemap.
In order to get the front page indexed, I then have to make a separate sub-sitemap for the front page, since it otherwise should be included in one of the sub-sitemaps for an album.
I have Google using the sitemap as well, and that doesn't complain about the '?sitemap=root' sitemap, however, I can see what it's referring to. There may not be a reason for supplying a priority to the single page in the sitemap, since it can't give a relative priority, if there aren't any other pages it can compare the priority to.
A possible easy fix would be to comment out/delete line 64 in the plugin (
echo "<priority>1.0</priority>\n";) and see if that helps out.I've done that. I will check my google account in the next few days to see if something has changed.
Thanks for the explanation.
You're welcome. Please let me know if that helps on anything, then I'll change it for any upcoming versions, if there's going to be any :)
I added some new images ans Google downloaded the sitemap a few thimes since I changed what you suggested, by I still get that same warning. :(
Hi, great plugin!
Just my 2 coins: it will be perfect if you add
header('Content-Type: text/xml;charset=utf-8');
just after:
/**
* At this point we are going to try to create the sitemap!
*/
Thank you Adrien!
Oh, I never really thought about the headers of the XML document, but I'll include that later today, and probably make a minor updated version which the few corrections so far.
Btw, is there anywhere where the headers are important?
[...] popular plugins: Slideshow_Flash, Zenphoto Sitemap [...]