Jump to content
Jack_mcs

Google XML Sitemap SEO

Recommended Posts

A new version has been uploaded. It contains the following changes:

 

- Added settings in database to control various options.

- Added code to create a site map for the standard pages.

- Added code to create a site map for the Articles Manager contribution.

- Added code to create a site map for the Information Pages contribution.

- Added code to create a site map for the Pages Manager contribution.

- Added code to check for the correct sitemap name to prevent writing to the wrong file.

- Changed code to check for at least one item, instead of the previous two.

- Removed css link in the gss.xml file since the css is internal.

- Moved original instructions to its own directory. The files in that directory will no longer be updated.

 

Jack

Share this post


Link to post
Share on other sites
A new version has been uploaded. It contains the following changes:

 

I'm probably missing the upgrade instructions from v1.1 to 1.2 or do I have to start from scratch ?

Share this post


Link to post
Share on other sites

Am sorry but still when enter http://brs-giftshop.com/sitemapproducts.xml in browser, it still shows 0 urls in this and the other sitemaps. I have done what I found on the first page. This is what the http://brs-giftshop.com/googlesitemap/index.php page is getting:

 

Opening /xxxxxxx/xxxxxx/public_html/sitemapproducts.xml

FS_CAT /xxxxx/xxxxxx/public_html/

Server http://brs-giftshop.com

Save Path /xxxxxx/xxxxxxx/public_html/WS_CAT /

Write /xxxxxxx/xxxxxxx/public_html/sitemapproducts.xml

Generated Google Product Sitemap Successfully

 

Opening /xxxxx/xxxxxxx/public_html/sitemapcategories.xml

FS_CAT /xxxxx/xxxxxxx/public_html/

Server http://brs-giftshop.com

Save Path /xxxxx/xxxxxxxx/public_html/WS_CAT /

Write /xxxxx/xxxxxxx/public_html/sitemapcategories.xml

Generated Google Category Sitemap Successfully

 

Opening /xxxxxxx/xxxxxx/public_html/sitemapmanufacturers.xml

FS_CAT /xxxx/xxxxxxx/public_html/

Server http://brs-giftshop.com

Save Path /xxxxx/xxxxxxx/public_html/WS_CAT /

Write /xxxx/xxxxxxx/public_html/sitemapmanufacturers.xml

Generated Google Manufacturers Sitemap Successfully

 

Opening /xxxxx/xxxxxxx/public_html/sitemapspecials.xml

FS_CAT /xxxx/xxxxxxxx/public_html/

Server http://brs-giftshop.com

Save Path /xxxxx/xxxxxxxx/public_html/WS_CAT /

Write /xxxx/xxxxxxxx/public_html/sitemapspecials.xml

Generated Google Specials Sitemap Successfully

 

Opening /xxxxxx/xxxxxxx/public_html/sitemapindex.xml

FS_CAT /xxxxx/xxxxxxx/public_html/

Server http://brs-giftshop.com

Save Path /xxxxx/xxxxxxx/public_html/WS_CAT /

Write /xxxxxx/xxxxxxx/public_html/sitemapindex.xml

Generated Google Sitemap Index Successfully

 

CONGRATULATIONS! All files generated successfully.

 

If you have not already submitted the sitemap index to Google click the link below.

Before you do I HIGHLY recommend that you view the XML files to make sure the data is correct.

 

http://www.google.com/webmasters/sitemaps/...itemapindex.xml

 

For your convenience here is the CRON command for your site:

php /XXXXX/XXXXX/public_html/googlesitemap/index.php

 

Here is your sitemap index: http://brs-giftshop.com/sitemapindex.xml

Here is your product sitemap: http://brs-giftshop.com/sitemapproducts.xml

Here is your category sitemap: http://brs-giftshop.com/sitemapcategories.xml

Here is your manufacturers sitemap: http://brs-giftshop.com/sitemapmanufacturers.xml

Here is your specials sitemap: http://brs-giftshop.com/sitemapspecials.xml

 

quote]

 

Posted results in post # 210 and 212

 

Bennett

Edited by blr044

Share this post


Link to post
Share on other sites
Am sorry but still when enter http://brs-giftshop.com/sitemapproducts.xml in browser, it still shows 0 urls in this and the other sitemaps. I have done what I found on the first page. This is what the http://brs-giftshop.com/googlesitemap/index.php page is getting:

 

Bennett

 

looks like there is an error in your config.php file

WS_CAT / and FS_CAT / looks like there is a space in front of the /

 

