Advanced search  

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]

Pages: [1] 2 3 4 5 ... 7   Go Down

Author Topic: Google sitemaps  (Read 160419 times)

0 Members and 1 Guest are viewing this topic.

Nibbler

  • Guest
Google sitemaps
« on: June 09, 2005, 06: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, 07:28:01 pm by Nibbler »
Logged

Dagon

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Google sitemaps
« Reply #1 on: June 19, 2005, 03: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
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: Google sitemaps
« Reply #2 on: June 19, 2005, 06: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

  • Guest
Re: Google sitemaps
« Reply #3 on: June 19, 2005, 07:28:26 pm »

Sorry, I've switched them back.
Logged

acers

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Google sitemaps
« Reply #4 on: August 01, 2005, 12:43:43 pm »

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?? ???
Logged

Nibbler

  • Guest
Re: Google sitemaps
« Reply #5 on: August 01, 2005, 07: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

acers

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Google sitemaps
« Reply #6 on: August 01, 2005, 08:43:46 pm »

k thanks.. will wait for it  ;D
Logged

togi

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61
Re: Google sitemaps
« Reply #7 on: September 09, 2005, 01: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

  • Guest
Re: Google sitemaps
« Reply #8 on: September 09, 2005, 01:45:44 pm »

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

TranzNDance

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Female
  • Posts: 6148
    • Take Thu! Gallery
Re: Google sitemaps
« Reply #9 on: October 02, 2005, 04:47:14 pm »

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

TranzNDance

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Female
  • Posts: 6148
    • Take Thu! Gallery
Re: Google sitemaps
« Reply #10 on: October 02, 2005, 04: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

TranzNDance

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Female
  • Posts: 6148
    • Take Thu! Gallery
Re: Google sitemaps
« Reply #11 on: October 02, 2005, 05: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.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.
« Last Edit: November 09, 2005, 04:01:43 pm by TranzNDance »
Logged

andy_cul

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Incigida
Re: Google sitemaps
« Reply #12 on: October 30, 2005, 09:09:26 am »

having this error

Quote
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
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
    • Minis & Megaliths
Re: Google sitemaps
« Reply #13 on: November 02, 2005, 12:55:22 pm »

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?

TranzNDance

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Female
  • Posts: 6148
    • Take Thu! Gallery
Re: Google sitemaps
« Reply #14 on: November 09, 2005, 04: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

mini1400

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
    • Minis & Megaliths
Re: Google sitemaps
« Reply #15 on: November 10, 2005, 01:52:34 pm »

Hi there,

script attached

Nibbler

  • Guest
Re: Google sitemaps
« Reply #16 on: November 10, 2005, 02:15:29 pm »

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

mini1400

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
    • Minis & Megaliths
Re: Google sitemaps
« Reply #17 on: November 10, 2005, 06:13:59 pm »

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

mihat

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Google sitemaps
« Reply #18 on: December 04, 2005, 12:03:47 pm »

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

  • Guest
Re: Google sitemaps
« Reply #19 on: December 04, 2005, 08:22:35 pm »

Use the simple version if the plus version won't run on your setup.
Logged
Pages: [1] 2 3 4 5 ... 7   Go Up
 

Page created in 0.029 seconds with 22 queries.