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

Author Topic: Google sitemaps  (Read 200649 times)

0 Members and 1 Guest are viewing this topic.

treret

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Google sitemaps
« Reply #80 on: August 23, 2007, 11:46:17 am »

Sitemap Plus doesn't map albums without pics. Is it possible to map empty albums too?
Logged

Nibbler

  • Guest
Re: Google sitemaps
« Reply #81 on: August 23, 2007, 03:59:32 pm »

It is if you fix that bug.
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: Google sitemaps
« Reply #82 on: December 01, 2007, 01:26:14 pm »

P.S. Nibbler can you fix archive sitemap_simple.zip in first post,
as the file name inside sitemap_plus.php doesn't correspond to the archives title sitemap_simple.zip


I don't know if this one was already told but
the current PLUS version
(file name sitemap.php) (archive name sitemap_plus.zip)
in 1-st post is not working and I will tell you why.

There is a query:
Code: [Select]
$albs = cpg_db_query("SELECT a.aid, MAX(ctime) FROM {$CONFIG['TABLE_ALBUMS']} AS a INNER JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.aid = a.aid WHERE category = '$cid' AND visibility = 0 AND ISNULL(alb_password) GROUP BY a.aid");
As you see this query uses a check:
AND ISNULL(alb_password)

This is not a right check!

alb_password will only then have NULL in it when it is created for the FIRST time!!!
But if you ever edit that Album, for example just change its title, then alb_password will just became empty but not NULL.

That it why a lot of users see in their sitemaps only CATEGORIES and nothing else.

Change:
AND ISNULL(alb_password)

To:
AND (ISNULL(alb_password) OR alb_password = '')

Final query's code:
Code: [Select]
$albs = cpg_db_query("SELECT a.aid, MAX(ctime) FROM {$CONFIG['TABLE_ALBUMS']} AS a INNER JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.aid = a.aid WHERE category = '$cid' AND visibility = 0 AND (ISNULL(alb_password) OR alb_password = '') GROUP BY a.aid");
Tested.
Working.

P.S. By the way, simple version (archive name sitemap_simple.zip) has such check!
Code: [Select]
$pass = CPG14 ? "AND (ISNULL(alb_password) OR alb_password = '')" : '';
Very strange that PLUS version doesn't have such.
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: Google sitemaps
« Reply #83 on: December 01, 2007, 01:38:14 pm »

I also wrote a version which has compatibility with SEF_URLs plugin for cpg1.4.x
Its topic is here - http://forum.coppermine-gallery.net/index.php?topic=46718

Look for code at the beginning of sitemap_sef_urls.php
Code: [Select]
// Compatibility with SEF_URLs plugin for cpg1.4.x
// Download here - http://forum.coppermine-gallery.net/index.php?topic=46718
// 0 = Off; 1 = On;
// $sef_urls = 1;
$sef_urls = 0;

Don't for get to change these lines for what you need!
Code: [Select]
// dump the sitemap to a local file (specified here), or false to output straight to user agent.
// Use a .gz ending if you are making a compressed file.
// Use a .gz or .xml.gz ending if you are making a compressed file.
//define('FILEDUMP', 'sitemap.xml');
define('FILEDUMP', false);

Nibbler, fill free to include these changes in your next version!
I will be much appreciated!

Tested.
Working.
« Last Edit: June 10, 2008, 03:25:09 pm by Makc666 »
Logged

santoro

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
Re: Google sitemaps
« Reply #84 on: February 23, 2008, 04:29:05 pm »

Sorry for the stupid question, but where can I download this mod? :) I don't see any link here.
Logged

santoro

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
Re: Google sitemaps
« Reply #85 on: February 23, 2008, 04:34:33 pm »

Oh, forget it, I see it know! :)
Logged

santoro

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
Re: Google sitemaps
« Reply #86 on: February 23, 2008, 05:23:13 pm »

But I have two question to installation (of sitemap plus):
1) I'll just only upload the file sitemap.php to CPG root and that's all? (I don't understand PHP).
2) Do I need to add the sitemap file to Google Webmaster tools? If yes, that means I'll just add the adress to my sitemap.php file there?
Thank very much for the answer!
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: Google sitemaps
« Reply #87 on: February 29, 2008, 11:56:52 am »

But I have two question to installation (of sitemap plus):
1) I'll just only upload the file sitemap.php to CPG root and that's all? (I don't understand PHP).
You need to upload sitemap.php to CPG root.
Then you need make so that you http server wa able to create file sitemap.xml in CPG root.
Then you have to run/open sitemap.php in your browser.

You have to add sitemap.php to some cron (schedule) for the sitemap to be updated every, say, 6 hours.

2) Do I need to add the sitemap file to Google Webmaster tools? If yes, that means I'll just add the adress to my sitemap.php file there?
Thank very much for the answer!
Hm...
I don't know.
But I know that Google will look for default sitemap.xml file in you CPG root.
Logged

