Jump to content
Jack_mcs

Dynamic SiteMap

Recommended Posts

a quick little bug fix, to the orphaned li tag (which shows as an extra bullet point) at the bottom of the pages list on the sitemap, if you have chosen to exclude all info boxes from the sitemap list

in dynamic_sitemap.php about line 273 change the box files section from

               // Box Files
               for ($b = 0; $b < count($boxHeading); ++$B)
               {
                   echo '<li>'.$boxHeading[$b]['heading'][$b];
                   $nb_elements = count($boxHeading[$b]['filename']);
                   if($nb_elements > 0)
                   {
                       if (tep_not_null($boxHeading[$b]['filename'][0]))
                       {
                       echo '<ul>';
                       for ($f = 0; $f < $nb_elements ; ++$f)
                           if (tep_not_null($boxHeading[$b]['filename'][$f]))
                               echo '<li><a title="'. $boxHeading[$b]['boxtext'][$f] .'" href="' . tep_href_link($boxHeading[$b]['filename'][$f]) . '">' . $boxHeading[$b]['boxtext'][$f] . '</a></li>';
                       echo '</ul>';
                       }
                   }
                   echo '</li>';
               }

 

to

 

               // Box Files
              for ($b = 0; $b < count($files['name']); ++$B)
               {
                   echo '<li><a title="'. $files['name'][$b] .'" href="' . tep_href_link($files['path'][$b]) . '">' . $files['name'][$b] . '</a></li>';
               }
               // Box Files
               for ($b = 0; $b < count($boxHeading); ++$B)
               {
                   $nb_elements = count($boxHeading[$b]['filename']);
                   if($nb_elements > 0)
                   {
                    echo '<li>'.$boxHeading[$b]['heading'][$b];
                       if (tep_not_null($boxHeading[$b]['filename'][0]))
                       {
                       echo '<ul>';
                       for ($f = 0; $f < $nb_elements ; ++$f)
                           if (tep_not_null($boxHeading[$b]['filename'][$f]))
                               echo '<li><a title="'. $boxHeading[$b]['boxtext'][$f] .'" href="' . tep_href_link($boxHeading[$b]['filename'][$f]) . '">' . $boxHeading[$b]['boxtext'][$f] . '</a></li>';
                       echo '</ul>';
                       }
                   echo '</li>';
                   }
               }

Share this post


Link to post
Share on other sites

For people that are having problems with this Dynamic Site Map and STS Templates when generating the xml sitemaps

you need to modify the code of create_xml_sitemaps.php

as follows

 

just of the body tag about line 50 add

<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

then just after

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>

about line 54 add

    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

then just above  the close body tag about line 327 add
CODE

 

which then fixes both the blank output and the placeholder variables problems

Share this post


Link to post
Share on other sites
Yeah, I am not going to touch it. No support from the contributor.

 

Which Version and Author is this support thread designed for?

Share this post


Link to post
Share on other sites

I am trying to install the code patch for the Enable/Disable Categories. In updating a Version 2 the instructions say to find and edit:

 

includes/classes/category_tree.php

 

There is no reference to the above if updating with Version 3 and I do not have that PHP file. Is it categories.php that needs to be edited?

 

I am attempting to install Version 3.5 of this contribution.

Share this post


Link to post
Share on other sites

Oops - nevermind - thought it was a different contributions thread :blush:

 

I am trying to install the code patch for the Enable/Disable Categories. In updating a Version 2 the instructions say to find and edit:

 

includes/classes/category_tree.php

 

There is no reference to the above if updating with Version 3 and I do not have that PHP file. Is it categories.php that needs to be edited?

 

I am attempting to install Version 3.5 of this contribution.

Edited by TracyS

~Tracy
 

Share this post


Link to post
Share on other sites

I have installed Dynamic Sitemap V 4.0.1 and my categories and manufactuer sitemaps look like this: (www.eddies-place.com is the website)

 

Creating categories sitemap.

Category ID --> URL

994 --> http://localhost/optics-spotting-telescopes-c-993_994.html

994 --> http://localhost/optics-spotting-telescopes-c-993_994.html

994 --> http://localhost/optics-spotting-telescopes-c-993_994.html

994 --> http://localhost/optics-spotting-telescopes-c-993_994.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

 

 

Creating manufacturers sitemap.

Manufacturer --> URL

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Smith & Wesson --> http://localhost/smith-wesson-m-12.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

Cold Steel --> http://localhost/cold-steel-m-15.html

Cold Steel --> http://localhost/cold-steel-m-15.html

Cold Steel --> http://localhost/cold-steel-m-15.html

Cold Steel --> http://localhost/cold-steel-m-15.html

 

I cannot determine why I am getting all the duplicates. Any suggestion will be greatly appreciated.

 

The products sitemap looks fine.

 

Any ideas?

 

Eddie

Share this post


Link to post
Share on other sites

Hi,

 

We dont have any specials at the moment so the specials sitemap is empty ... when submitting sitemaps.xml to Google its reporting an error because smspecials.php has nothing in there just an opening and closing <urlset> tag ... is there a way I can make it NOT generate the specials sitemap and NOT include it in the sitemaps.xml file ??

 

I tried editing create_xms_sitemaps.php by commenting out the part where it creates the specials sitemap (well what i THOUGHT was creating the specials sitemap) but didn't work...

 

