Zenphoto Sitemap SEO Mar 07, 2010 | Comments: 0

sitemap preview


Latest version: 1.0.3. Get it here. Preview it here.


Senario:

You have a zenphoto installation with thousands upon thousands of photos and now are increasingly using page and blog functionality of this awesome open source project. You've got a lot of content with a database full of metadata and a lot of search engine potential. However, the majority of the traffic on your site are the crawler bots themselves since your site is so expansive.

The Almost-Solution

This is my problem. When this was written I had 33,067 images in 262 albums. The crawler traffic was huge and unnecessary. Then I ran across this plugin by Jeppe Fihl Toustrup (Tenzer). However, although this plugin is very zen-like and simply functional, it's not very optimized to my situation. The new version includes every album on every page which results in a ridiculous sql query and a resulting xml file that brings my browser to a halt trying to work on it. Also, very few of the great features outlined in the sitemap standard are implemented.

Solution

I've gone through and rewritten the plugin to be more explicit and helpful to the crawler. The <lastmod> tag is automatically used based on the date in the database, as well and the <changefreq> and <priority> are both set. Also extremely important is that this version includes pages and news articles, not just simply albums and images.

Download

Get it here, zenphoto-sitemap2-seo.php.zip

Also take a look at the code, formatted as HTML.

Example

Try it out by going to my sitemap file. It's best to see it in firefox (even if you're like me and perfer safari on a mac or chrome on linux), and it looks like what's in the screenshot above.


Site by Tim O'Brien. Powered by zenphoto cms. Random Photo

Shopping Cart