Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 1 votes

Dynamic SiteMap


838 replies to this topic

#21 esperos

  • Community Member
  • 40 posts
  • Real Name:Nicholas
  • Location:Middlesex, UK

Posted 30 June 2005, 08:06

Thanks Jack, that did the trick.

Nick

#22 Jack_mcs

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

Posted 30 June 2005, 12:29

Howard - Are you sure you don't have two infomation.php files in the boxes directly like a copy named information_orig.php? The links are not showing the same so it appears to be reading two different boxes.

Nicholas - Great thanks for letting me know.

Jack

Edited by Jack_mcs, 30 June 2005, 12:30.


#23 wheeloftime

  • Community Member
  • 2,338 posts
  • Real Name:Howard
  • Gender:Male
  • Location:Universe

Posted 30 June 2005, 13:13

Jack_mcs, on Jun 30 2005, 01:29 PM, said:

Howard - Are you sure you don't have two infomation.php files in the boxes directly like a copy named information_orig.php? The links are not showing the same so it appears to be reading two different boxes.

Nicholas - Great thanks for letting me know.

Jack

<{POST_SNAPBACK}>


Problem solved, you did put the hammer right on the nail !
I had a file called information.php.org in that directory (that's what I usually do to keep a safe copy) and after removing it altogether the erroneous second informationbox links dissapeared also.

Thanks for your time and efforts Jack, now I can clean it up a bit further and put it into the live shop !

#24 Jack_mcs

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

Posted 30 June 2005, 14:02

You're welcome. Actually, I had put a check in the code to make sure it only read php files but didn't think about the .php_orig type (which I use too). So I have uploaded a new version that will check for that. The only file changed is the modules/dynamic_sitemap.php file so that can just be copied over to install the update.

Jack

#25 esperos

  • Community Member
  • 40 posts
  • Real Name:Nicholas
  • Location:Middlesex, UK

Posted 30 June 2005, 15:11

Jack,

Thanks for a great contribution and for your help with the very few problems I've had installing it.

Regards

Nick

#26 wheeloftime

  • Community Member
  • 2,338 posts
  • Real Name:Howard
  • Gender:Male
  • Location:Universe

Posted 30 June 2005, 15:27

Jack_mcs, on Jun 30 2005, 03:02 PM, said:

You're welcome. Actually, I had put a check in the code to make sure it only read php files but didn't think about the .php_orig type (which I use too). So I have uploaded a new version that will check for that. The only file changed is the modules/dynamic_sitemap.php file so that can just be copied over to install the update.

Jack

<{POST_SNAPBACK}>


Nice ! Just updated to your last changes and no more non-php extension files are bugging the sitemap :thumbsup:

One idea/enhancement I like to drop for which I don't know how difficult it will be or how wanted.
It's purely about multilanguage shops like mine; as all file names are english they show up in english within the site map and for that also in rather cryptic way for probably most customers (like ie. about_us which is not the best example but you understand what I mean). What if the contrib would look for an equivalent file name within the language directory and if found pick the NAVBAR_TITLE or HEADING_TITLE which would then be displayed instead of the raw file name ?
That would make it DSS (Dynamic Super Sitemap) :D

#27 Jack_mcs

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

Posted 30 June 2005, 18:39

That's a good idea and it shouldn't be too hard to change. Just to clarify though, are the links of the infoboxes showing up in the proper language? The code should read in the proper language file and load the correct text for those.

Jack

#28 wheeloftime

  • Community Member
  • 2,338 posts
  • Real Name:Howard
  • Gender:Male
  • Location:Universe

Posted 30 June 2005, 19:15

Jack_mcs, on Jun 30 2005, 07:39 PM, said:

That's a good idea and it shouldn't be too hard to change. Just to clarify though, are the links of the infoboxes showing up in the proper language? The code should read in the proper language file and load the correct text for those.

Jack

<{POST_SNAPBACK}>


Jack,

Yes, the links of the infoboxes are in the correct language. It's just the seperate files which reflect the raw (english) file name.

Howard

#29 Jack_mcs

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

Posted 30 June 2005, 19:45

Great, thanks for letting me know.

Jack

#30 tdogg

  • Community Member
  • 56 posts
  • Real Name:Siddall
  • Location:USA

Posted 08 July 2005, 00:28

Jack,
I am still learning about SEO and the whole spider/robot methodology, so forgive my ignorance. Since this sitemap is "dynamic" will it still have the positive SEO effects of a static sitemap? Will spiders still hit the sitemap and use it to hit all other links?

Thanks in advance!

Regards,
Siddall

#31 tdogg

  • Community Member
  • 56 posts
  • Real Name:Siddall
  • Location:USA

Posted 08 July 2005, 01:57

Jack,

The right column has my product categories and looks great!

The left column looks like this:

*Account 
*Account_edit 
*Account_history 
*Account_history_info 
*Account_newsletters 
*Account_notifications 
*Account_password 
*Address_book 
*Address_book_process 
*Advanced_search 
*Checkout_confirmation 
*Checkout_payment 
*Checkout_payment_address 
*Checkout_shipping 
*Checkout_shipping_address 
*Checkout_success 
*Conditions 
*Contact_us 
*Contest 
*Contest_rules 
*Cookie_usage 
*Create_account 
*Custom 
*Custom_rules 
*Index 
*Info_shopping_cart 
*Login 
*Logoff 
*Password_forgotten 
*Privacy 
*Product_reviews 
*Products_new 
*Product_reviews_info 
*Product_reviews_write 
*Reviews 
*Shipping 
*Shopping_cart 
*Specials 
*Ssl_check 
*Tell_a_friend 
*Dynamic_sitemap

*Information 
     o Shipping & Returns 
     o Privacy Notice 
     o Conditions of Use 
     o Contact Us 
     o Site Map

Is that list of filenames with the underscores correct?
The information infobox at the end looks good...and appears to use the filenames form filenames.php. Whereas, the long list is not.

Do you have any advice?

I also have an infobox that is basically a ripe from "Contact Us" and it choked on it...I had to exclude it. Even odder, I have a third infobox that is a ripe from "Contact Us" and almost identical to the one that chokes but it worked fine. That issue is melting my brain!

Thanks in advance!
Siddall

#32 Jack_mcs

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

Posted 08 July 2005, 02:02

tdogg, on Jul 7 2005, 08:28 PM, said:

Jack,
  I am still learning about SEO and the whole spider/robot methodology, so forgive my ignorance.  Since this sitemap is "dynamic" will it still have the positive SEO effects of a static sitemap?  Will spiders still hit the sitemap and use it to hit all other links? 

Thanks in advance!

Regards,
Siddall

<{POST_SNAPBACK}>

The difference between this contribution and the static one, is that this one will add more links to the page, thus increasing the number of links the SE will see.

Jack

#33 Jack_mcs

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

Posted 08 July 2005, 02:05

tdogg, on Jul 7 2005, 09:57 PM, said:

Jack,

The right column has my product categories and looks great!

The left column looks like this:

*Account 
*Account_edit 
*Account_history 
*Account_history_info 
*Account_newsletters 
*Account_notifications 
*Account_password 
*Address_book 
*Address_book_process 
*Advanced_search 
*Checkout_confirmation 
*Checkout_payment 
*Checkout_payment_address 
*Checkout_shipping 
*Checkout_shipping_address 
*Checkout_success 
*Conditions 
*Contact_us 
*Contest 
*Contest_rules 
*Cookie_usage 
*Create_account 
*Custom 
*Custom_rules 
*Index 
*Info_shopping_cart 
*Login 
*Logoff 
*Password_forgotten 
*Privacy 
*Product_reviews 
*Products_new 
*Product_reviews_info 
*Product_reviews_write 
*Reviews 
*Shipping 
*Shopping_cart 
*Specials 
*Ssl_check 
*Tell_a_friend 
*Dynamic_sitemap

*Information 
     o Shipping & Returns 
     o Privacy Notice 
     o Conditions of Use 
     o Contact Us 
     o Site Map

Is that list of filenames with the underscores correct?
The information infobox at the end looks good...and appears to use the filenames form filenames.php.  Whereas, the long list is not.

Do you have any advice?

I also have an infobox that is basically a ripe from "Contact Us" and it choked on it...I had to exclude it.  Even odder, I have a third infobox that is a ripe from "Contact Us" and almost identical to the one that chokes but it worked fine.  That issue is melting my brain!

Thanks in advance!
Siddall

<{POST_SNAPBACK}>

I hadn't noticed the underscores before. The names are just taken from the filename. I'll change that at some point. It doesn't affect the result with the SE's though. It is just an appearance problem.

If you post the box that is breaking it, I will look at it.

Jack

#34 tdogg

  • Community Member
  • 56 posts
  • Real Name:Siddall
  • Location:USA

Posted 08 July 2005, 02:26

Jack_mcs, on Jul 7 2005, 10:05 PM, said:

If you post the box that is breaking it, I will look at it.

Jack

<{POST_SNAPBACK}>


If I include the infobox that causes the issue, the sitemap looks like this:

* Information 
     o Shipping & Returns 
     o Privacy Notice 
     o Conditions of Use 
     o Contact Us 
     o Site Map 

* Custom 
     o CREATE YOUR OWN 
     o

The "INFORMATION" infobox looks great...but under it is the "CUSTOM" infobox. It lists the "CREATE YOUR OWN" link and then a blank link under it...just a random bullet point.

Here is the code for that infobox from ...includes/boxes/

<?php
/*
  $Id: custom.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
?>
<!-- custom //-->
          <tr>
            <td>
<?php
  $info_box_contents = array();
  $info_box_contents[] = array('text' => BOX_HEADING_CUSTOM);

  new infoBoxHeading($info_box_contents, false, false);

  $info_box_contents = array();
  $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CUSTOM) . '"><b>' . BOX_INFORMATION_CUSTOM . '</b></a><br>');
                                          //'<a href="' . tep_href_link(FILENAME_CUSTOM_RULES) . '"><right><small>' . BOX_RULES_CUSTOM . '</small></right></a>');

  new infoBox($info_box_contents);
?>
            </td>
          </tr>
<!-- custom_eof //-->

I really don't see anything shockingly different...it is basically a ripe of .../includes/boxes/information.php. Let me know what you think!!!

Regards,
Siddall

#35 Druss

  • Community Member
  • 57 posts
  • Real Name:Josh

Posted 08 July 2005, 03:29

I'm receiving this as well....

Error!

Unable to determine the page link!

Its showing up at the end of my categories list, I think the fault is in the categories box as a result of this contribution...

http://www.oscommerce.com/community/contributions,1480

On the filenames with the _ in them, anyway to fix it manually?

#36 Jack_mcs

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

Posted 08 July 2005, 11:26

tdogg, on Jul 7 2005, 10:26 PM, said:

BOX_INFORMATION_CUSTOM . '</b></a><br>');
                                         //'<a href="' . tep_href_link(FILENAME_CUSTOM_RULES) . '"><right><small>' . BOX_RULES_CUSTOM . '</small></right></a>');

 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- custom_eof //-->[/code]


Regards,
Siddall

<{POST_SNAPBACK}>

Remove the commented line
//'<a href="' . tep_href_link(FILENAME_CUSTOM_RULES) . '"><right><small>' . BOX_RULES_CUSTOM . '</small></right></a>'
The code can't handle characters before the <a as it is now. I will change it at some point but for now you can't have them there.

Jack

Edited by Jack_mcs, 08 July 2005, 11:27.


#37 Jack_mcs

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

Posted 08 July 2005, 11:30

Druss, on Jul 7 2005, 11:29 PM, said:

I'm receiving this as well....

Error!

Unable to determine the page link!

Its showing up at the end of my categories list, I think the fault is in the categories box as a result of this contribution...

http://www.oscommerce.com/community/contributions,1480

On the filenames with the _ in them, anyway to fix it manually?

<{POST_SNAPBACK}>

I am not familiar with that contribution so I can't help you with it but I think you are correct. The code for the categories section is the same as that used in SiteMap MS2 and that works for a lot of people. You'll need to compare what is different in the categories box to find where the problem lies.

Jack

#38 tdogg

  • Community Member
  • 56 posts
  • Real Name:Siddall
  • Location:USA

Posted 08 July 2005, 16:03

Jack_mcs, on Jul 8 2005, 07:26 AM, said:

Remove the commented line
//'<a href="' . tep_href_link(FILENAME_CUSTOM_RULES) . '"><right><small>' . BOX_RULES_CUSTOM . '</small></right></a>'
The code can't handle  characters before the <a as it is now. I will change it at some point but for now you can't have them there.

Jack

<{POST_SNAPBACK}>

That worked like a charm! Thanks Jack!!!

T-DOGG


#39 Top_Speed

  • Community Member
  • 357 posts
  • Real Name:KJ Miller
  • Location:SU-ville (Syracuse)

Posted 04 August 2005, 14:16

Hi Jack,

I use info_pages contrib instead of the default information box. I get an error on the box but would like to get the pages (links listed). I did read your previous posts about "//" comments and such but could not find any in the code (posted below). Also I have a bullet at the end with no link there??? is that supposed to be? LINK TO PAGE

One other note... (in right links pane) shouldn't the posted links be broken down to include the subcategories (like the left pane does with categories box)? For example the links.php shoudl display the subcategories under it??

<?php
/*
  $Id: info_pages.php,v 3.3 2004/02/12

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

    $page_query = tep_db_query("select pages_id, pages_title, pages_html_text, sort_order, status,intorext,externallink,link_target  from " . TABLE_PAGES . " where status = 1 and sort_order >0 order by sort_order, pages_title");

?>
<!-- go karts info //-->
          <tr>
            <td>
<?php
    $info_box_contents = array();
    $info_box_contents[] = array('text' => BOX_HEADING_PAGES);

    new infoBoxHeading($info_box_contents, false, false);

    $rows = 0;
    $page_list = '<table border="0" width="100%" cellspacing="0" cellpadding="1">';




    while ($page = tep_db_fetch_array($page_query)) {
      $rows++;


$target="";
if($page['link_target']== 1)  {
$target="_blank";
}



if($page['pages_title'] != 'Contact Us'){

$link = FILENAME_PAGES . '?pages_id=' . $page['pages_id'];



}else{

$link = FILENAME_CONTACT_US;
}

if($page['intorext'] == 1)  {
$page_list .= '<tr><td class="infoBoxContents"><a target="'.$target.'" href="' . $page['externallink'] . '">' . $page['pages_title'] . '</a></td></tr>';
}
else {
      $page_list .= '<tr><td class="infoBoxContents"><a target="'.$target.'" href="' . tep_href_link($link) . '">' . $page['pages_title'] . '</a></td></tr>';
}
    }



    $page_list .= '</table>';

    $info_box_contents = array();
    $info_box_contents[] = array('text' => $page_list);


    new infoBox($info_box_contents);
?>
            </td>
          </tr>
<!-- go karts info eof //-->

Any insight is much appreciated.
Thank you, KJ
define('PROJECTS', 'Something that goes on forever!');

#40 Jack_mcs

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

Posted 04 August 2005, 15:02

The current code won't be able to read your infobox. It is made to look for specific code in the infobox file. Since that code can be formatted in any number of ways, there is no easy way to parse the file to find the links. I plan on changing the contribution to provide a better parser but there's no telling when that might be.

The bullet without a link is probably because it can't deteermine the proper link from the given information. If you are getting an error at the bottom of the window, then this is the reason. Otherwise, I can't say without seeing the code.

The reason the categories section shows as sub links is because that is how they are setup in the database. For the right side links, there is no relation between the files so there is no way to say if some of them belong to the same group. It would be nice to list them like that but I don't see how it is possible.

Jack