Simple : PHP4.1+ and CPG 1.2+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+.
Plus : PHP5/xml and CPG 1.4.x
Simple : PHP4.1+ and CPG 1.2+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+.
Plus : PHP5/xml and CPG 1.4.x
Parse 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
<?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>
The PHP5 version does not work on PHP4.Sure !
The script misses out albums that are not in a category, it's a known issue.But Cat=0 is a Category is'nt it ?
What have you set as your gallery url in config?
mysql_query
cpg_db_query
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
http://www.egriz.com/GrizPics2
is not part of the domainecho '<url>';
echo "<loc>$base</loc>";
echo "<priority>1.0</priority>";
echo '</url>';
echo '<url>';
echo "<loc>$base/</loc>";
echo "<priority>1.0</priority>";
echo '</url>';
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+.
echo '<url>';
echo "<loc>$base</loc>";
echo "<priority>1.0</priority>";
echo '</url>';
echo '<url>';
echo "<loc>$base</loc>";
echo "<priority>0.90</priority>";
echo '</url>';
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>
$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");
$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");
$pass = CPG14 ? "AND (ISNULL(alb_password) OR alb_password = '')" : '';
// 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;
// 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);
But I have two question to installation (of sitemap plus):You need to upload sitemap.php to CPG root.
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?Hm...
Thank very much for the answer!
Try changingCode: [Select]mysql_query
toCode: [Select]cpg_db_query
$cats = mysql_query("SELECT cid FROM {$CONFIG['TABLE_CATEGORIES']}");
$cats = mysql_query("SELECT cid FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid != 1");
makc66 do you have the same for php 4 ?
thanks!
You can download a simple version here:
private $urlset, $starttime;
to: $urlset, $starttime;
IN PHP less then 5.0 public/private declarations are not supported...
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.phpCode: [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.
−
<!--
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>
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>
// 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);
define('FILEDUMP', 'sitemap.xml.gz');
Ive found a workaround if any one interested in importing their xml in to their normal site sitemap.xml...
<?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>
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.Code: [Select]<?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
ISNULL(alb_password)
(ISNULL(alb_password) OR alb_password = '')
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:
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.
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!