Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 1 votes

Dynamic SiteMap


839 replies to this topic

#81 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 16 October 2005, 00:56

Yes, this is possible and was suggested already. I plan to make the change but have not had the time. You'll just need to find where the current name is generated and replace it with the name of the page.

Jack

#82 ecoren

  • Community Member
  • 20 posts
  • Real Name:ecoren

Posted 16 October 2005, 07:23

Well i think its a bit more difficult so that there should be a cycle to make all the necessary language files required. I didnt succed yet, is it the $file variant which contains the filenames from the catalog directory? Does it includes the extension (.php)? Another way could be to create a language file with the given names of the files displayed but of course its not automatic however seems simplier.

#83 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 16 October 2005, 14:19

Yes, it is the $file variable. The code involved is at the bottom of the includes/modules/dynamic_sitemap.php file.

Jack

#84 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 17 October 2005, 01:15

I've uploaded a new version. It should display the file names in the proper language. Only the includes/modules/dunamic_sitemap.php file changed so you just need to copy that to upgrade.

Jack

#85 MIB2001

  • Community Member
  • 3 posts
  • Real Name:Markus

Posted 19 October 2005, 13:08

Hello Jack,

I just tried your new version 1.5, but I have the following problem:

The links to the separate pages on the right of the sitemap show the wrong links for the description shown. It seems, that the wrong filename or the wrong pagetitle is used for every entry.

Do you have any ideas, what it could cause?

Thank you very much


Markus

#86 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 19 October 2005, 18:08

Can you provide more details please? For example, the link says bob but when you click on it it displays the sam page.

Jack

#87 MIB2001

  • Community Member
  • 3 posts
  • Real Name:Markus

Posted 19 October 2005, 18:46

Hello Jack, thanks for your quick reply :-)

you got me right. But here are some more examples:

First link goes to advanced_search.php, but shows "New Products",
seceond then goes to "products_new.php", but shows "Privacy",
third goes to "privacy.php", but shows "Specials"

From this examples I would say that the first pagename is missing from the list and the others are "one down the list", but later this sequenz is changed. The change seems to start with a link to "index.php". After that, every pagename ist "down two lines the list".

I hope you understand what I mean.

Once again thanks for your help.

Markus

#88 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 20 October 2005, 03:47

In includes/modules/dynamic_sitemap.php, find this line
if (strpos($fp[$idx], "define('NAVBAR_TITLE'") !== FALSE)
and change it to
if (strpos($fp[$idx], "define('NAVBAR_TITLE") !== FALSE)
That will fix the alignment problem. But some of the titles may not be as you expect. Try changing it to
if (strpos($fp[$idx], "define('HEADIN_TITLE") !== FALSE)
The results might be better. Some of the pages should be added to the exclude list anyway though.

Jack

#89 osCshop

  • Community Member
  • 161 posts
  • Real Name:.
  • Location:The Netherlands

Posted 20 October 2005, 11:00

View PostJack_mcs, on Oct 20 2005, 05:47 AM, said:

In includes/modules/dynamic_sitemap.php, find this line
if (strpos($fp[$idx], "define('NAVBAR_TITLE'") !== FALSE)
and change it to
if (strpos($fp[$idx], "define('NAVBAR_TITLE") !== FALSE)
Works great here, thanks!

Before submitting to searchengines I've applied Chemo's Ult SEF URL's v2.0b (because I'm hosting on Windows).
If I follow a link from the sitemap I'll end up in index.php?cPath=14.
How can I change dynamic_sitemap that it will show index.php?cName=audio-algemeen?
I discoverd this because MSN showed me many links in th cPath style wich is'nt good for ranking I think (duplicated pages) :huh:

TIA

#90 MIB2001

  • Community Member
  • 3 posts
  • Real Name:Markus

Posted 20 October 2005, 20:42

Thank you, Jack. That does the trick :D

Now it's working perfect. Really a great contrib!

#91 osCshop

  • Community Member
  • 161 posts
  • Real Name:.
  • Location:The Netherlands

Posted 21 October 2005, 12:16

View PostosCshop, on Oct 20 2005, 01:00 PM, said:

Before submitting to searchengines I've applied Chemo's Ult SEF URL's v2.0b (because I'm hosting on Windows).
If I follow a link from the sitemap I'll end up in index.php?cPath=14.
How can I change dynamic_sitemap that it will show index.php?cName=audio-algemeen?
I discoverd this because MSN showed me many links in th cPath style wich is'nt good for ranking I think (duplicated pages) :huh:
Jack,
I found out that the first categorie does show the SEO url but all sub-categories don't...
If you need a url I'll send it by PM.

