Jump to content



Photo
* * * * * 2 votes

Sitemap SEO


  • Please log in to reply
825 replies to this topic

#1   Jack_mcs

Jack_mcs
  • Members
  • 26,623 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 01 January 2009 - 03:41

This contribution fixes many of the deficiencies of the other sitemap contributions. It has been tested in MS2 and RC2 shops but should run in any variation of oscommerce. All settings are controlled via admin. It has the following following features.

- Displays all pages and boxes - no missing links or text
- Displays categories, with or without products
- Displays manufacturers, with or without products
- Links can be sorted
- Links can be excluded
- Links can be set to show for registered customers only
- Sections of links can be sorted
- Sections of links can be excluded
- Sections of links can be set to show for registered customers only
- All links have configurable anchor text
- All links have configurable alternate display names
- All sections of links can be placed anywhere on the sitemap page via admin
- Supports
Articles Manager
Infopages
Page Manager

Jack

Edited by Jack_mcs, 01 January 2009 - 03:43.


#2   Coopco

Coopco
  • Members
  • 9,557 posts
  • Real Name:Leslie Cooper
  • Gender:Male
  • Location:Sea Lake, Victoria, Australia

Posted 01 January 2009 - 06:16

Hi Jack

Just trying this on my test server in wamp. I noticed that in the admin and catalog that the files in classes did not have the opening

<?php

it just had

<?

which is not a problem unless you have php5.

Once installed, in admin ---> sitemap seo ---> box control

I get

Select a Box

Note: This is a multi-select list so more than one item can be selected at once.
Fatal error: Cannot use string offset as an array in E:\wamp\www\coopco.asrock\admin\includes\functions\sitemap.php on line 410

which has

if ($selected_vals[$j]['id'] == $values[$i]['id'])


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.

#3   Jack_mcs

Jack_mcs
  • Members
  • 26,623 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 01 January 2009 - 12:53

Yes, you are correct about the <? in the category_tree files. Those were copied from earlier releases and I didn't notice they used that code. Thanks for pointing it out. Also, there aren't any class files used in admin so that can be deleted from there.

As for the multi-select, at line 406 in the admin/includes/functions/sitemap.php file, change
else
to
else if (tep_not_null($selected_vals))
. I think that will fix it but if not, please let me know and I will install it into a php 5 shop.

Jack

#4   Coopco

Coopco
  • Members
  • 9,557 posts
  • Real Name:Leslie Cooper
  • Gender:Male
  • Location:Sea Lake, Victoria, Australia

Posted 01 January 2009 - 13:25

Yes, you are correct about the <? in the category_tree files. Those were copied from earlier releases and I didn't notice they used that code. Thanks for pointing it out. Also, there aren't any class files used in admin so that can be deleted from there.

As for the multi-select, at line 406 in the admin/includes/functions/sitemap.php file, change

else
to
else if (tep_not_null($selected_vals))
. I think that will fix it but if not, please let me know and I will install it into a php 5 shop.

Jack

Hi Jack

Thank you for your quick response and remedy. The new code fixed it and the Boxes Group Control page now displays correctly and error free.

Will install in live site tomorrow.

BTW, the contribution is fantastic and the display of the site map is even better.


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.

#5   Jack_mcs

Jack_mcs
  • Members
  • 26,623 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 01 January 2009 - 13:39

Thanks. I appreciate the feedback. /smile.gif' class='bbc_emoticon' alt=':)' />

Jack

#6   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 01 January 2009 - 17:14

Jack,

This is awesome and a must! I will be installing this right-away! /rolleyes.gif' class='bbc_emoticon' alt=':rolleyes:' />

Thanks for the add-on.
Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#7   Jack_mcs

Jack_mcs
  • Members
  • 26,623 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 01 January 2009 - 18:50

Thanks. I'm pleased with how it turned out. Although I didn't think to test it in STS. I'll keep my fingers crossed. /smile.gif' class='bbc_emoticon' alt=':)' />

