Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags SEO


Jack_mcs

Recommended Posts

I'm sorry for being a PITA.

 

My specials page has every single word from the titles of the products on the page (and possibly in all the specials I have total). This has resulted in 4744 words and 30011 characters being shown in the meta keywords section. Any way to get it to limit the number of characters?

 

Also, is there a way to get it to strip any " from the tags? I have items which are in inches so the " is used sometimes. This of course ends the keyword list so the spider stops there, even though there are a ton of other words in the list. 

Link to comment
Share on other sites

For the specials, that has long been a problem and, to be honest, I had forgotten about it. If you look in the includes/header_tags.php file and find the specials section, you will see this line

$the_specials = substr($the_specials, 0, 30000);   //adjust as needed

It was added when the problem was discovered years ago. I think the better fix now is to delete the following:

       while ($new_values = tep_db_fetch_array($new)) {
         $the_specials .= clean_html_comments($new_values['products_name']) . ', ';
       }

       if (strlen($the_specials) > 30000)                  //arbitrary number - may vary with server setting
        $the_specials = substr($the_specials, 0, 30000);   //adjust as needed

The keywords will be empty then but they are mainly just used for highlighting now, which wouldn't happen on this page anyway.

 

For removing the quotes, find this in the includes/functions/header_tags.php file

  if (isset($sortOrder['title']))       $header_tags_array['title'] = ltrim(tep_db_prepare_input(implode(' ' . HEADER_TAGS_SEPARATOR_DESCRIPTION . ' ', $sortOrder['title'])), ' ' . HEADER_TAGS_SEPARATOR_DESCRIPTION);

and change it to

  if (isset($sortOrder['title']))       $header_tags_array['title'] = ltrim(tep_db_prepare_input(implode(' ' . HEADER_TAGS_SEPARATOR_DESCRIPTION . ' ', str_replace('"', '', $sortOrder['title']))), ' ' . HEADER_TAGS_SEPARATOR_DESCRIPTION);

Note that the str_replace function is being added. Do the same for the other lines (add the function, not replace the line) if you want to remove quotes from them too.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack,

 

Ive installed your contrib the latest version. However on the social tab the Icons don't show up in the header_tags_seo_social.php I did some checking and it seems that the GetSocialIconsArray() function is not picking up the right directory, since the array returned is empty.

I changed the DIR_WS_CATALOG_IMAGES to  DIR_WS_IMAGES because of the path is then correct. However it is still not working. Do you have a solution or a way I can check?

Link to comment
Share on other sites

You may also have to change this line in admin/includes/functions/header_tags.php

  $allicons = glob(DIR_FS_CATALOG . DIR_WS_CATALOG_IMAGES . 'socialbookmark/*.png');

The problem is that a lot of shops have incorrectly setup configure files and/or are missing the DIR_WS_CATALOG_IMAGES definition. You may want to compare yours with what's in this thread. The new version of Header Tags SEO (not yet released) has the code for this changed so it should work with any shop.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@@rory1

 

 

Hi Jack,

 

I want to ask if the latest version is compatible with bootstrap 2.3.4 or i have to use  seo header tags - reloaded ?

 

 

I had a minute to try this and the two work fine together. There are some differences in the BS code, like stylesheet.css doesn't exist and the code in some places has been altered to not be what is standard in other versions. The changes to complete the installation aren't too involved though so I may add instructions for it in the next version.   

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

A new version should be uploaded before Monday. You can't have more than one meta tag type addon installed at the same time since at least part of the changes will be for the same parts of the code. That's especially true for reloaded since it was modeled after this one.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Run it as headertags_seo_update.php?reset_options=true. It's safe to do that even though it has been ran already and it will clean up the duplicate entries.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Run it as headertags_seo_update.php?reset_options=true. It's safe to do that even though it has been ran already and it will clean up the duplicate entries.

Ok Jack, no problem already removed the bubble entries.

 

It's just for your information ;-) 

Link to comment
Share on other sites

A new version has been uploaded with these changes:

 

  • Added an option to control how the canonical tag is handled when muliple id's are in the url.
  • Added an option to allow turning off the google +1 code.
  • Added an option to control how the see more link is used on the product listing page.
  • Added code to the includes/header_tags.php file to properly handle the products_new page - found by Gary (burt).
  • Added css class to control the color of the see more link.
  • Added css class to control the text in the page top line.
  • Added css class to control the title in the tag cloud box.
  • Added css class to control the styling of the tag cloud box.
  • Added files with changes for 2.3.4 BS.
  • Added code to strip quotes from title - found by member queenzukie.
  • Added meta tags explanation to the popup instruction in Page Control.
  • Added error checking on Page Control load to check if the meta canonical tag is enabled, which it should be.
  • Changed the OG home page tag to use the canonical version of the url.
  • Changed the socialbookmarks code to include the image in the url, where applicable.
  • Changed the path code for the social images in admin to find them for non-standard configure files.
  • Changed code on shop side to strip html from the title and tags, if present.
  • Changed the product listing code so that it uses the css class correctly.
  • Changed code in popup files in Page Control to stop slashes from displaying.
  • Changed code in the column box to handle the new see more option - found by Dave (Roaddoctor).
  • Changed limits for the title and description counter to coincide with googles new limits.
  • Changed the code in the includes/header_tags.php file to prevent keywords from being populated.
  • Changed code on the products new page to handle canonical tag differently.
  • Changed the keywords section in admin to use a different pagination display.
  • Changed the keywords section in admin to allow the sorting options to work correctly.
  • Changed the keywords code on the shop side so it checks the products model and description (if set).
  • Changed the keywords code on the shop side so it filters out one character searches and html code.
  • Fixed code in the test routing that would report missing table fields under certain condition.
  • Fixed code in product_reviews_info.php (different mistakes for both versions).
  • Fixed coding and instruction mistakes - found by Dave (Roaddoctor).
  • Fixed the problem with fill tags not working on some sites with changed languages.
  • Moved some css and javascript out of the language files to make the code HTML5 compatible.
  • Removed extra code in product_info.php for sub text for 2.3 file.
  • Removed instructions for installation into shops using BTS or STS.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack,

 

