Tested on CPG 1.4.x
(
Though it should work on any other versions that have the same basic table structure as the current pictures and albums tables)
I'm calling this one
JAKE_CPG_SITEMAP to distinguish it from Nibbler's Google sitemap mod.
This will produce
Google-friendly sitemap info in valid XML format for all of your categories and individual pages (Permanent URLs, of course).
No CPG files need to be modified whatsoever - this is a completely standalone script I developed (with paid professional assistance) for another site, and then modified for use in my Coppermine galleries.
This script produces sitemaps that are
paginated automatically (Page 1, page 2, etc.). Google can handle sitemaps with up to 50,000 URL's in them, but it prefers (ie - responds much better to) smaller sitemaps with an "Index of indexes" setup.
Install once, submit the main page to Google and forget about it.
When you make a change, the sitemap is automatically updated. No need to rebuild it... ever.
I've got a decent amount of money invested in this because I needed the SEO value of having all of my gallery pages spidered by Google, but I'm willing to share it with the Coppermine community to give back, so to speak. All I ask in return is a link (see the readme.txt). (The link isn't mandatory, but you'll be a better person for it.)
You'll need to edit 2 files with your own website information. One is the connection script (I don't use Coppermine's include/config.inc.php for technical reasons), and the other is the main script where you'll have to change things like:
YOUR_URL_HERE (etc.)
All really basic stuff, and it's
extremely well documented, so you shouldn't have any trouble at all.
Here is a working example:
"Index of indexes":
http://www.freeclipartfree.com/gallery_sitemap_xml.php"Regular index"
http://www.freeclipartfree.com/gallery_sitemap_xml.php?category=13&page=3Jake