Jack

#8   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 01 January 2009 - 19:21

Thanks. I'm pleased with how it turned out. Although I didn't think to test it in STS. I'll keep my fingers crossed. /smile.gif' class='bbc_emoticon' alt=':)' />

Jack


No problems so far regarding STS.
STS users can also template the sitemap page by creating a template called sitemap.php.html.

One issue that I am working out has to do with the Page Editor contribution (http://www.oscommerc...tributions,2841). Minor issues that have to do with that contribution and not Sitemap Seo. Page Editor creates links very similar to Page Manager but uses the pages_id instead of the pages_title.

Edited by bkellum, 01 January 2009 - 19:27.

Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#9   Coopco

Coopco
  • Members
  • 9,557 posts
  • Real Name:Leslie Cooper
  • Gender:Male
  • Location:Sea Lake, Victoria, Australia

Posted 02 January 2009 - 07:56

Thanks. I appreciate the feedback. /smile.gif' class='bbc_emoticon' alt=':)' />

Jack

Hi Jack

I wonder if it is possible for the field for alt text and anchor text could remain updated. If I make one change, then update, make another change, then update, I lose the previous change.


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.

#10   14steve14

14steve14
  • Members
  • 3,537 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 02 January 2009 - 11:50

Jack

Installed this today, and apart from the error mentioned at the top of this page it all works fine. It looks good, but will have to take time out and find out what everything does.

Great contribution.
REMEMBER BACKUP, BACKUP AND BACKUP

Don't take life too seriously. no one gets out alive anyway

#11   Jack_mcs

Jack_mcs
  • Members
  • 26,623 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 02 January 2009 - 12:34

Hi Jack

I wonder if it is possible for the field for alt text and anchor text could remain updated. If I make one change, then update, make another change, then update, I lose the previous change.

Wow, don't know how I missed that. I know I tested it at one point. Anyway, in admin/sietmap_seo_page_control.php, find this code at line 205
<td><input type="checkbox" name="<?php echo 'exclude_page_' . $id . '_' . $p; ?>" id="<?php echo 'exclude_page_' . $id . '_' . $p; ?>" <?php echo $pageSettings[$p]['excluded']; ?> maxlength="2" size="3"></td>
				<td width="22%"><?php echo $pagesArray[$id][$p]['filename']; ?></td>
				<td width="22%"><nobr><?php echo $pagesArray[$id][$p]['display_name']; ?></nobr></td>
				<td width="22%"><input type="text" name="<?php echo 'alternate_name_' . $id . '_' . $p; ?>" maxlength="255" size="24"></td>
				<td width="22%"><input type="text" name="<?php echo 'anchor_text_' . $id . '_' . $p; ?>" maxlength="255" size="24"></td>
				<td><input type="text" name="<?php echo 'sort_order_' . $id . '_' . $p; ?>" maxlength="2" size="3"></td>
and change it to
<td><input type="checkbox" name="<?php echo 'exclude_page_' . $id . '_' . $p; ?>" <?php echo $pageSettings[$p]['excluded']; ?> id="<?php echo 'exclude_page_' . $id . '_' . $p; ?>" <?php echo $pageSettings[$p]['excluded']; ?> maxlength="2" size="3"></td>
				<td width="22%"><?php echo $pagesArray[$id][$p]['filename']; ?></td>
				<td width="22%"><nobr><?php echo $pagesArray[$id][$p]['display_name']; ?></nobr></td>
				<td width="22%"><input type="text" name="<?php echo 'alternate_name_' . $id . '_' . $p; ?>" value="<?php echo $pageSettings[$p]['alternate_page_name']; ?>" maxlength="255" size="24"></td>
				<td width="22%"><input type="text" name="<?php echo 'anchor_text_' . $id . '_' . $p; ?>" value="<?php echo $pageSettings[$p]['anchor_text']; ?>" maxlength="255" size="24"></td>
				<td><input type="text" name="<?php echo 'sort_order_' . $id . '_' . $p; ?>" value="<?php echo $pageSettings[$p]['sortorder']; ?>" maxlength="2" size="3"></td>