Just make de update.

 

In admin/header_tags_seo_social.php the path to the icons give me no images:

 

<input type="image" id="notused" name="500px" src="HTTPS_SERVER/images/socialbookmark/500px-16x16.png" alt="500px" title="500px" onclick="javascript:return ChangeStatus('16x16', '500px')">

 

Is SERVER not CATALOG ?

 

I'm running OSC 2.3.3.1

Edited by 4vrij
Link to comment
Share on other sites

headertags_seo_tagcloud_footer.php

breaking the footer... missing a  '

              $content .= '<span class="' . $class . '"><a class="' . $class . " href="' . $hstLink . '">' . ucwords(stripslashes($kword['keyword'])) . '</a></span> ';

should be

              $content .= '<span class="' . $class . '"><a class="' . $class . '" href="' . $hstLink . '">' . ucwords(stripslashes($kword['keyword'])) . '</a></span> ';

 

-Dave

Link to comment
Share on other sites

Jack, running test, getting the mismatch error again. I think it relates to the pseudo pages being added / not counted

 

I Had 6 pseudo pages existing

Database/File Mismatch Error:  explain 
The number of file entries in the database (39) does not match the number in the includes/header_tags.php file (34). 
 Files not in the database: 

then added two pseudo pages, 8 total, now get

Database/File Mismatch Error:  explain 
The number of file entries in the database (41) does not match the number in the includes/header_tags.php file (34). 
 Files not in the database: 

"files not in the database" are not listed... perhaps because they are pseudo. information.php is probably being counted once, hence the math works.

-Dave

Link to comment
Share on other sites

@@Roaddoctor Thanks for posting the coding mistake.

 

For the test error, nothing was changed in that code to fix that problem, which I was not aware of, or didn't remember it if it has been mentioned. If you go into Page Control and select the Add Missing Pages option from the dropdown list and then run the test again, does it change the error. Also, there should be file names listed after that error in the test. Do they actually exist as oscommerce-style pages (a root file, a language file and an entry in the filenames file)?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@@Jack_mcs

The entire result is as below... no files are listed.

Database/File Mismatch Error:  explain 
The number of file entries in the database (41) does not match the number in the includes/header_tags.php file (34). 
 Files not in the database: 

everything is working fine. The pseudo pages are all information.php pages, being created like example "information.php?info_id=10"

 

I have 8 pseudo pages, they all appear in the page control dropdown just fine.

The test count mismatch is off by 7

8 pseudo pages, less the actual information.php entry in includes/header_tags.php  = 7 

 

I believe the test is simply not including pseudo pages in it's count, hence the false mismatch "error"

-Dave

Link to comment
Share on other sites

@@Roaddoctor I have a test shop setup here with three different pseudo-page type addons installed and I'm not getting that error. I've ran across a problem in a few shops I've worked on where the code for the pseudo pages in includes/header_tags.php was not added correctly. I haven't been able to reproduce that, even in those shops, so I don't have a fix. But that may be the problem you are having. Please take a look at that file and make sure all of the case statements are within the switch statement.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@@Jack_mcs

 

Doh - sorry to waste your time.... I deleted the includes/header_tags.php, uploaded the new package file and let it re-create. no more errors.

 

I noticed one difference in the re-created information.php section

 

    $page = 'information.php?info_id=';

is now

    $page = 'information.php?info_id';

 

maybe that was boogering it up. anyway - sorry about that. all is well. Much appreciated.

-Dave

Link to comment
Share on other sites

I came across a small problem with the Search Site portion of the keywords page misbehaving  - and Jack promptly offered the below solution:

 

@@Jack_mcs

The problem is in the admin/header_tags_seo_ajax.php file.

 

Find these two lines and reverse the order 

 

$assignedID = (tep_not_null($searchWords) ? GetProductID($searchWords, $keyword, $keywords['language_id']) : '');
$keyword = $keywords['keyword'];

to

$keyword = $keywords['keyword'];
$assignedID = (tep_not_null($searchWords) ? GetProductID($searchWords, $keyword, $keywords['language_id']) : '');

from package 3.3.3.1, greater than 2.3 version. I did not check if other versions effected. Thank you Jack for the great support!

-Dave

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...