Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

Hmmm, I checked and I have the files in filenames.php and in the english folder. 

 

I have this at the top of the page:

<?php
	/*
  $Id: artist.php,v 1.22 2003/06/05 23:26:22 hpdl Exp $
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com
  Copyright (c) 2003 osCommerce
  Released under the GNU General Public License
*/
	require('includes/application_top.php');
	require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ARTIST);
	$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ARTIST));
	?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php  echo HTML_PARAMS; ?>>

Did I miss something in the installation? 

 

includes/header_tags.php has this in it, so it's working somewhere, just not on that page. 

// artist.php
  case (basename($_SERVER['SCRIPT_FILENAME']) === FILENAME_ARTIST):
    if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['SCRIPT_FILENAME']), '')) {
      $header_tags_array = tep_header_tag_page(FILENAME_ARTIST);
      WriteCacheHeaderTags($header_tags_array, basename($_SERVER['SCRIPT_FILENAME']), '');
    }
  break;

Edited by queenzukie

Share this post


Link to post
Share on other sites

ok, I figured it out. I had to have the Product (10) and Root (1)  at the bottom of the page control page checked. If I leave them all blank it doesn't work.

 

Working now. 

Edited by queenzukie

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
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.   

Share this post


Link to post
Share on other sites

@@Jack_mcs Thank you for your answer i will wait for the next version.  for now i have the header tags reloaded..i will have to unistall it? maybe a conflict?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi Jack,

 

Don't know if it's a new bug for you?

 

When I run headertags_seo_update.php  it makes dubble items in the config pages.

 

Regards,

Ivo

Share this post


Link to post
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.

Share this post


Link to post
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 ;-) 

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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)?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

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

×