Google sitemaps - Page 5 Google sitemaps - Page 5
 

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 3 Guests are viewing this topic.

treret

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

Nibbler

It is if you fix that bug.

Makc666

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:
$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:
$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!
$pass = CPG14 ? "AND (ISNULL(alb_password) OR alb_password = '')" : '';

Very strange that PLUS version doesn't have such.

Makc666

#83
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
// 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!
// 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.

santoro

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

santoro

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

santoro

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!

Makc666

Quote from: santoro 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).
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.

Quote from: santoro on February 23, 2008, 05:23:13 PM
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.

ww898

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()

Joachim Müller


ww898

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.

Joachim Müller

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.

treret

Hi,

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

Thanks.

Vilmis

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 ?

fotopolis

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.

Nibbler

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

fotopolis

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

Thanks!

twistedcain

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:
$cats = mysql_query("SELECT cid FROM {$CONFIG['TABLE_CATEGORIES']}");

to,

$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.

antisa33

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!

antisa33