#92 osCshop

  • Community Member
  • 161 posts
  • Real Name:.
  • Location:The Netherlands

Posted 24 October 2005, 15:27

Oh My :o
More problems...
The last link in the sitemap points to the index instead of the related page.
If I follow a link in a sub-category the breadcrumbtrail isn't right anymore;
Instead of Home>>Audio>>Algemeen it shows Home>>Algemeen the categorybox stay's default (not showing the category you're in) and the url is index.php?cPath=14 instead of the cName like mentioned before :'(

Could anybody please help me despite my bad english?!?

#93 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 24 October 2005, 18:14

I'm not seeing the breadcrumb problem here. If you mouse over the link on the site map is the link correct? The url problem isn't a problem with this contribution. I will look at it eventually but no telling when. You may want to ask in the support thread for Ultimate SEO.

Jack

#94 osCshop

  • Community Member
  • 161 posts
  • Real Name:.
  • Location:The Netherlands

Posted 24 October 2005, 18:26

I'll PM you a link to a testsite with the Dynamic Sitemap (the link is deleted from the footer).
The last item in the Sitemap is "Nieuwe artikelen" wich is products_new. Now it's linking to the index...

#95 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 24 October 2005, 20:17

Check in the language file for that file and see what NAVBAR_TITLE is defined as. Any special characters? It uses that to build the link so that would effect it.

Jack

#96 osCshop

  • Community Member
  • 161 posts
  • Real Name:.
  • Location:The Netherlands

Posted 25 October 2005, 12:36

define('NAVBAR_TITLE', 'Nieuwe artikelen');
define('HEADING_TITLE', 'Nieuwe artikelen');

Nothing special there...

#97 Genius

  • Community Member
  • 503 posts
  • Real Name:Prash

Posted 25 October 2005, 15:00

Hi Jack,

thanks for the great contribtuion.i have been trying different site maps and all products and just did not get what i wanted. See your contribtion and it works great.

Thanks once again

#98 osCshop

  • Community Member
  • 161 posts
  • Real Name:.
  • Location:The Netherlands

Posted 25 October 2005, 17:42

Jack,
In the non-dynamic version off another Sitemap contribution there's a solution for Ult. SEO URL's links in that sitemap.
I'm talking about this Sitemap contribution and the modification/solution datted 11 Mar 2005 by Chris LaRocque.

I'm a PHP noob so the source in the modified categorie_tree.php is not helping me at all.
Does it make sense to you?

#99 Jack_mcs

  • Community Member
  • 24,439 posts
  • Real Name:Jack
  • Gender:Male

Posted 25 October 2005, 17:48

View PostosCshop, on Oct 25 2005, 08:36 AM, said:

define('NAVBAR_TITLE', 'Nieuwe artikelen');
define('HEADING_TITLE', 'Nieuwe artikelen');

Nothing special there...
Find this line in the includes/modules/dynamic_sitemap.php file
$files['path'][] = $file;
and move it so that it is after this line
				$files['name'][] = ucfirst(substr($fp[$idx], $p_start + 1, $p_stop - $p_start - 1));
Does that fix it?

Jack

#100 osCshop

  • Community Member
  • 161 posts
  • Real Name:.
  • Location:The Netherlands

Posted 25 October 2005, 21:36

Thanks Jack!
Now the last link in the Sitemap is correct :thumbsup:

Hope that all links can point to Ult. SEO URL's also soon...
Did the sourcemodification in categorie_tree for Ult. SEO URL's made sense to you?

		 $this->data = array();
		 while ($categories = tep_db_fetch_array($categories_query)) {
			// Ultimate SEO URLs compatibility - Chemo
			# initialize array container for parent_id 
			$p = array();
			tep_get_parent_categories($p, $categories['parent_id']);
			# For some reason it seems to return in reverse order so reverse the array 
			$p = array_reverse($p);
			# Implode the array to get the parent category path
			$cID = (implode('_', $p) ? implode('_', $p) . '_' . $categories['parent_id'] :
			$categories['parent_id']);
			# initialize array container for category_id 
			$c = array();
			tep_get_parent_categories($c, $categories['categories_id']);
			# For some reason it seems to return in reverse order so reverse the array 
			$c = array_reverse($c);
			# Implode the array to get the full category path
			$id = (implode('_', $c) ? implode('_', $c) . '_' . $categories['categories_id'] :
			$categories['categories_id']);

		   $this->data[$cID][$id] = array('name' => $categories['categories_name'], 'count' => 0);
		 } // eof While loop
	} //eof Function

Edited by osCshop, 25 October 2005, 21:37.