Google sitemaps Google sitemaps
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Google sitemaps

Started by Nibbler, June 09, 2005, 06:16:51 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Nibbler

New in from the 'Let's make life even easier for google' department...

Run this script from your server to create a google sitemap. Check google for details on the system itself, but the idea is that you create an xml file with info about your site that is then used by their crawlers. This will generate such an xml file. It comes in 2 flavours. The simple version will work for everyone*, and the PHP5 CPG 1.4 version is there for people with more up-to-date kit and uses a proper DOM to create the output plus other fun stuff. Both versions support all the tags, produce valid xml according to the schema, support gz compression, and can be used to create a static xml file for larger galleries or be run directly for up to the second results for smaller galleries. They generate links to all publicly accessible category, album, and picture pages.

Both come with all options disabled, so enable what you need by changing the commented info at the top of the files. There is no GUI as they are intended to be cronable.

Simple : PHP4.1+ and CPG 1.2+
Plus : PHP5/xml and CPG 1.4.x

Dagon

Quote from: Nibbler on June 09, 2005, 06:16:51 PM
Simple : PHP4.1+ and CPG 1.2+
Plus : PHP5/xml and CPG 1.4.x
Very nice, however it seems the files are the exact opposite as you describe.  The simple zip is actually for PHP5/xml and CPG 1.4.x, and the plus zip is for PHP4.1+ and CPG 1.2+.

snork13

Quote from: Dagon on June 19, 2005, 03:53:11 PM
Quote from: Nibbler on June 09, 2005, 06:16:51 PM
Simple : PHP4.1+ and CPG 1.2+
Plus : PHP5/xml and CPG 1.4.x
Very nice, however it seems the files are the exact opposite as you describe.  The simple zip is actually for PHP5/xml and CPG 1.4.x, and the plus zip is for PHP4.1+ and CPG 1.2+.

reversed for me too ;)

Nibbler

Sorry, I've switched them back.

acers

hi.
a bit of problem in my case. I used this to generate the sitemap but its generating the sitemap only for the user galleries and not for all the images i have. All my images are accessible but still it does not map them.

Here is the generated op
http://www.techenclave.com/forums/gallery/sitemap.xml.gz

and the gallery is here
http://www.techenclave.com/forums/gallery/

umm so what am i doing wrong?? ???

Nibbler

It's because you have albums that are not in a category. I'll fix it and update the thread shortly.

acers

k thanks.. will wait for it  ;D

togi

i get an error when i run sitemaps.php


Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/.bechamelwasher/togi/photo.net.ph/sitemap.php on line 39

Nibbler

Don't use the 'plus' version if you don't have PHP5.

Tranz

I just downloaded the simple version. When I extracted, it gave me the plus file.

Tranz

I have PHP 4 and when I tried to run sitemap.php, I got the same error as togi. sitemap_plus.php is the one that works.

Tranz

#11
The script (which I renamed accordingly) does not list my uploads from this year. Is there a limit to the number of entries the script will include? http://takethu.com/sitemap.php

edit: I'm not sure what happened... maybe the cron job finally worked, or maybe it was there all along but I found photos from this year in the site map. Maybe because it was out of chronological order, I couldn't find it before.

andy_cul

having this error

QuoteParse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/jologs/public_html/photogallery/sitemap.php on line 39

mini1400

#13
Am I being completely stupid?

uploaded the script into my coppermine location
call it with http://mini1400.demon.co.uk/cpg/sitemap.php

get nothing!

What do I need to change to get it to work?

Tranz

@andy_cul and mini1400: Did you modify the script in any way? If so, what are the changes? What did you use to edit?


Nibbler

Use the simple version if the plus version won't run on your setup.

mini1400

Ahhh. was getting confused - the sitemap-simple zip contains a file sitemap-plus.php & sitemap-plus.zip contains sitemap.php....

mihat

I get fatal error ... What should I do?

Fatal error: Class 'DOMDocument' not found in /net/www/galerija/sitemap.php on line 37

My system info:
Apache 2.0.54
PHP 5.0.5
Mysql 4.1
CPG 1.4.2

Nibbler

Use the simple version if the plus version won't run on your setup.