Nice website though ...

Share this post


Link to post
Share on other sites
I'm probably missing the upgrade instructions from v1.1 to 1.2 or do I have to start from scratch ?

This contribution doesn't really need upgrade instructions since it works independently. Just follow the few instructions in the readme and you should be all set.

 

I suppose I should have mentioned in the instructions not to add a sitemap to your google sitemap account if you are not going to use it. So if you upload the specials sitemap file and then don't enable it, the file will be empty and should not be added as a sitemap in your google account.

 

Jack

Share this post


Link to post
Share on other sites
Am sorry but still when enter http://brs-giftshop.com/sitemapproducts.xml in browser, it still shows 0 urls in this and the other sitemaps.

 

Are the permissions on the sitemap files the same as the ones on the images directory?

 

Jack

Share this post


Link to post
Share on other sites
Are the permissions on the sitemap files the same as the ones on the images directory?

 

Jack

 

 

The permission for those files, ia all set at 755

 

and this my includes/configure.php file:

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://brs-giftshop.com');

define('HTTPS_SERVER', 'https://brs-giftshop.com');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'brs-giftshop.com');

define('HTTPS_COOKIE_DOMAIN', 'brs-giftshop.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

 

define('DIR_WS_IMAGES', 'store_images/images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/home/brsgift/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Share this post


Link to post
Share on other sites

Hi Jack,

 

Great contribution! (AS ALL yours are). I installed v1.2 today (previously had v1.1), everything works great! Just 2 questions....

 

In admin->Configuration->Google XML SEO there is the option to exclude pages (files) from indexing. Do you enter them separated with a comma (this.php, file.php, other.php...)? Also, can you include files with parameters such as ie: information.php?info_id=2 ?

 

I like the fact that you have now included a site map for the standard pages, but I have a lot that I don't need or want indexed. It would be nice in the next version to possibly have a page on it's own for exclusion of pages, sort of like you have with Pages Group Control in your Sitemap SEO contribution (http://addons.oscommerce.com/info/6459.

 

I use many of your contributions and they are always easy to install and understand, you do a fantastic job, and I just wanted to thank you.

 

BTW...nice website : http://www.oscommerce-solution.com/

 

Sincerely,

Ken

Share this post


Link to post
Share on other sites
The permission for those files, ia all set at 755

Are the permissions on the sitemap files the same as the ones on the images directory?

 

Jack

Share this post


Link to post
Share on other sites
Hi Jack,

 

Great contribution! (AS ALL yours are). I installed v1.2 today (previously had v1.1), everything works great! Just 2 questions....

 

In admin->Configuration->Google XML SEO there is the option to exclude pages (files) from indexing. Do you enter them separated with a comma (this.php, file.php, other.php...)? Also, can you include files with parameters such as ie: information.php?info_id=2 ?

 

I like the fact that you have now included a site map for the standard pages, but I have a lot that I don't need or want indexed. It would be nice in the next version to possibly have a page on it's own for exclusion of pages, sort of like you have with Pages Group Control in your Sitemap SEO contribution (http://addons.oscommerce.com/info/6459.

 

I use many of your contributions and they are always easy to install and understand, you do a fantastic job, and I just wanted to thank you.

 

BTW...nice website : http://www.oscommerce-solution.com/

 

Sincerely,

Ken

Thank you for your comments. I apprecate them.

 

As for the exclude option, yes, that is a comman separated list. I meant to make a note of that but forgot. It won't work with pages that are part of a contribution, like info_id=2, though. You can editt the googlesitemap/sitemap.class.php file (or the alternate if you use it) to add your own though. To exclude regular pages, find this line

$this->excludeList

and enter the file names as the others are. To exclude particular pages for Information Pages contribution, find this line

			  $pagesArray[] = array('filename' => $this->base_url . 'information.php?info_id=' . $result['information_id'],

and add this right before it

if ($result['information_id'] != '2')

to exclude page 2. Multiple pages would be

if ($result['information_id'] != '2' || $result['information_id'] != '3')

 

I'll put adding an exclusion page on the list of changes to be made but it will probably be a while so the above should work until then.

 

Jack

Share this post


Link to post
Share on other sites

Thanks Jack!

 

Actually there is a problem that I thought I'd let you know about. As I said in the previous post I added the Google XML Sitemap SEO to my site and it works great (and by the way thanks for the info on doing exclusions). But just wanted you to know about something....

 

I also, just installed the ULTIMATE Seo Urls 5 (Revision 76)- by FWR Media contribution ( http://addons.oscommerce.com/info/6768 ) and there are some issues with it and this contribution and also your Header Tags SEO (V 3.1.4) contribution that I wanted you to be aware of.

 

At first I was going to use the old Ultimate SEO URLs contribution but I'm running PHP version 5.2.9 and the advise form Pektsekye in that contribution suggested: "If you start a new store on PHP5 I suggest you to use ULTIMATE Seo Urls 5 (http://addons.oscommerce.com/info/6768)" so I tried it, and it works great in producing seo urls. But it doesn't play nice with your (stated above) contributions.

 

I found that with:

ULTIMATE Seo Urls 5 -> the Google XML Sitemap SEO does not produce the new seo urls instead sticking with the old product_info.php?products_id=XX format. Even tried both the rewrite (mysite.com/great-product-p-3.html) or the standard (mysite.com/product_info.php/great-product-p-3) formats. I even tried your sitemap.class_Alternate for G xml sitemap but it broke the sitemaps.

 

with:

ULTIMATE Seo Urls 5 rewrite setting -> your Header Tags SEO (V 3.1.4) contribution will make the meta tags.

ULTIMATE Seo Urls 5 standard setting -> your Header Tags SEO (V 3.1.4) contribution will not make the meta tags.

 

I know that the ULTIMATE Seo Urls 5 is a new contribution, but just thought I'd like to let you know about it. I'm going to turn off the ULTIMATE Seo Urls 5 contribution for now because your Header Tags and Google xml sitemap contributions are far more valuable to me right now.

 

Hopefully in the near future they can be made to work together. I am also going to post in the ULTIMATE Seo Urls 5 forum to let them know about this as well (http://forums.oscommerce.com/index.php?showtopic=336702).

 

Just letting you know about this. (but any help or suggestion couldn't hurt).

 

Thanks again!

 

Sincerely,

Ken

Edited by NolaMan

Share this post


Link to post
Share on other sites

These files is all set at 755:

 

sitemap.xml

sitemapcategories.xml

sitemapindex.xml

sitemapmanufacrurers.xml

sitemapproducts.xml

sitemapspecials.xml

 

images/

store_images/

store_images/images/

googlesitemap

 

Bennett

Share this post


Link to post
Share on other sites
Thanks Jack!

 

Actually there is a problem that I thought I'd let you know about. As I said in the previous post I added the Google XML Sitemap SEO to my site and it works great (and by the way thanks for the info on doing exclusions). But just wanted you to know about something....

 

I also, just installed the ULTIMATE Seo Urls 5 (Revision 76)- by FWR Media contribution ( http://addons.oscommerce.com/info/6768 ) and there are some issues with it and this contribution and also your Header Tags SEO (V 3.1.4) contribution that I wanted you to be aware of.

 

At first I was going to use the old Ultimate SEO URLs contribution but I'm running PHP version 5.2.9 and the advise form Pektsekye in that contribution suggested: "If you start a new store on PHP5 I suggest you to use ULTIMATE Seo Urls 5 (http://addons.oscommerce.com/info/6768)" so I tried it, and it works great in producing seo urls. But it doesn't play nice with your (stated above) contributions.

I don't use ULTIMATE Seo Urls 5 since the original Ultiomate SEO works fine with php 5 and is compatible with all of the other SEO related contributions, at least the last version of Ultimate SEO I uploaded is. Unless it offers some major benefits, I don't see the point in using it over the original. But if if it used, it would have to be at the expense of losing the compatibility, until that changes. I won't be making any changes until I find that there is a reason to use it. That's not our of having anything against that contribution but is simply because I don't have the time to work through the code to find the problems.

 

Jack

Share this post


Link to post
Share on other sites
These files is all set at 755:

 

sitemap.xml

sitemapcategories.xml

sitemapindex.xml

sitemapmanufacrurers.xml

sitemapproducts.xml

sitemapspecials.xml

 

images/

store_images/

store_images/images/

googlesitemap

 

Bennett

If your server allows it, try setting the permissions for the sitemap files to 777. If not, or if that doesn't help, then your problem is specific to your server or setup and not something that can be handled here.

 

Jack

Share this post


Link to post
Share on other sites
If your server allows it, try setting the permissions for the sitemap files to 777. If not, or if that doesn't help, then your problem is specific to your server or setup and not something that can be handled here.

 

Jack

 

No change even after changing to 777. Have open a support ticket with my host.

 

Now if for some odd reason, if the host says it's not server, but the contribution that I installed - is there another version which I can look into? I am running osc ver Rc2a. What about this contribution?

 

Thanks Jack and this forum for all the suggestions.

 

Bennett

Share this post


Link to post
Share on other sites

This contribution is based on that one so it is unlikely to work either. I suspect it is some server setting that is preventing the files from being written to.

 

Jack

Share this post


Link to post
Share on other sites

Jack,

 

Couple of questions if I may:

Articles is installed on our website. Also your latest SEO friendly Url's installed. The URL on the website is SEO friendly for the articles contribution - however the sitemappages.xml page does not show search engine friendly urls whereas sitemapproducts.xml is SEO friendly. Any thoughts ?

 

Also, I've made a few products as "not available". This is temporary. This morning they were not included in the sitemapproducts.xml. I do not want to loose the rankings for these products. Any thoughts ?

 

The exlude instructions worked marvelously - I just wish the extra_info_pages w/admin worked a bit better with all of this. For the life of me I can't get it to work with SEO friendly URL's eventhough I changes the .htaccess file. Oh well someday .....

 

Thanks for all your help Jack.

Share this post


Link to post
Share on other sites
Jack,

 

Couple of questions if I may:

Articles is installed on our website. Also your latest SEO friendly Url's installed. The URL on the website is SEO friendly for the articles contribution - however the sitemappages.xml page does not show search engine friendly urls whereas sitemapproducts.xml is SEO friendly. Any thoughts ?

 

Also, I've made a few products as "not available". This is temporary. This morning they were not included in the sitemapproducts.xml. I do not want to loose the rankings for these products. Any thoughts ?

 

The exlude instructions worked marvelously - I just wish the extra_info_pages w/admin worked a bit better with all of this. For the life of me I can't get it to work with SEO friendly URL's eventhough I changes the .htaccess file. Oh well someday .....

 

Thanks for all your help Jack.

Yes, I see I didn't had the code for the other pages in a way for them to use SEO Url's. I'll put that down for the next version. If you make a product unavailable, it will not show on the site so you would lose its position anyway. The code only loads products that are active but you can change that to load them all by removing the check for products_status.

 

Jack

Share this post


Link to post
Share on other sites
If you make a product unavailable, it will not show on the site so you would lose its position anyway. The code only loads products that are active but you can change that to load them all by removing the check for products_status.

Jack

 

Check, tried to find the product_status information you refer to in above code. I find this information in general.php and categories.php. Where would I change this to not show the item on the site but still show the item in sitemapproducts.xml ?

Share this post


Link to post
Share on other sites
Check, tried to find the product_status information you refer to in above code. I find this information in general.php and categories.php. Where would I change this to not show the item on the site but still show the item in sitemapproducts.xml ?

In the sitemap class file you need to remove the code in the sql statements that checks the status of the product.

 

Jack

Share this post


Link to post
Share on other sites

There is a logic mistake in the code for the recent sitemappages file and articles manager that will cause an error in your google account. To fix that, change this code in the googlesitemap/sitemap_class.php (sitemap_class_Alternate.php) file

		/*** ADD ARTICLES ***/			
	if ($filename === 'articles.php')
	{
	  $sql = "SELECT a.articles_id, DATE_FORMAT(a.articles_last_modified,'%Y-%m-%d') AS lastmod from " . TABLE_ARTICLES . " a left join " . TABLE_ARTICLES_DESCRIPTION . " ad on a.articles_id = ad.articles_id where a.articles_status = '1' and ad.language_id = '" . (int)$languageID . "'";
	  if ( $articles_query = $this->DB->Query($sql) )
	  {
  			while( $result = $this->DB->FetchArray($articles_query) )
		{
		  $pagesArray[] = array('filename' => $this->base_url . 'article_info.php?articles_id=' . $result['articles_id'],
								'lastmod' => $result['lastmod']);
		}
	  }

	  $sql = "SELECT t.topics_id, DATE_FORMAT(t.last_modified,'%Y-%m-%d') AS lastmod from " . TABLE_TOPICS . " t left join " . TABLE_TOPICS_DESCRIPTION . " td on t.topics_id = td.topics_id where td.language_id = '" . (int)$languageID . "'";
	  if ( $articles_query = $this->DB->Query($sql) )
	  {
  			while( $result = $this->DB->FetchArray($articles_query) )
		{
		  $pagesArray[] = array('filename' => $this->base_url . 'articles.php?tPath=' . $result['topics_id'],
								'lastmod' => $result['lastmod']);
		}
	  } 
	}

to this

		/*** ADD ARTICLES ***/			
	if ($filename === 'articles.php')
	{
	  $sql = "SELECT a.articles_id, DATE_FORMAT(a.articles_last_modified,'%Y-%m-%d') AS lastmod, DATE_FORMAT(articles.date_added,'%Y-%m-%d') AS date_added from " . TABLE_ARTICLES . " a left join " . TABLE_ARTICLES_DESCRIPTION . " ad on a.articles_id = ad.articles_id where a.articles_status = '1' and ad.language_id = '" . (int)$languageID . "'";
	  if ( $articles_query = $this->DB->Query($sql) )
	  {
  			while( $result = $this->DB->FetchArray($articles_query) )
		{
		  $pagesArray[] = array('filename' => $this->base_url . 'article_info.php?articles_id=' . $result['articles_id'],
								'lastmod' => $this->NotNull($result['lastmod']) ? $result['lastmod'] : $result['date_added']);
		}
	  }

	  $sql = "SELECT t.topics_id, DATE_FORMAT(t.last_modified,'%Y-%m-%d') AS lastmod, DATE_FORMAT(t.date_added,'%Y-%m-%d') AS date_added from " . TABLE_TOPICS . " t left join " . TABLE_TOPICS_DESCRIPTION . " td on t.topics_id = td.topics_id where td.language_id = '" . (int)$languageID . "'";
	  if ( $articles_query = $this->DB->Query($sql) )
	  {
  			while( $result = $this->DB->FetchArray($articles_query) )
		{
		  $pagesArray[] = array('filename' => $this->base_url . 'articles.php?tPath=' . $result['topics_id'],
								'lastmod' => $this->NotNull($result['lastmod']) ? $result['lastmod'] : $result['date_added']);
		}
	  }
	}

 

Jack

Share this post


Link to post
Share on other sites
There is a logic mistake in the code for the recent sitemappages file and articles manager that will cause an error in your google account. To fix that, change this code in the googlesitemap/sitemap_class.php (sitemap_class_Alternate.php) file

 

Jack, with the above mentioned changes this is what happens to sitemappages.xml

 

Before:

http://mydomainname.com/article_info.php?article_id=23

http://mydomainname.com/article_info.php?article_id=3

http://mydomainname.com/article_info.php?article_id=24

http://mydomainname.com/article_info.php?article_id=25

http://mydomainname.com/article_info.php?article_id=26

http://mydomainname.com/article_info.php?article_id=27

http://mydomainname.com/article_info.php?article_id=28

http://mydomainname.com/article_info.php?article_id=29

http://mydomainname.com/article_info.php?article_id=30

http://mydomainname.com/article_info.php?article_id=31

http://mydomainname.com/article_info.php?article_id=33

http://mydomainname.com/article_info.php?article_id=34

http://mydomainname.com/article_info.php?article_id=35

http://mydomainname.com/article_info.php?article_id=40

http://mydomainname.com/article_info.php?article_id=41

http://mydomainname.com/article_info.php?article_id=43

http://mydomainname.com/articles.php?tpath=4

http://mydomainname.com/articles.php?tpath=5

http://mydomainname.com/articles.php?tpath=7

 

 

AFTER:

http://mydomainname.com/articles.php?tpath=4

http://mydomainname.com/articles.php?tpath=5

http://mydomainname.com/articles.php?tpath=7

 

 

Should the individual articles be in the sitemap.xml as well ?

Share this post


Link to post
Share on other sites

Double check the changes you made. They only had to do with adding a missnig date field and should not have caused that problem, at least not that I can see.

 

Jack

Share this post


Link to post
Share on other sites

Here's something thats been baffling me regarding this ace contribution I have 100 or so manufacturers, all of which had products assigned to them at some point. We are no longer stocking some of the products by certain manufacturers but the manufacturers are still being listing in the sitemapmanufacturers.xml. The weirdest thing is some of the manufacturers that have no stock aren't showing up which is how we want it, where is the logic in that? Does the script base its search on a date modified stamp or should it get all the manufacturers regardless of whether there is stock assigned to them or not. Confused? i am...


You can kill the King, but you can't kill the King Riddim...

Share this post


Link to post
Share on other sites

The code only reads in the manufacturers table. If there is an entry there, a link should show up in the sitemap file. So you may want to look at that table in the database to be sure there are entries for all of them.

 

Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×