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]   Go Down

Author Topic: Google Sitemaps (NOT Nibbler's) - no CPG editing required  (Read 28052 times)

0 Members and 1 Guest are viewing this topic.

thejake420

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 79
  • Jakes Jokes - the largest joke site on the web
    • Jakes Jokes
Google Sitemaps (NOT Nibbler's) - no CPG editing required
« on: July 13, 2007, 08:26:30 am »

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=3


Jake
« Last Edit: July 13, 2007, 08:30:14 am by GauGau »
Logged

thejake420

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 79
  • Jakes Jokes - the largest joke site on the web
    • Jakes Jokes
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #1 on: July 15, 2007, 11:27:13 am »

Two things to mention...

1. Just caught a minor bug with galleries that live in a subfolder of the site's domain.

I'll get on it as soon as I have a moment. Shouldn't be anything too difficult to track down.
UPDATE: That little sucker is more elusive than I thought. (It does, however, still work perfectly for sites using CPG at the top of their domain...)

2. You need to make sure that gallery_sitemap_xml.php is writeable
Solution: chmod the file to 777 or 766, depending on your host


Jake
« Last Edit: July 16, 2007, 11:32:56 am by thejake420 »
Logged

nbakewell

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #2 on: August 01, 2007, 03:06:22 am »

Nice, thanks!  This will definitely be a help.
Logged

Ludo

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #3 on: August 22, 2007, 03:51:43 pm »

Mod installed and working fine, except for a timeout error while reading the "main category" sitemap: could it be a mod bug or rather some mistake in the configuration?
TIA
Logged

Ludo

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #4 on: August 22, 2007, 04:05:20 pm »

P.S. I found a bug in line 5 of file gallery_sitemap_xml.php: should be
Code: [Select]
require("sitemap.class.php");instead of
Code: [Select]
require("sitemap1.class.php");
Logged

Willow69

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #5 on: September 03, 2007, 07:36:13 pm »

Hello everybody,

I tried out this plugin but it seem, that I messed it up somehow. Even so that there doesn't seem to be much possibilities to make a mistake I think I do not get the expetced result.

When I call the URL: http://87.106.18.130/gallery_sitemap_xml.php

I receive only one entry in the sitemap.

The gallery should be at root level and I believe that the database is almost default (I applied Stramms Mod Pack).

Any clues?

Cheers,
Willow
Logged

Willow69

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #6 on: September 04, 2007, 10:51:51 am »

Hi there,

I found it myself. The cpgdb_prefix for my tables is "cpg149_"  instead of "cpg140_"  :)
Now everything works fine.

THX,
Willow
Logged

toykilla

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #7 on: November 01, 2007, 08:17:12 am »

Sitemap just yields a blank page. This work for 1.4.13?
Logged

sirshurf

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #8 on: December 14, 2007, 10:24:10 pm »

Looks like a dead mod...

But Since the creator has not given it as GPL nobody cannt take it from here...

too bad... it was a good one...
Logged

thejake420

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 79
  • Jakes Jokes - the largest joke site on the web
    • Jakes Jokes
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #9 on: December 14, 2007, 11:51:15 pm »

GPL hereby bestowed. Have at it guys.

LGLDSR

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 83
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #10 on: December 19, 2007, 11:40:30 pm »

GPL hereby bestowed. Have at it guys.
Is there a current working version available?

Thanks,

Lyman
Logged

thejake420

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 79
  • Jakes Jokes - the largest joke site on the web
    • Jakes Jokes
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #11 on: December 20, 2007, 09:01:23 am »

Is there a current working version available?
What you see is what you get. It has not been updated since around the time of the original post, as it has not needed updating. Coppermine database structure has not changed, and the XML standard used will not change regardless of what CPG does in the future.


Jake

LGLDSR

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 83
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #12 on: December 20, 2007, 03:40:08 pm »

Thank Jake.

Lyman
Logged

Bazzah

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #13 on: January 09, 2008, 12:21:09 pm »

When I goto my sitemap_xml.php I get the following error

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/hiresco1/public_html/gallery/gallery_sitemap_xml.php on line 136

Warning: Cannot modify header information - headers already sent by (output started at /home/hiresco1/public_html/gallery/gallery_sitemap_xml.php:136) in /home/hiresco1/public_html/gallery/sitemap.class.php on line 125
http://www.hirescovers.net/gallery/gallery_sitemap_xml.php?category=index
Logged

Kapsel

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 3
    • Company webpage
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #14 on: May 20, 2008, 03:52:29 pm »

Hello!
Maybe I'm blind or something, but I don't see where can I download Your script. I made my sitemap once with sitemap builder but it's not good thing for coppermine... so, could You give me a link to the script?

Greetings from Poland! ;)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #15 on: May 20, 2008, 04:59:38 pm »

It's attached to the very first posting in this thread!
Logged

Kapsel

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 3
    • Company webpage
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #16 on: May 20, 2008, 08:42:12 pm »

Oops, I aways where reading forum without having my own account in the forum... and now I see, that if I'm not logged in then I can't see attachements :]
I didn't knew that, but I registered exactly for ask about script, and now - of course I could download it :) Sorry for fuss  :-X
Logged

KeithG

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #17 on: July 12, 2008, 10:16:03 pm »

Thank you Jake.

I successfully installed the script, corrected the class file reference {require("sitemap1.class.php"); 1, too many}, and configured for my not-at-the-root gallery.

The script creates valid sitemaps for all but gallery_sitemap_xml.php?category=index. This sitemap has a flaw that prompts the Google error message, "URL not allowed
This url is not allowed for a Sitemap at this location."

The problem is that the URL path omits the cpg installation subdirectory, using the document root instead.

Has anyone solved this issue? If not, any sage advice provided will be appreciated.

Thanks.

  - Keith

PS Jake-> Your link is on my todo list...in fact, it's next, right after o Get cpg sitemap created. ;)   kg
Logged

aftab1003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 67
    • PictureRating Site for Teens
Re: Google Sitemaps (NOT Nibbler's) - no CPG editing required
« Reply #18 on: August 19, 2008, 03:43:32 pm »

When I goto my sitemap_xml.php I get the following error

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/hiresco1/public_html/gallery/gallery_sitemap_xml.php on line 136

Warning: Cannot modify header information - headers already sent by (output started at /home/hiresco1/public_html/gallery/gallery_sitemap_xml.php:136) in /home/hiresco1/public_html/gallery/sitemap.class.php on line 125
http://www.hirescovers.net/gallery/gallery_sitemap_xml.php?category=index




me too facing the same problem
any suggestion
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 19 queries.