Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 06:44:49 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Maintenance release cpg1.4.25 - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix an issue with http uploads that could occur in particular versions of PHP.The fix is not security-critical, so if your gallery is running fine with cpg1.4.23 or cpg1.4.24 you don't need to upgrade. If you are running an older version than cpg1.4.23, you must update to this latest version as soon as possible because of the security impact (the past few maintenance releases before cpg1.4.24 all were security-related).
[more]
   Home   Help Search Board rules Login Register  
Pages: 1 2 3 4 [5] 6 7   Go Down
  Print  
Author Topic: Google sitemaps  (Read 71707 times)
0 Members and 1 Guest are viewing this topic.
treret
Coppermine newbie

Posts: 18


« Reply #80 on: August 23, 2007, 10:46:17 am »

Sitemap Plus doesn't map albums without pics. Is it possible to map empty albums too?
Logged
Nibbler Topic starter
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19445



WWW
« Reply #81 on: August 23, 2007, 02:59:32 pm »

It is if you fix that bug.
Logged

I don't care about what they say, I won't live or die that way.
Makc666
Translator
**
Gender: Male
Russian Federation Russian Federation

Posts: 1105


Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)


WWW
« Reply #82 on: December 01, 2007, 12: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:
$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:
$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:
$pass = CPG14 ? "AND (ISNULL(alb_password) OR alb_password = '')" : '';

Very strange that PLUS version doesn't have such.
Logged

(http://makc666.com/wedont.gif) "А стукачков мы не любим!"

Официальный Русский Перевод - 1.4.x

[MOD] Restriction of email domains
Makc666
Translator
**
Gender: Male
Russian Federation Russian Federation

Posts: 1105


Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)


WWW
« Reply #83 on: December 01, 2007, 12: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:
// 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:
// 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, 02:25:09 pm by Makc666 » Logged

(http://makc666.com/wedont.gif) "А стукачков мы не любим!"

Официальный Русский Перевод - 1.4.x

[MOD] Restriction of email domains
santoro
Coppermine regular visitor
**
Posts: 58


« Reply #84 on: February 23, 2008, 03:29:05 pm »

Sorry for the stupid question, but where can I download this mod? Smiley I don't see any link here.
Logged
santoro
Coppermine regular visitor
**
Posts: 58


« Reply #85 on: February 23, 2008, 03:34:33 pm »

Oh, forget it, I see it know! Smiley
Logged
santoro
Coppermine regular visitor
**
Posts: 58


« Reply #86 on: February 23, 2008, 04: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
**
Gender: Male
Russian Federation Russian Federation

Posts: 1105


Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)


WWW
« Reply #87 on: February 29, 2008, 10: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

(http://makc666.com/wedont.gif) "А стукачков мы не любим!"

Официальный Русский Перевод - 1.4.x

[MOD] Restriction of email domains
ww898
Coppermine newbie

Posts: 2


« Reply #88 on: March 03, 2008, 10: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
Administrator
*****
Gender: Male
Germany Germany

Posts: 45051


aka "GauGau"


WWW
« Reply #89 on: March 04, 2008, 07:20:28 am »

Try changing

Code:
mysql_query

to

Code:
cpg_db_query
Logged
ww898
Coppermine newbie

Posts: 2


« Reply #90 on: March 04, 2008, 10:52:46 am »

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

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
Administrator
*****
Gender: Male
Germany Germany

Posts: 45051


aka "GauGau"


WWW
« Reply #91 on: March 05, 2008, 07: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 newbie

Posts: 18


« Reply #92 on: March 05, 2008, 08:55:34 am »

Hi,

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

Thanks.
Logged
Vilmis
Coppermine newbie

Australia Australia

Posts: 6


WWW
« Reply #93 on: March 19, 2008, 12: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

Posts: 9


« Reply #94 on: March 24, 2008, 03: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 Topic starter
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19445



WWW
« Reply #95 on: March 24, 2008, 03:14:54 pm »

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

I don't care about what they say, I won't live or die that way.
fotopolis
Coppermine newbie

Posts: 9


« Reply #96 on: March 24, 2008, 11:31:22 pm »

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

Thanks!
Logged
twistedcain
Coppermine newbie

Posts: 8


« Reply #97 on: May 22, 2008, 03: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:
$cats = mysql_query("SELECT cid FROM {$CONFIG['TABLE_CATEGORIES']}");

to,

Code:
$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
***
Posts: 181


WWW
« Reply #98 on: October 30, 2008, 05: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
***
Posts: 181


WWW
« Reply #99 on: October 30, 2008, 05:25:41 pm »

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

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.051 seconds with 16 queries.