ww898

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Google sitemaps
« Reply #88 on: March 03, 2008, 11:55:08 am »

CPG 1.4.16
Apache/1.3.37 (Unix) PHP/4.4.4 rus/PL30.22
sitemap_simple: does not work until I change mysql_query() to cpg_db_query()
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Google sitemaps
« Reply #89 on: March 04, 2008, 08:20:28 am »

Try changing

Code: [Select]
mysql_query
to

Code: [Select]
cpg_db_query
Logged

ww898

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Google sitemaps
« Reply #90 on: March 04, 2008, 11:52:46 am »

Thanks, I expect to download, install and forget it. But the reality is worse. :)

So, I have more question about the sitemap_simple:
- why there're no <changefreq> and <priority> tags for root?
- why there's no <lastmod> tag for root and categoty?
- why XML result is unformatted? I need to run a formatter every time when download XML.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Google sitemaps
« Reply #91 on: March 05, 2008, 08:48:32 am »

The question "why" doesn't apply. If you're not happy with this mod, you're welcome to code the "missing features" and post your improvements.
Logged

treret

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Google sitemaps
« Reply #92 on: March 05, 2008, 09:55:34 am »

Hi,

Sitemap Plus doesn't map users, did anybody add this function?

Thanks.
Logged

Vilmis

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • Vilmis photo gallery
Googlebot error
« Reply #93 on: March 19, 2008, 01:49:20 am »

This week I notice error on sitemap details page at https://www.google.com/webmasters/ :
-----------------
URLs not followed
When we tested a sample of the URLs from your Sitemap, we found that some URLs were not accessible to Googlebot because they contained too many redirects. Please change the URLs in your Sitemap that redirect and replace them with the destination URL (the redirect target). All valid URLs will still be submitted.
-----------------
site map url is:
http://www.vilmis.com/photos/sitemap.xml
and I am using sitemap_plus.php to generate sitemap.

I started use sitemap_plus couple months ago and it was fine till this week. Any ideas what reason could cause such error ?
Logged

fotopolis

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Google sitemaps
« Reply #94 on: March 24, 2008, 04:00:38 pm »

Hello.
Thanks for the mod.
But this script doen't do anything in my web.
The url: http://www.laciudaddelasfotos.net/sitemap.php
A white page appears... but nothing else.
I attached the file with the change.
Can anyone help me?
Thanks a lot.
Logged

Nibbler

  • Guest
Re: Google sitemaps
« Reply #95 on: March 24, 2008, 04:14:54 pm »

You might have run out of memory. Check your error logs.
Logged

fotopolis

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Google sitemaps
« Reply #96 on: March 25, 2008, 12:31:22 am »

Does this script need Python?
The support team of my host told me there wasn't any error.

Thanks!
Logged

twistedcain

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Google sitemaps
« Reply #97 on: May 22, 2008, 04:59:51 pm »

I read through most of the thread and didn't find what I was looking for. I apologize if this has already been addresses.

"sitemap_plus.php" includes User galleries (index.php?cat=1) by default in the sitemap. The problem is, CPG doesn't allow you to delete this category, I don't use the user galleries, and I don't want the page included in my sitemaps since it has no content.

I was able to remove it from the sitemap by changing the following line in "sitemap_plus.php" from,

Line 67:
Code: [Select]
$cats = mysql_query("SELECT cid FROM {$CONFIG['TABLE_CATEGORIES']}");
to,

Code: [Select]
$cats = mysql_query("SELECT cid FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid != 1");
An option to remove User galleries (cat 1) could be added to the options at the top of the script, although since no one else has mentioned it, I assume they either aren't aware that it is being added by default or most people use the User galleries. Either way, I want to thank the original author for the great script, I was just about to waste a ton of time writing one myself until I found this one.
Logged

antisa33

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 181
    • Free french kids coloring
Re: Google sitemaps
« Reply #98 on: October 30, 2008, 06:10:43 pm »

makc66 i get this error with your version which has compatibility with SEF_URLs plugin for cpg1.4.x

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /var/www/vhosts/coloriage-educatif.com/httpdocs/sitemap_sef_urls.php on line 45

what to do ?
thanks!
Logged

antisa33

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 181
    • Free french kids coloring
Re: Google sitemaps
« Reply #99 on: October 30, 2008, 06:25:41 pm »

makc66 do you have the same for php 4 ?
thanks!
Logged
Pages: 1 2 3 4 [5] 6 7   Go Up
 

Page created in 0.032 seconds with 20 queries.