Jack

#12   Coopco

Coopco
  • Members
  • 9,557 posts
  • Real Name:Leslie Cooper
  • Gender:Male
  • Location:Sea Lake, Victoria, Australia

Posted 02 January 2009 - 13:56

Wow, don't know how I missed that. I know I tested it at one point. Anyway, in admin/sietmap_seo_page_control.php, find this code at line 205

<td><input type="checkbox" name="<?php echo 'exclude_page_' . $id . '_' . $p; ?>" id="<?php echo 'exclude_page_' . $id . '_' . $p; ?>" <?php echo $pageSettings[$p]['excluded']; ?> maxlength="2" size="3"></td>
				<td width="22%"><?php echo $pagesArray[$id][$p]['filename']; ?></td>
				<td width="22%"><nobr><?php echo $pagesArray[$id][$p]['display_name']; ?></nobr></td>
				<td width="22%"><input type="text" name="<?php echo 'alternate_name_' . $id . '_' . $p; ?>" maxlength="255" size="24"></td>
				<td width="22%"><input type="text" name="<?php echo 'anchor_text_' . $id . '_' . $p; ?>" maxlength="255" size="24"></td>
				<td><input type="text" name="<?php echo 'sort_order_' . $id . '_' . $p; ?>" maxlength="2" size="3"></td>
and change it to
<td><input type="checkbox" name="<?php echo 'exclude_page_' . $id . '_' . $p; ?>" <?php echo $pageSettings[$p]['excluded']; ?> id="<?php echo 'exclude_page_' . $id . '_' . $p; ?>" <?php echo $pageSettings[$p]['excluded']; ?> maxlength="2" size="3"></td>
				<td width="22%"><?php echo $pagesArray[$id][$p]['filename']; ?></td>
				<td width="22%"><nobr><?php echo $pagesArray[$id][$p]['display_name']; ?></nobr></td>
				<td width="22%"><input type="text" name="<?php echo 'alternate_name_' . $id . '_' . $p; ?>" value="<?php echo $pageSettings[$p]['alternate_page_name']; ?>" maxlength="255" size="24"></td>
				<td width="22%"><input type="text" name="<?php echo 'anchor_text_' . $id . '_' . $p; ?>" value="<?php echo $pageSettings[$p]['anchor_text']; ?>" maxlength="255" size="24"></td>
				<td><input type="text" name="<?php echo 'sort_order_' . $id . '_' . $p; ?>" value="<?php echo $pageSettings[$p]['sortorder']; ?>" maxlength="2" size="3"></td>

Jack

Thanks once again Jack for the quick reply and remedy, the new code did the trick. Further testing tomorrow.


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.

#13   princebaskar

princebaskar
  • Members
  • 5 posts
  • Real Name:Fabian Rousselot

Posted 02 January 2009 - 16:10

Hi Jack:
This is a wonderfull contribution.
I've it installed and seems to work fine with the corrections made in the code for the previous feedbacks.
However I say "seems" because I'm a newbie and do not know if the categories box can be controlled in the Sitemap SEO admin panel or If i made a mistake in the configuration or installation that do not let me select in the "Boxes Group Control" any other box than the defined in "information.php".
What may be wrong?

#14   Jack_mcs

Jack_mcs
  • Members
  • 26,623 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 02 January 2009 - 16:18

Boxes that don't have hardcoded links won't show up in admin, at least not correctly. The only way to do that would be to use the code from the categoris box and create and save the links that code creates. The problem with that is that there are many category boxes available so for each one, another set of code would have to be copied and changed. It is just too much to try to code for.

Jack

#15   e-peoples

e-peoples
  • Members
  • 21 posts
  • Real Name:Michael Wieden

Posted 02 January 2009 - 17:39

Hey Jack,

