Nibbler 
Dev Team member
Coppermine addict
   
Gender:
 United Kingdom
Posts: 19030
|
 |
« on: June 09, 2005, 05:16:51 pm » |
|
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
|
|
|
|
« Last Edit: June 19, 2005, 06:28:01 pm by Nibbler »
|
Logged
|
Deny everything.
|
|
|
|
Dagon
Coppermine newbie
Posts: 3
|
 |
« Reply #1 on: June 19, 2005, 02:53:11 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+.
|
|
|
|
|
Logged
|
|
|
|
snork13
Contributor
Coppermine frequent poster
  
Gender: 
Posts: 260
Internet! Is that thing still around?
|
 |
« Reply #2 on: June 19, 2005, 05:29:11 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 
|
|
|
|
|
Logged
|
|
|
|
Nibbler 
Dev Team member
Coppermine addict
   
Gender:
 United Kingdom
Posts: 19030
|
 |
« Reply #3 on: June 19, 2005, 06:28:26 pm » |
|
Sorry, I've switched them back.
|
|
|
|
|
Logged
|
Deny everything.
|
|
|
|
|
Nibbler 
Dev Team member
Coppermine addict
   
Gender:
 United Kingdom
Posts: 19030
|
 |
« Reply #5 on: August 01, 2005, 06:07:11 pm » |
|
It's because you have albums that are not in a category. I'll fix it and update the thread shortly.
|
|
|
|
|
Logged
|
Deny everything.
|
|
|
|
acers
Coppermine newbie
Posts: 5
|
 |
« Reply #6 on: August 01, 2005, 07:43:46 pm » |
|
k thanks.. will wait for it 
|
|
|
|
|
Logged
|
|
|
|
togi
Coppermine regular visitor
 
Posts: 61
|
 |
« Reply #7 on: September 09, 2005, 12:39:41 pm » |
|
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
|
|
|
|
|
Logged
|
|
|
|
Nibbler 
Dev Team member
Coppermine addict
   
Gender:
 United Kingdom
Posts: 19030
|
 |
« Reply #8 on: September 09, 2005, 12:45:44 pm » |
|
Don't use the 'plus' version if you don't have PHP5.
|
|
|
|
|
Logged
|
Deny everything.
|
|
|
TranzNDance
Dev Team member
Coppermine addict
   
Gender:
 United States
Posts: 6128
|
 |
« Reply #9 on: October 02, 2005, 03:47:14 pm » |
|
I just downloaded the simple version. When I extracted, it gave me the plus file.
|
|
|
|
|
Logged
|
Thu I do not reply to PM requests for support when the questions could be asked and answered publicly. My Coppermine Notebook
|
|
|
TranzNDance
Dev Team member
Coppermine addict
   
Gender:
 United States
Posts: 6128
|
 |
« Reply #10 on: October 02, 2005, 03:52:52 pm » |
|
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.
|
|
|
|
|
Logged
|
Thu I do not reply to PM requests for support when the questions could be asked and answered publicly. My Coppermine Notebook
|
|
|
TranzNDance
Dev Team member
Coppermine addict
   
Gender:
 United States
Posts: 6128
|
 |
« Reply #11 on: October 02, 2005, 04:24:51 pm » |
|
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.phpedit: 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.
|
|
|
|
« Last Edit: November 09, 2005, 03:01:43 pm by TranzNDance »
|
Logged
|
Thu I do not reply to PM requests for support when the questions could be asked and answered publicly. My Coppermine Notebook
|
|
|
andy_cul
Coppermine regular visitor
 
Gender: 
Posts: 50
|
 |
« Reply #12 on: October 30, 2005, 08:09:26 am » |
|
having this error Parse 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
|
|
|
|
|
Logged
|
|
|
|
mini1400
Coppermine novice

Gender: 
Posts: 34
|
 |
« Reply #13 on: November 02, 2005, 11:55:22 am » |
|
Am I being completely stupid? uploaded the script into my coppermine location call it with http://mini1400.demon.co.uk/cpg/sitemap.phpget nothing! What do I need to change to get it to work?
|
|
|
|
« Last Edit: January 18, 2006, 10:41:48 pm by mini1400 »
|
Logged
|
|
|
|
TranzNDance
Dev Team member
Coppermine addict
   
Gender:
 United States
Posts: 6128
|
 |
« Reply #14 on: November 09, 2005, 03:12:37 pm » |
|
@andy_cul and mini1400: Did you modify the script in any way? If so, what are the changes? What did you use to edit?
|
|
|
|
|
Logged
|
Thu I do not reply to PM requests for support when the questions could be asked and answered publicly. My Coppermine Notebook
|
|
|
mini1400
Coppermine novice

Gender: 
Posts: 34
|
 |
« Reply #15 on: November 10, 2005, 12:52:34 pm » |
|
Hi there,
script attached
|
|
|
|
|
Logged
|
|
|
|
Nibbler 
Dev Team member
Coppermine addict
   
Gender:
 United Kingdom
Posts: 19030
|
 |
« Reply #16 on: November 10, 2005, 01:15:29 pm » |
|
Use the simple version if the plus version won't run on your setup.
|
|
|
|
|
Logged
|
Deny everything.
|
|
|
mini1400
Coppermine novice

Gender: 
Posts: 34
|
 |
« Reply #17 on: November 10, 2005, 05:13:59 pm » |
|
Ahhh. was getting confused - the sitemap-simple zip contains a file sitemap-plus.php & sitemap-plus.zip contains sitemap.php....
|
|
|
|
|
Logged
|
|
|
|
|
mihat
Coppermine newbie
Posts: 3
|
 |
« Reply #18 on: December 04, 2005, 11:03:47 am » |
|
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
|
|
|
|
|
Logged
|
|
|
|
Nibbler 
Dev Team member
Coppermine addict
   
Gender:
 United Kingdom
Posts: 19030
|
 |
« Reply #19 on: December 04, 2005, 07:22:35 pm » |
|
Use the simple version if the plus version won't run on your setup.
|
|
|
|
|
Logged
|
Deny everything.
|
|
|
|