Jump to content
Jack_mcs

Dynamic SiteMap

Recommended Posts

Thanks for the quick reply. I installed 2.0 and it works. I am sorry to bother you on such an easy fix, I am always hesitant to use contributions modified from the original version by someone other than the developer. But in this case the new version worked perfectly. Thanks for letting me know.
I understand. Some of my contributions were damaged by such changes so I don't support them as a rule. Although, in this case, 2.0 does work.

 

Jack

Share this post


Link to post
Share on other sites

Try changing the color in the class added by the contribution to the stylesheet.css file.

 

Jack

Share this post


Link to post
Share on other sites

Thank you Jack.

 

Do you know how to change the names in the right column? and how to add new lines to this column?

 

Thanks again

phpsurfer

Share this post


Link to post
Share on other sites

The names come from its file in the english directory. You could change it there. I don't understand what you mean about new lines.

 

Jack

Share this post


Link to post
Share on other sites

Sorry about my poor english. Im Portuguese.

With "new lines", i mean adding new dots. I would like to add some products to the right column of sitemap.

 

thanks

phpsurfer

Share this post


Link to post
Share on other sites

The code is not setup for products. The All Products with Images contributions should be used for that. This is just for categories, pages and infoboxes. You could add the code to add products, of course, it just doesn't exist in there now.

 

Jack

Share this post


Link to post
Share on other sites
Ok, and its possible to remove the right column, and add other elements, like you can see in this webpage?

http://www.lingerie-confidential.co.uk/cat...mic_sitemap.php

Thanks

phpsurfer

That site appears to be using this contribution and it is showing products so either the shop owner changed the code or there might be such a version uploaded here. It is possible in any case but the code would have to be edited.

 

Jack

Share this post


Link to post
Share on other sites

I seem to be having a problem with the 2.0 release. Hopefully someone can point me in the right direction (I know I must have missed something, but I can't seem to find what). On my site when you click on SiteMap it generates a sitemap, but the formating doesn't appear correct. The page seems to justified wrong. Please look at the site http://www.tea-n-honey.com/dynamic_sitemap.php . Also is there an easy way to turn off the sitemap in the Admin panel?

 

Thank you in advance...

 

Steve

Share this post


Link to post
Share on other sites

The dynamic_sitemap.php file that goes in the root uses the standard oscommerce page format. If yours is different, you can't just upload it to your server. You will need to compare it with some other file on your site to make the correct changes.

 

Jack

Share this post


Link to post
Share on other sites

Fixed cPath in class category_tree.php (Dynamic Site Map v 2.00)

 

If you want to have category links to be suitable and compatible with breadcrumb and other contribs (like some categories box enhancments and similar), which means to have complete links including the parent categories, you just need to make these few minor changes included below.

 

AUTHORS: wizaard (if) and funous (the others) ;)

 

 

HOW TO?

CHANGES TO catalog/includes/classes/category_tree.php

 

REPLACE:

function buildBranch($parent_id, $level = 0) {

WITH:

function buildBranch($parent_id, $level = 0, $p_category_link = false) {

 

ADD BELOW FOREACH FUNCTION (around line 23):

if ($parent_id == '0') {
$category_link = $category_id;
} else {
$category_link = $p_category_link . '_' . $category_id;
}

 

REPLACE:

$result .= $this->buildBranch($category_id, $level+1);}

WITH:

$result .= $this->buildBranch($category_id, $level+1, $category_link);}

 

THE END, ENJOY

Share this post


Link to post
Share on other sites

When I've read my posted hint (Fixed cPath in class category_tree.php (Dynamic Site Map v 2.00)) I found out that it would be nice to give you better explanation what it does. So... the original version of Dynamic SiteMap v 2.00 outputs links of categories using "index.php?cPath=ID" mask but it's not very suitable and compatible with breadcrumbs and/or category list box. BUT when you use my fix, you'll get the right and well-working links like this: "index.php?cPath=(Parent ID 1)_(Parent ID 2)..._(Parent ID X)_(Current category ID)" which is the correct one.