first ... thanx for this contrib! It now works in an STS (not being used as a shop, but as a CMS). I have 2 problems by using SEO Sitmap. MySQL5, and PHP5.

1.) First I had the same problem as Coopco. After making your fix, the listing of the first 36 pages went well, even when updated. But the rest still doesn't keep the updates. (Screenshot attached)
2.) No articles are shown ... I checked the install.txt several times, but cann't find a mistake made by me! (so it doesn't mean, I made none!)

Thany again!! /rolleyes.gif' class='bbc_emoticon' alt=':rolleyes:' />

Michael
[img]http://www.kultur-wirtschaft.eu/web2008/catalog/SEO-Sitemap.gif[/img]

#16   jsi

jsi
  • Members
  • 122 posts
  • Real Name:JC
  • Gender:Male
  • Location:California

Posted 02 January 2009 - 21:13

Hey Jack,

Great contribution!!!

2 little things . . .

1. When I go to Configuration>SiteMap SEO
I notice you can change the heading text. However it does not support other languages. Is there a fix so it can support more languages? I need to add spanish.

2. Is there a way to add a button to generate a sitemap XML file? sitemap.xml
However, it would be best to not auto send to google. I do advanced SEO manually and its best if I send to google myself after I play with the file. You may want to add a second button to create and send to google for other people if you want but I think its best to keep them separate. Just a generate sitemap.xml file is good enough for me.
What do you think?

Thanx Jack and great work!


P.S.
My site is english/spanish.
I'll give you the spanish translations to this if you want them for others to use. I already translated them. Let me know if you would like this.
mmmmmmmmmmmm. Doughnuts . . . haha. i said nuts.

#17   tudoroiuj

tudoroiuj
  • Members
  • 9 posts
  • Real Name:Tudoroiuj

Posted 03 January 2009 - 00:31

hei
great add on

i have a problem on:
admin/sitemap_seo_box_control.php

the error messsage is :
Select a Box

Note: This is a multi-select list so more than one item can be selected at once.
Fatal error: Cannot use string offset as an array in /admin/includes/functions/sitemap.php on line 410

Thank you!

Edited by tudoroiuj, 03 January 2009 - 00:32.


#18   jsi

jsi
  • Members
  • 122 posts
  • Real Name:JC
  • Gender:Male
  • Location:California

Posted 03 January 2009 - 00:39

hei
great add on

i have a problem on:
admin/sitemap_seo_box_control.php

the error messsage is :
Select a Box

Note: This is a multi-select list so more than one item can be selected at once.
Fatal error: Cannot use string offset as an array in /admin/includes/functions/sitemap.php on line 410

Thank you!



Post #3 answered this problem:

As for the multi-select, at line 406 in the admin/includes/functions/sitemap.php file, change
else

to this:

else if (tep_not_null($selected_vals))

mmmmmmmmmmmm. Doughnuts . . . haha. i said nuts.

#19   Jack_mcs

Jack_mcs
  • Members
  • 26,623 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 03 January 2009 - 01:02

A new version has been uploaded. It fixes most of the problems found so far. It may not be necessary but I suggest running the uninstall and install files to reset the pages table (or just empty that one in phpmyadmin). The problem with all of the pages not being counted could have resulted in extra pages being added to that table. It would depend on the setup of the shop so I can't say for sure but it is probably best to clear it.

Jack

#20   Jack_mcs

Jack_mcs
  • Members
  • 26,623 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 03 January 2009 - 01:05

1.) First I had the same problem as Coopco. After making your fix, the listing of the first 36 pages went well, even when updated. But the rest still doesn't keep the updates. (Screenshot attached)
2.) No articles are shown ... I checked the install.txt several times, but cann't find a mistake made by me! (so it doesn't mean, I made none!)

1 - I just uploaded a new version that will fix this problem.

2 - Is Articles Manager enabled in the admin->configuration settings? Does the articles box show up in the Boxes Group Control section? Is it not marked as excluded or registered only?

Jack