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
Quote from: Nibbler on June 09, 2005, 06:16:51 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+.
Quote from: Dagon on June 19, 2005, 03:53:11 PM
Quote from: Nibbler on June 09, 2005, 06:16:51 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 ;)
Sorry, I've switched them back.
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?? ???
It's because you have albums that are not in a category. I'll fix it and update the thread shortly.
k thanks.. will wait for it ;D
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
Don't use the 'plus' version if you don't have PHP5.
I just downloaded the simple version. When I extracted, it gave me the plus file.
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.
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.
having this error
QuoteParse 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
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?
@andy_cul and mini1400: Did you modify the script in any way? If so, what are the changes? What did you use to edit?
Hi there,
script attached
Use the simple version if the plus version won't run on your setup.
Ahhh. was getting confused - the sitemap-simple zip contains a file sitemap-plus.php & sitemap-plus.zip contains sitemap.php....
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
Use the simple version if the plus version won't run on your setup.
sorry if the question is obvious but i haven't had time to analyze your code
does this script support the 50k urls limit of sitemaps files ? meaning will it create .1 .2 files if the current sitemap has reached the max 50k <url> limit ?
No, it will not.
I am getting the same error when wunning the simple
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /var/www/vhosts/domain.com/htdocs/imagens/banco/sitemap.php on line 39
But the full version worked. Nice! Thanks for the script.
http://forum.coppermine-gallery.net/index.php?topic=18749.msg98752#msg98752
How can I avoid getting chron emails about this? I used this:
php -q
which I thought was supposed to silence emails?
Use > /dev/null after the command.
Thank you for this mod. A couple of questions.
1. Do we need to link to sitemap.xml somehow?
2. Does changing the following code
// [changefreq = always || hourly || daily || weekly || monthly || yearly || never]
define('CF_DISPLAYIMAGE', 'weekly');
define('CF_ALBUM', 'weekly');
define('CF_CATEGORY', 'weekly');
mean that it will be recreated?
3. If not, which command does one use to set a cron job from control panel?
An error given by the control panel of Google sitemaps for a simple map submitted there:
Error Detail
URL not allowed (Line 1) with URL http://www.translatum.gr/gallery This url is not allowed for a Sitemap at this location. More
Post a link to the sitemap.
Actually I think it needs an extra slash at the end of the base url: http://www.translatum.gr/gallery
I resubmitted changing it to http://www.translatum.gr/gallery/ and I will wait to see the results.
everything looks OK now.
This is the file http://www.translatum.gr/gallery/sitemap.xml
Hello Nibbler,
I have installed simple sitemap_plus.php online on my PHP4, but unfortunately the sitemap_plus.php read only category CAT=1 and not CAT=0 ??? There's nothing in cat=1 .
Here is the the generated file sitemap.xml :
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<url><loc>www.pays-dignois.com/galerie</loc>
<priority>1.0</priority></url>
<url><loc>www.pays-dignois.com/galerie/index.php?cat=1</loc>
</url></urlset>
I try sitemap.php and sitemap_plus.php.
The first one do not work at all ??? and gave a PARSEerror like that :
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in sitemap.php on line 39
Some additionnal infos about my host :
ZLib Support enabled
Compiled Version 1.2.2
Linked Version 1.2.2
Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value
The script misses out albums that are not in a category, it's a known issue. The PHP5 version does not work on PHP4.
Nibbler,
QuoteThe PHP5 version does not work on PHP4.
Sure !
QuoteThe script misses out albums that are not in a category, it's a known issue.
But
Cat=0 is a Category is'nt it ?
Anyway, is it a possibility to turn around this issue ?
For exemple, in my case, change all
$cid by
cat=0 ? ;)
Visibly, the script work nice now !
PYAP
I apologize if this is one of those "oh yeah" questions, but where do I find the scripts? I don't see any links. Thanks
They are attached to the first post.
Thanks. I think I didn't see them before because I wasn't registered/logged in, but now I do.
script is working for me but since i have too many pictures all browsers go crazy after a while.
is it possible to run this script and create sitemap without ie/firefox ?
Use the FILEDUMP option described in the script.
I'm doing something wrong but no idea what.
define('FILEDUMP', false);
I changed that to :
define('FILEDUMP', true);
then to
define('FILEDUMP', 'sitemap.xml');
then to
define('FILEDUMP', 'sitemap.gz');
and to
define('FILEDUMP', 'sitemap.xml.gz');
but it always keeps showing me endless text in browser.
what do i have to change ? :-[
the archives are labelled wrongly...
plus.zip = sitemap.php
simple.zip=sitemap_plus.php
Nibbler said he'd changed them back though ages ago - I'm confused!
Ok, I'm gonna sound stupid here ...
I did access and execute the sitemap.php page, and it created an sitemap.xml page.
What is the purpose of this xml page, and why and for what is it used ?
http://www.google.com/webmasters/sitemaps/docs/en/about.html
Ok I have a few questions. My gallery is located at http://www.wwedivaspictures.com/pics .. First of all I don't fully understand how to //define('FILEDUMP', 'sitemap.xml'); like it says cause i did this and I got an error. I need to see what the entire code should look like if I'm only changing that part of it. Also, you say that the script only covers picture pages that are in categories. Well I 6 different categories that I made, and the script only recognized the first category as well as the user galleries category. I wonder what that is so. Also, I would like to have one sitemap for my whole site. Is there a way to do this? Or would I have to manually copy and paste the urls I see at http://www.wwedivaspictures.com/pics/sitemap.php into the sitemap created from my main index page?
Can anyone help me?
OK I am totally confused??
???
I have tried BOTH of the sitemap files, but keep getting the error with the sitemap_plus.php file:
Warning: main(include/init.inc.php): failed to open stream: No such file or directory in /hsphere/local/home/spiroinc/bikiniphotobank.com/sitemap.php on line 33
Warning: main(include/init.inc.php): failed to open stream: No such file or directory in /hsphere/local/home/spiroinc/bikiniphotobank.com/sitemap.php on line 33
Fatal error: main(): Failed opening required 'include/init.inc.php' (include_path='.:/usr/local/lib/php:/usr/local/lib/php/PEAR:/usr/local/share/pear') in /hsphere/local/home/spiroinc/bikiniphotobank.com/sitemap.php on line 33
OR this error with the sitemap.php file:
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /hsphere/local/home/spiroinc/bikiniphotobank.com/sitemap.php on line 39
Can anyone tell me what I am doing wrong?
Please help....im dazed and confused!
2 links are still backwards. plus is not and not is plus... this script is so simple yet sooo confusing
I have searched to see why i am getting this error, but I tried to run either one of the sitemaps files, and neither will work. Perhaps I am doing something wrong.
I am getting a 500 Internal Server Error.
Here is the link:
http://gallery.poserpacks.com/sitemap.php
http://gallery.poserpacks.com/sitemap_plus.php
Why is this? Was I supposed to make any changes to either file in order for it to work?
THANK YOU...
CPG Latest Version installed. No other mods (just added a few link buttons on my own).
Thank You again...
Anyone can help me here please?
Cornelp
No idea.
Just in case anyone has the same problem as I do, or just cannot get the sitemap hack to work on their Gallery, there is another way, free too, lol.
I found this great and free software that works wonderful. Not only runs great, but also it can upload your XML Sitemap automatically and also inform Google of it. I did so last night for my site, and to my surprise, as soon as the software informed google of the sitemap change, google downloaded the sitemap within 8-12 mins on each site I did thru this software.
Works really great. Just wanted to inform those that may NOT be able to run this due to Server Restrictions or other problems.
The only downside to this is that you have to do the XML File Manually whenever U make changes.
The software is called GSite Crawler, link below (I have nothing to do with this software, just found it thru other forums).
Hope this helps others, it sure helped me (submitted my forums, store and gallery within mins after I created the sitemap).
http://gsitecrawler.com/
Thank You...
Google produced an error when processing output from the simple version of the file against my CPG1.4.4 site. The error complained about the first URI in the file. After removing the offending lines from the script, the sitemap was consumed by google with no errors.
Google may have changed the rules. The script was run from the base coppermine folder.
ww
I must be doing something severely wrong? No one else has posted this issue. Mine runs fine and hits all it should, but lists everything as local host instead of the web address.
Any ideas?
What have you set as your gallery url in config?
Simple version doesnt work :( http://forums.racingvideoz.com/gallery/sitemap2.php
Plus version only prints my home page :( http://forums.racingvideoz.com/gallery/sitemap_plus.php
HELP ! ??? :(
Quote from: Nibbler on October 28, 2006, 12:45:04 AM
What have you set as your gallery url in config?
Thanks Nibbler!
Mo
Try changing
mysql_query
to
cpg_db_query
Thanks Nibbler, it works now:))
ok I've seen a couple posts on this but have never seen the problem resolved.
I am getting
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/steveome/public_html/vcitypaintball/cpg/sitemap.php on line 39
when I run the sitemap.php
here is my site www.VcityPaintball.com and the gallery is at www.VcityPaintball.com/cpg
any help would be great.
thanks
Use the other version of the script.
Hi,
any workaround for albums in no category for Simple version?
Thanks
if albums are not in one category this sitemap doesn´t work?
http://www.superimagens.com.br/sitemap.xml
get just one page.. and it´s not in html (i use sef_url) are in php!
any tips?
I am having an issue with the sitemap as it has 1 error
http://www.egriz.com/GrizPics2
is not part of the domain
It is referencing that it does not have the tailing slash.
In my config I have set as my url
http://www.egriz.com/GrizPics2/
What do I need to change so it adds the tailing slash in the sitemap for the base url?
i cannot make this works too
cofee cup site mapper works very good for me
I have found a solution that added the tailing slash to the base url and which made it so there are no errors on the sitemap according to Google.
in sitemap.php
FIND
echo '<url>';
echo "<loc>$base</loc>";
echo "<priority>1.0</priority>";
echo '</url>';
REPLACE WITH
echo '<url>';
echo "<loc>$base/</loc>";
echo "<priority>1.0</priority>";
echo '</url>';
Quote from: Dagon on June 19, 2005, 03:53:11 PM
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+.
Where Can I find the simple zip or plus zip? Thanks
Attached to the first post.
Thanks for the script.
Is there a way to import another sitemap in to the one thats generated through this script?
or even for the script to crawl the main website and add as needed, minus anything found in robots.txt
Regards
No, that would be a whole new script.
Ive found a workaround if any one interested in importing their xml in to their normal site sitemap.xml...
what ive done is...
Installed and ran, GSiteCrawler, wich was posted a bit further up by another user. (Thanks)
Configure your site.
Add FTP.
Under Filter/Ban URLs...
Import your robots.txt
Then
Click add, and add the url to your coppermine/gallery directory
You dont want this program to crawl your gallery.
Then go to URL List
If theres anything thats in their, delete it all.
Then click (Re)Crawl at the top.
This will populate the url list with your normal site, minus anything in robots.txt and coppermine gallery.
Then on each line click the tickbox manual.
(You do this so you can delete all non manual entrys (from this script) when you need to update)
Then click the Import arrow, and select Existing google sitemap-file.
open from your http://web/coppermine/sitemap.xml file
(the sitemap.php script should be configured to dump the file on your server)
Import em, and dont delete your current list, when it asks.
and thats it, then click generate, and it will upload to your ftp settings, and notify google.
When you need to update, boot it up, select Delete all non-manual links, from the url list. And import the same way, and generate.
Things you might want to keep in mind.
You could set your main index.html or main site to 1.0 priority, if you do this, open up the sitemap.php script and edit...
echo '<url>';
echo "<loc>$base</loc>";
echo "<priority>1.0</priority>";
echo '</url>';
to
echo '<url>';
echo "<loc>$base</loc>";
echo "<priority>0.90</priority>";
echo '</url>';
or whatever priority you want for your main coppermine/gallery directory.
Hope this makes sence, and is of some use to anyone.
Regards.
hey...
this is a nice script... but i got 1 recust...
is it porseball to make the script automated over writh the old sitemap.xml??
my ide is to make a Cronjob to update the sitemap every day so google can get the newest site map every time they update and so i dont need to update it every time...
thanks
i got it...
if you find:
echo '<url>';
echo "<loc>$base</loc>";
echo "<priority>1.0</priority>";
echo '</url>';
And replasing the:
echo "<loc>$base</loc>";
with:
echo "<loc>$base/</loc>";
it will work...
and you can now point google sitemap at the .php file... at this mode you will always got your sitemap updated...
Thanks from here... and thx for the nice script....
Hi,
i have no categories in my coppermine.
So this is the result.
tested simpel and the plus version.
is there a chance ?
thx and greets.
loot
−
<!--
Generated Sat, 21 Apr 2007 13:46:46 +0200 in 0.04 seconds.
-->
−
<urlset>
−
<url>
<loc>http://www.mysite.com/</loc>
<priority>1.0</priority>
</url>
−
<url>
<loc>http://www.mysite.com/index.php?cat=1</loc>
</url>
</urlset>
Quote from: loot on April 21, 2007, 01:51:05 PM
Hi,
i have no categories in my coppermine.
So this is the result.
tested simpel and the plus version.
is there a chance ?
thx and greets.
loot
−
<!--
Generated Sat, 21 Apr 2007 13:46:46 +0200 in 0.04 seconds.
-->
−
<urlset>
−
<url>
<loc>http://www.mysite.com/</loc>
<priority>1.0</priority>
</url>
−
<url>
<loc>http://www.mysite.com/index.php?cat=1</loc>
</url>
</urlset>
Same problem here - it doesn't appear to work for those of us using albums instead of categories. :'(
Hi!
This script generates a beauty-full site map.
The only thing is that it´s named 1 not sitemap.xml
What I am I doing wrong?
Erik
What did you set FILEDUMP to at the top of the script?
Hi!
You mean this entry? /ble via fopen('sitemap.xml')), or fa/?
Erik
Here is the top section of my script!
<?php
/*
Google sitemap generator for PHP4.1+ and CPG 1.2+
*/
// use time of last comment on a pic as lastmod ? (if false then we just use pic's upload time (ie. db, not EXIF) which is cheaper)
define('INC_COMMENT_TIMES', false);
// dump the sitemap to a specified file (or generally anything accessible via fopen('sitemap.xml')), or false to output straight to user agent.
// Be aware that if you enable this and the output buffer exceeds php's memory limit and ini_set() fails the script will crash and burn.
// Use a .gz or .xml.gz ending if you are making a compressed file.
//define('FILEDUMP', 'sitemap.xml');
define('FILEDUMP', true);
// use gzip compression ? disable if you have zlib output compression enabled
// Zlib support in PHP is not enabled by default. You will need to configure PHP --with-zlib[=DIR]
// The windows version of PHP has built in support for this extension. You do not need to load any additional extension in order to use these functions.
// Note: Builtin support for zlib on Windows is available with PHP 4.3.0.
define('GZ_COMPRESS', false);
// [0.0 <= priority <= 1.0]
define('P_DISPLAYIMAGE', 0.5);
define('P_ALBUM', 0.5);
define('P_CATEGORY', 0.5);
// [changefreq = always || hourly || daily || weekly || monthly || yearly || never]
define('CF_DISPLAYIMAGE', 'unspecified');
define('CF_ALBUM', 'unspecified');
define('CF_CATEGORY', 'unspecified');
define('IN_COPPERMINE', true);
require('include/init.inc.php');
// This should work as it is, but hardcode if necessary.
define('CPG14', version_compare(COPPERMINE_VERSION, "1.4.0", ">="));
define('PHP5', version_compare(phpversion(), "5", ">="));
// No user servicable parts below here
Set it to the filename you want or to false. true is not an option.
Thanks!
Php is not my arena for sure!
:o
Erik
Simple version easily installed and configured, and working properly.
Many thanks to Nibbler.
Sitemap Plus doesn't map albums without pics. Is it possible to map empty albums too?
It is if you fix that bug.
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.
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.
Sorry for the stupid question, but where can I download this mod? :) I don't see any link here.
Oh, forget it, I see it know! :)
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!
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.
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()
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.
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.
Hi,
Sitemap Plus doesn't map users, did anybody add this function?
Thanks.
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 ?
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.
You might have run out of memory. Check your error logs.
Does this script need Python?
The support team of my host told me there wasn't any error.
Thanks!
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.
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!
Quote from: antisa33 on October 30, 2008, 06:25:41 PM
You can download a simple version here:
http://forum.coppermine-gallery.net/index.php/topic,18749.0.html
I don't support 4.1+ versions and they are VERY old.
You can also try to change line #45
from:
private $urlset, $starttime;
to:
$urlset, $starttime;
http://news.php.net/php.general/237982
QuoteIN PHP less then 5.0 public/private declarations are not supported...
Full reference for the private vs public statement (i.e. visibility): http://www.php.net/manual/en/language.oop5.visibility.php
I disagree though with the usage of PHP5-only syntax.
How do you create multiple files for larger site please. My sitemap is over 160mbs and is turned down by Google
The mod doesn't support that. Attached is the file I use for gelipo.com, you should be able to get it working if you change the links and paths.
Thanks Nibbler ;D That's beyond the call of duty and really appreciated ;D
Quote from: Makc666 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
// 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.
Hi everybody!
can anybody confirm that he managed to use this versions?
thanks
http://www.test.com/gallery/sitemap.php ---> even if I have hundreds of photos
−
<!--
Generated Mon, 16 Feb 2009 20:06:51 +0100 in 0 seconds.
-->
−
<urlset>
−
<url>
<loc>http://www.test.com/gallery/</loc>
<priority>1.0</priority>
</url>
−
<url>
<loc>http://www.test.com/gallery/index-1.html</loc>
</url>
</urlset>
(Seems like I can't edit my own posts isn't it)
I fogot to mention that of course I have set
$sef_urls = 1;
Quote from: loot on April 21, 2007, 01:51:05 PM
Hi,
i have no categories in my coppermine.
So this is the result.
tested simpel and the plus version.
is there a chance ?
thx and greets.
loot
−
<!--
Generated Sat, 21 Apr 2007 13:46:46 +0200 in 0.04 seconds.
-->
−
<urlset>
−
<url>
<loc>http://www.mysite.com/</loc>
<priority>1.0</priority>
</url>
−
<url>
<loc>http://www.mysite.com/index.php?cat=1</loc>
</url>
</urlset>
Same here (I disabled sef plugin and tried with the simple version)
I use albums.
omg what a mess.... in the first post simple is plus and vice versa ::)
I have picked up the REAL plus version and now it's almost working...
http://www.test.com/gallery/sitemap_plus_gallery.php
It doesn't map the last uploads, if you search in sitempa, you won't find any 2009 year photo, why?
I see at least 2 2009 entries :P
uh? If you perform a text search in the sitemap, you won't find any lastmod with such data
Search better... :P
You won't believe me, but it didn't find it before I had a crash 1 minute ago and reopened a new instance of Firefox ;D
All's well that's ends well
This is going to be a dumb question, but I have to run the sitemap.php file each time I update the gallery to keep it current, right?
Wrong! :P
GoogleBot will check it according with <changefreq> setting
Ah, ok. So the google bot will tell the sitemap when to update itself?
// dump the sitemap to a specified file (or generally anything accessible via fopen()), or false to output straight to user agent.
// Be aware that if you enable this and the output buffer exceeds php's memory limit and ini_set() fails the script will crash and burn.
// Use a .gz or .xml.gz ending if you are making a compressed file.
//define('FILEDUMP', 'sitemap.xml');
define('FILEDUMP', sitemap.xml.gz);
// use gzip compression ? disable if you have zlib output compression enabled
// Zlib support in PHP is not enabled by default. You will need to configure PHP --with-zlib[=DIR]
// The windows version of PHP has built in support for this extension. You do not need to load any additional extension in order to use these functions.
// Note: Builtin support for zlib on Windows is available with PHP 4.3.0.
define('GZ_COMPRESS', true);
Result is Completed, compressed and dumped to sitemapxmlgz
How come the extensions aren't separated using a . ?
You missed out the quotes. Should be
define('FILEDUMP', 'sitemap.xml.gz');
Oh my, why didn't I see them in the previous example //define('FILEDUMP', 'sitemap.xml'); ? :o
thank you
Quote from: anaemia on March 19, 2007, 02:43:51 PM
Ive found a workaround if any one interested in importing their xml in to their normal site sitemap.xml...
Hi,
is it better to use this mod for the gallery with an another sitemap generator for the further parts of my site,
or
to use GSiteCrawler for the whole site including CPG?
I think, it would be much better and comfortable to use only GSiteCrawler, but this program generates sitemap of about 70 000 sites (it takes hours and hours of crowling and is still not finished...) from my not very big website ( http://www.dc-foto.com/gallery/ (http://www.dc-foto.com/gallery/) ).
Thank you for your opinions and advice,
Drahus
Have I got something configred incorrectly here Mr Nibbler Sir? When I try and generate a sitemap all I get is the following on a gallery with over 4000 images.
<?xml version="1.0" ?>
- <!-- Generated Sun, 26 Apr 2009 20:22:22 +0100 in 0 seconds.
-->
- <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
- <url>
<loc>http://www.windsurf.me.uk/cpg133/</loc>
<priority>1.0</priority>
</url>
- <url>
<loc>http://www.windsurf.me.uk/cpg133/index.php?cat=1</loc>
</url>
- <url>
<loc>http://www.windsurf.me.uk/cpg133/index.php?cat=3</loc>
</url>
- <url>
<loc>http://www.windsurf.me.uk/cpg133/index.php?cat=5</loc>
</url>
</urlset>
http://www.windsurf.me.uk/cpg133/sitemap.php
Quote from: Drahus on April 26, 2009, 09:08:28 PM
Hi,
is it better to use this mod for the gallery with an another sitemap generator for the further parts of my site,
or
to use GSiteCrawler for the whole site including CPG?
I think, it would be much better and comfortable to use only GSiteCrawler, but this program generates sitemap of about 70 000 sites (it takes hours and hours of crowling and is still not finished...) from my not very big website ( http://www.dc-foto.com/gallery/ (http://www.dc-foto.com/gallery/) ).
Thank you for your opinions and advice,
Drahus
I'd advise using this since it 'knows' Coppermine and won't create the duplicate links that your screenshot shows. Also, this script doesn't do any crawling as the links are generated automatically.
Quote from: Phill Luckhurst on April 26, 2009, 09:21:08 PM
Have I got something configred incorrectly here Mr Nibbler Sir? When I try and generate a sitemap all I get is the following on a gallery with over 4000 images.
<?xml version="1.0" ?>
- <!-- Generated Sun, 26 Apr 2009 20:22:22 +0100 in 0 seconds.
-->
- <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
- <url>
<loc>http://www.windsurf.me.uk/cpg133/</loc>
<priority>1.0</priority>
</url>
- <url>
<loc>http://www.windsurf.me.uk/cpg133/index.php?cat=1</loc>
</url>
- <url>
<loc>http://www.windsurf.me.uk/cpg133/index.php?cat=3</loc>
</url>
- <url>
<loc>http://www.windsurf.me.uk/cpg133/index.php?cat=5</loc>
</url>
</urlset>
http://www.windsurf.me.uk/cpg133/sitemap.php
Try changing
ISNULL(alb_password)
to
(ISNULL(alb_password) OR alb_password = '')
Cheers Nibbler, worked a treat. ;D
I missed that on page 5 :-[
Hi,
Making it work on galleries with no category.
I don't think this has been covered, I've just scanned through all the earlier replies and didn't see anything.
Anyway, after reading the much earlier post about changing " all $cid by cat=0 ", I had a go at this (not PHP savvy, myself) as I was having this problem.
I found it wasn't quite that simple, and initially got a few errors, so needed to make different changes in different lines, but the idea is basically OK and I got it working and my sitemaps are fine.
Here is my updated file (simple version - as mentioned before the original file names seem to be intersposed):
RD
Quote from: robindengate on September 04, 2009, 04:32:39 PM
Here is my updated file (simple version - as mentioned before the original file names seem to be intersposed):
For some reason the generated xml file is throwing a xml parsing error (or syntax) in Firefox:
"element not found, line:1, col:1". By the way your file is based on the simple version.
EDIT: After looking at the content of my gallery folder, I noticed that your script creates by default a file called "can_cm_sitemapxml" - the file name must be between '' (line 14). So there is no error message (the error message came because the manually created can_cm_sitemap.xml file was emtpy).
The fixed version of your file is attached as zipped to this message.
Quote from: papukaija on September 06, 2009, 01:23:31 PM
For some reason the generated xml file is throwing a xml parsing error (or syntax) in Firefox:
"element not found, line:1, col:1". By the way your file is based on the simple version.
It's working fine for me in firefox, so not being an expert, only a dabbler, I can't help you with that.
Oh, and I did say I was using the simple version!
Sorry, papukaija
Yes, I forgot to take out my own sitemap filename before uploading!
Thanks for correcting.
BTW: my gallery: http://www.canalandnarrowboat.co.uk/cm/index.php (http://www.canalandnarrowboat.co.uk/cm/index.php)
Hello, i created a sitemap and i noticed i have 2 types of urls for same pics:
In sitemap
/displayimage.php?pos=-17
While i browse via album navigation:
/displayimage.php?album=6&pos=0
I am scared Google will take it as duplicated content.
How can i solve this problem?
Not related to this mod, but an issue inherent to cpg1.4.x that can't be solved easily. Will be taken care of in cpg1.5.x. Anyway, as this is not related to this mod at all it should not be discussed here in this thread any further.
Sorry Joachim :) i noticed the problem just after i installed and tested this script. The difference between site and list of urls in sitemap was really big so i added comment to this thread.
It really would be great if someone will find a time to fix it. It can just skyrocket traffic of Coppermine sites.
One last thing: mentioned link problem is connected to several themes: SEO, Core files, navigation structure and even to sitemaps. It just depending on point of view. If i do not wish to spam or create a multiple posts i have to decide for one post. I can do it properly or less properly. Do not forget many of users are not php gurus, but this does not means they are not skilled in other areas. I am sure many people here passed universities so pls do not treat them as they live somewhere in caves.
I understand you have a difficult task ... to take care of so many people with their "stupid" questions again and again....but still.....
Have a nice day and thanks for your time.
In the future, please respect moderation:
Quote from: Joachim Müller on January 03, 2010, 08:17:11 PM
Anyway, as this is not related to this mod at all it should not be discussed here in this thread any further.
In other words: you shouldn't have replied here!
I installed sitemap (PHP4 version) few days ago. Everything worked perfectly. I added albums to categories and script generated xml file with all urls.
my last url in sitemap is:
http://fantasticgallery.com/displayimage.php?pos=-671
From that time i added several pictures but these new links are not added into sitemap anymore.
I deleted script file and even sitemap xml file and i reuploaded it again several times. No help. Sitemap is always created in same way, my last image is that with number 671.
How can i fix the problem?
I don't know if it's really related to the mod (plus version), to cpg or to Google, but did anybody notice that Google webmaster Tools tells that only a small part of the sitemap links are indicized (only 13 of 499, in my case) ?
It happened under 1.4.x, still happens under 1.5.x
As you can see from the attached sitemap, it shouldn't contain any weird links.
After 1 month, the situation seems to be the same
Thankz robindengate for the sitemap for galleries that dont use categories! =D
anyone has a version that generate .html sitemap instead of the .php!?
طراحی سایت (http://www.rahkarenovin.com/) هاست لینوکس (http://www.rahkarenovin.net/web-hosting/) بلیط هواپیما (https://www.triptoday.ir/) ثبت دامنه (http://www.rahkarenovin.net/domains/) سئوی سایت (http://www.rahkarenovin.com/page/12/) طراحی سایت فروشگاهی (http://www.rahkarenovin.com/page/18/) طراحی سایت شرکتی (http://www.rahkarenovin.com/page/23/) تبلیغات گوگل (http://www.rahkarenovin.com/page/51/) طراحی سایت صنعتی (http://www.rahkarenovin.com/page/22/) طراحی سایت پزشکی (http://www.rahkarenovin.com/page/97/) طراحی سایت ارزان (http://www.rahkarenovin.com/page/70/)
Hi,
Sitemap Plus doesn't map users, did anybody add this function?
Thanks.