//create specials listing sitemap
echo TEXT_CREATE_SPECIALS;			
$sm = DIR_FS_CATALOG . 'smspecials.xml';
$fh = fopen($sm, 'w') or die(ERROR_SPECIALS_FILE);
fwrite($fh, utf8_encode($xml_head));
$base_url = HTTP_CATALOG_SERVER.DIR_WS_CATALOG."specials.php?page="; // url to your specials pages (must end with the page=)
$cnt = 0;
$special_query = tep_db_query('select count(specials_id) as numspecials from ' . TABLE_SPECIALS . ' s join ' . TABLE_PRODUCTS . ' p where p.products_status = 1 and s.products_id = p.products_id and s.status = 1');
$num = tep_db_fetch_array($special_query);
$numpages = ((int)$num['numspecials'] = 0 ? 1 : ceil((int)$num['numspecials'] / MAX_DISPLAY_SEARCH_RESULTS));
for ($page = 1; $page <= $numpages; $page++) // create a url for every page of each manufacturer
 {
  //$url = $base_url . $page;
	  $url=tep_href_link(FILENAME_SPECIALS,'page='.$page,'NONSSL',false);
 echo $page .' --> '. $url .'<br>';
 fwrite($fh, utf8_encode('<url><loc>' . smspecialchars($url) . "</loc><changefreq>".$scf."</changefreq></url>\n"));
 }
fwrite($fh, utf8_encode($xml_foot));
fclose($fh); 
echo $numpages . TEXT_COMPLETED;

 

Tried commenting all that out but no luck.

 

 

Will Google punish us or not crawl us if its reporting this error?? If it wont effect us at all then I guess we can just leave it for now ... any info would be greatly appreciated :)

Edited by sLaV-

Share this post


Link to post
Share on other sites

:blush: Hi! thanks for your contribution, but havea trouble could you please help me:

 

in my page url: http://adprintstore.com/store/dynamic_sitemap.php

 

1146 - Table 'adpluss_osc1.TABLE_SITEMAP_EXCLUDE' doesn't exist

 

select exclude_file from TABLE_SITEMAP_EXCLUDE where exclude_type != "0" and is_box="1"

 

[TEP STOP]

 

---------------------------------

 

All site works fine, my admin panel to works excelent but no this page, what can i do....

 

Thanks man...

Share this post


Link to post
Share on other sites
:blush: Hi! thanks for your contribution, but havea trouble could you please help me:

 

in my page url: http://adprintstore.com/store/dynamic_sitemap.php

 

1146 - Table 'adpluss_osc1.TABLE_SITEMAP_EXCLUDE' doesn't exist

 

select exclude_file from TABLE_SITEMAP_EXCLUDE where exclude_type != "0" and is_box="1"

 

[TEP STOP]

 

---------------------------------

 

All site works fine, my admin panel to works excelent but no this page, what can i do....

 

Thanks man...

missing table, run sql file.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Hello everybody!

I just installed contribution and some strange thing happening: despite it looks like everything is Ok (no errors at least) it doesn't generate sitemaps.xml file. I checked the file and it still has sample info. I did changes for STS users as it was suggested, when I run "submit" I got the page with links, but still file sitemaps.xml is old.

Thanks for any advice.

 

Mike


Computers777dotcom

Share this post


Link to post
Share on other sites

Problem: I installed it as it says but when I click submit it does not update my xml files. They remain with the sample. Permissions for testing purposes are all 777. Please help!


plasma.jpg

Share this post


Link to post
Share on other sites

Can someone in the know recommend the best version to install? 4.x or 3.4.1 GuiGui

 

lildog

Share this post


Link to post
Share on other sites

Good day,

 

I really hope this isn't a dead post?

 

Everything has set itself up proper but when I click on submit query I get:

 

Not Found

The requested URL /shop/admin/FILENAME_CREATE_XML_SITEMAPS was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

How can this be, I can sign into my site with FTP and see that the missing file is where it should be and rearing to go?

 

I'm sure it's simple and I've been reading through all 37 pages of this behemoth without luck!! Any help greatly apprectiated

Share this post


Link to post
Share on other sites
Can someone in the know recommend the best version to install? 4.x or 3.4.1 GuiGui

 

lildog

What's wrong with your version?


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Nothing. I asked the question and then decided to forge ahead. I am rebuilding a new shop and was wondering what the recommended version was. When the contribs get flumexed up I get confused as to what version is best....

 

What's wrong with your version?

Share this post


Link to post
Share on other sites
Nothing. I asked the question and then decided to forge ahead. I am rebuilding a new shop and was wondering what the recommended version was. When the contribs get flumexed up I get confused as to what version is best....

I meant the version you made. That is what I am using.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Some of the instructions were missing. I uploaded a new version with the complete install docs.

 

lildog

 

Hi, i want to instal this contribution bt i am nt trained at this..can you provide me instruction file as how to install this

Share this post


Link to post
Share on other sites
Some of the instructions were missing. I uploaded a new version with the complete install docs.

 

lildog

Thanks, will give it a try in a few days.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Really great looking Sitemap for my customers. Since originally installing 3.5, the second column contents displays twice. Updated just now to 3.5.5. Same results. I did change code for cosmetic purposes. I would like to get a hint as were to look for what might be causing this. Below is a link to the Site Map. Thanks!

 

B4Auto Sitemap

Edited by Berlyn

Share this post


Link to post
Share on other sites
Thanks, will give it a try in a few days.

Works well with no problems. Thanks.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Hi,

 

How did you solve your error in the sitemap ?

 

I use seo valadition too and dangling carrot too.

But when i look in google sitemap i have got too many error :

 

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

 

all my links are like that :

 

 

and it is written that is 301 redirect

Share this post


Link to post
Share on other sites

At the end of my Dynamic Site Map page, which you can find here:

 

http://www.thebestcandles.com/dynamic_sitemap.php

 

I get:

 

Error!

Unable to determine the page link!

 

I didn't have much luck searching here so I tried Google search for a solution... but didn't find anything...

 

Could somebody steer me in the right direction please.

 

Thanks,

Pete


I find the fun in everything.

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

×