Hi
I have been coding a bit on a Zenphoto plugin the last couple of days, it is a sitemap generator which can be used with the larger search engines (Google, Live Search, etc.) and it's compatible with the sitemaps.org specifications.
It's really simple to install, just copy the file into the zp-core/plugins directory, activate the plugin through the administration interface and then point the search engines at [your Zenphoto folder]/?sitemap, and it will take care of the rest.
Link for download and (a little) more info is on my homepage.
Note: I am aware that there is an existing Google sitemap generator already, which is mentioned on the hacks page. But I haven't been able to access the site linked to recently, and now that I have seen the code it honestly isn't that pretty made.
By the way... Shouldn't there be a plugins section here on the forums, in order to keep them a bit separated from the Zenphoto core?
How this would happen depends on the wishes of the author. We can place a link or a download on the plugins page http://www.zenphoto.org/2008/06/zenphoto-plugins/.
Thanks very much for this plugin! I installed it yesterday and submitted in google webmaster tools, it was crawled right away, and it's already leading to additional traffic - I'm getting top 3 in google for many search terms now for the albums, where my blog was hanging around page 2 for the same terms.
One warning that I have in google is the following, FYI:
For ?sitemap=root
All the URLs in your Sitemap have the same priority.
All the URLs in your Sitemap are set to the same priority (not the default priority). Priority indicates the importance of a particular URL relative to other URLs on your site, and doesn't impact your site's performance in search results. If all URLs have the same priority, Google can't tell which are more important.
I'm glad that you find the plugin useful and that it's helping you out
Regarding that error, I have had another report from another user experiencing the same warning message. I don't think it has any effect, but the warning could probably be avoided by removing/commenting out line 64 of the plugin (echo "1.0\n";).
I don't understand why I don't get the warning message though...
Tenzer: Thanks for taking time to write the plugin. I tried to see how the sitemap looks like in your site. I tried accessing http://gallery.tenzer.dk/?sitemap. It didn't produce XML sitemap. It created something like:
http://gallery.tenzer.dk/?sitemap=root http://gallery.tenzer.dk/?sitemap=7 http://gallery.tenzer.dk/?sitemap=3 http://gallery.tenzer.dk/?sitemap=4 http://gallery.tenzer.dk/?sitemap=6 http://gallery.tenzer.dk/?sitemap=5 http://gallery.tenzer.dk/?sitemap=8 http://gallery.tenzer.dk/?sitemap=9
Reg. priority: Only the top URL should be 1.0; album URLs can be 0.5; and all pictures should be 0.5 or 0.4;
In your program, there is a common code to set priority for all URLs. If it's set based on type of the page (front page, album, picture, etc), that would be nice.
Also, there is no frequency mentioned. SEs will love to see the frequency so that they know when to come back.
I haven't installed your plugin yet. I want to change the priority parm before installing it.
Hi all
I have updated the plugin with two minor fixes. You can read the detailed information at my homepage: http://tenzer.dk/zenphoto-sitemap-101
jollywood, a sitemap was generated when you tried it out on my gallery, but your browser was simply interpreting the page as normal HTML, which means that it only showed the links. If you chose "View source" you would see the correct XML file.
One of the changes in the new version is that the correct XML content type header is sent out, which informs your browser that it is receiving an XML file.
The plugin doesn't specify any priorities any longer, since it didn't work out correctly before. In order for priorities to work correctly, all the URLs has to be in the same XML file, since the priorities are only compared with other URLs in the same XML file.
Since that would be a larger piece of work that would need to be put into that, I just skipped out the priority part for now. It may be the next thing to do for the plugin.
It's hard for me to specify the change frequency, as that purely depends on the activity in the gallery. Some logic to calculate how often new pictures are added, and how often new comments are posted would probably have to made then, which makes the plugin much larger than what I aimed it to be. I just wanted to have it as a file that is put into the Zenphoto plugin folder, and just works from there.
The other approach to this would be that the administrator of the gallery simply specified the change frequency for each type of page (root, gallery, picture), and then some kind of interface would have to be made for this in the administration interface, but that is probably easier than coding the above described logic into the plugin.
The plugin has been updated again, in order to solve an issue when having folder or image paths with non-alphanumeric or international characters. You can find more information about it here:
http://tenzer.dk/zenphoto-sitemap-102
After a long wait, I've gotten around to updating this plugin again, this time with a large rewrite, hence the new version number 2.0.0: http://tenzer.dk/zenphoto-sitemap-2-0-0
This version does not really bring any new features, but instead gives performance improvements, and lowers the amount of database and HTTP queries needed from the search engines.
I do have a few ideas for new features, which can be found on the issue tracker for the plugins GitHub page: http://github.com/Tenzer/zenphoto-sitemap/issues
Let me know if you experience any issues with it, or if you have any feature requests!
You're welcome
I generally tried to make the plugin as easy to use as possible, by not requiring write permissions anywhere on the file system or any mod_rewrite rules and such, but I guess some checking could be made to see if a certain path is writable, and in that case generate a static sitemap. The difficult part would then be when to update the sitemap, but I'll have to look further into that.
Right, thank you for the hint acrylian. Otherwise I was thinking about storing a serialized array with all the current URLs in the database, and then update that once in a while. That would limit the amount of database queries significantly. But static files are most certainly more efficient
@Tenzer: In case you are interessted I have a little extended your sitemap plugin to cover Zenpage items as well. I also added caching within the standard html_cache folder. It runs on my demo site: http://zenphoto.maltem.de/?sitemap and download for now is here: http://zenphoto.maltem.de/uploaded/zenphoto-sitemap-extended.zip.
Only thing missing is a admin overview button to clear the cache manually right now.