Share this post


Link to post
Share on other sites
ok, I see that the defines are there

 

after spending some time and experimenting with various things, I found the problem

 

this may or may not be a php 5.x thing, but, I had to go thru the files for this contrib and change all

 

<?

 

to

 

<?php

 

once that was done, things started working

 

 

Thanks for pointing this out... how one missed that I don't know! I can stop banging my head on the wall now ;)


if at first it doesn't work... use a bigger hammer

Share this post


Link to post
Share on other sites

After installing Dynamic Sitemap v2, everything seems to perform as it should do but I have the following error at the top of sitemap page:-

 

"Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(..) is not within the allowed path(s): (/home/rdlsafet/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/rdlsafet/public_html/includes/modules/dynamic_sitemap.php on line 114"

 

Code at line 114 reads:

 

if((! is_dir($file) && substr($file, -4, 4) === ".php") && !in_array($file ,$excluded_array))//only look at php files and skip that are excluded
   {
       $engFile = DIR_WS_LANGUAGES . $language . '/' . $file;
       if (file_exists($engFile) && IsViewable($file)) 
       {

 

From searching the forum this seems to be a problem caused by sitemap trying to access a /tmp directory that I don't have access to. Can I direct it to another directory that I do have access to e.g /home/rdlsafet/public_html/newdir? And how to do?

 

Be gentle with me, php 5/10, server controls 3/10 but on a steep learning curve! :blink:

 

 

thanks

 

John

Share this post


Link to post
Share on other sites

You can sometimes get by that by going to admin->Configuration->Sessions and changing the path to a local one, like /home/USERNAME/public_html/tmp/, where USERNAME is your username. If that doesn't do it, you may need to ask your host since it can be caused by a server setup too.

 

Jack

Share this post


Link to post
Share on other sites

Thanks for your reply Jack,

 

As suggested, tried that but no change, from searches it looks like my shared server has safe mode switched on.

 

I'll visit my host & see what they have to say

 

John

Share this post


Link to post
Share on other sites

Problem resolved, my host have removed the open_basdir restriction for me & all ok.

 

Onwards & upwards - next contribution installation here we come!

 

John :lol: :lol: :lol:

Share this post


Link to post
Share on other sites

Is it possible to change the sort order, so that catalog/dynamic_sitemap.php shows the same info, but sorted from a-z?

Share this post


Link to post
Share on other sites

The categories are sorted based on their sort setting in admin. For the pages, trying adding this right before the ?> in incudes/modules/dynamic_sitemap.php

sort($files['name']);

 

Jack

Share this post


Link to post
Share on other sites

I have worked though the updated readme file and installed the version from here http://www.oscommerce.com/community/contri.../search,sitemap

dated 25 ostober 2005 by sallen, first off is this the contribution thread that supports this and if so can anyone tell me what I have done wrong to get this error on the main shop when the sitemap link is clicked

 

 

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

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

[TEP STOP]

 

I have run the sql file and the admin section shows all pages in the dropdown list.

 

Cheers

 

Ian

Edited by ian_m

Share this post


Link to post
Share on other sites

Yes, this is the correct thread. When you see capital letters like that, it means a definition cannot be found. In this case, I suspect you didn't make the changes to the database_tables.php file. Read through the instructions and look for those pertaining to that file.

 

Jack

Share this post


Link to post
Share on other sites
Yes, this is the correct thread. When you see capital letters like that, it means a definition cannot be found. In this case, I suspect you didn't make the changes to the database_tables.php file. Read through the instructions and look for those pertaining to that file.

 

Jack

 

Jack

 

Thanks for pointing me in the right direction you were spot on, now working perfect, thanks again for your invaluable help.

 

Regards

 

Ian

Share this post


Link to post
Share on other sites

Ive had the site map installed for awhile now all working good, today I went into it and got this error on the Admin side:

 

Catchable fatal error: Object of class box could not be converted to string in public_html/admin/includes/functions/html_output.php on line 281

 

Thanks

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

×