Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

It appears the tags haven't been filled for the German products but that should cause this problem. The usual reason for such a problem is that the code on the page, in this case the product_info page, is missing, or has extra, html code. But since that code is shared, that can't be it. It must be something in the laguage files or html in the Header Tags information for that page. You can try swapping the english/product_info.php file with the german/product_info.php file to see if the problem moves.

 

Jack

Share this post


Link to post
Share on other sites

Ok ... that's really weird. Swapping the english product_info.php for the German one didn't help.

 

But ... I filled in the header tags for the German product_info.php, and it fixed the problem.

 

Doesn't make much sense to me why, but it did fix the problem. Someday when I have more time, I'll view the complete html source for the product_info.php with the header tags and without, and find out why the header tags fixed it. For now I'm happy to have it working.

 

Thanks!!!

Share this post


Link to post
Share on other sites

I looked through thhis thread trying to figure out how I can utilize the Pseudo pages portion of this contribution. I am a novice so I don't have the base knowledge I probably need. Even still I have gotten some pointers here and there but can not find a true "instructions on Pseudo pages" anywhere.

Can someone please post a step by step on how to implement Pseudo pages?

From what Jack told me on another thread, I am sure this would work great for me as I have several articles that I would love to get noticed.

Thanks so much for your patience! :blush:


Thanks,

Susan

 

 

Proudly uses Oscommerce!

Share this post


Link to post
Share on other sites
I looked through thhis thread trying to figure out how I can utilize the Pseudo pages portion of this contribution. I am a novice so I don't have the base knowledge I probably need. Even still I have gotten some pointers here and there but can not find a true "instructions on Pseudo pages" anywhere.

Can someone please post a step by step on how to implement Pseudo pages?

From what Jack told me on another thread, I am sure this would work great for me as I have several articles that I would love to get noticed.

Thanks so much for your patience! :blush:

First, you have to make sure that the articles.php page is listed in admin->Header Tags SEO->Page Control. If it isn't, that needs to be added.

 

Then go to some articles page on your shop. Notice the url will be something like, http://your_domain.com/article_info.php?articles_id=13. If you have a url rewriter installed, that will need to be temporairly turned off to see the true url.

 

Then go to admin->Header Tags SEO->Page Control. In the lower right colum there is a box to add pseudo pages. Per the instructions in that box, you would enter article_info.php?articles_id=13, which is the last part of the above url.

 

After you click update, the pseudo page you entered will be listed in the dropdown in the center column. Select it, make some change to the title and update.

 

Go to that page on the site and it should have the new title.

 

Jack

Share this post


Link to post
Share on other sites
Hi Jack,

 

I'm try to use the "Add a Pseudo Page" function, but i cant get it to work with information pages.

 

I did the add missing page and information.php is there

 

I then did add information.php?info_id=6 in the pseudo box and hit update.

 

There arent any errors, and the page refreshes but isnt appearing in the select a file option.

 

Checked the database and cant see it anywhere in there either

 

I also use SEO urls and have rewriting enabled, the url that shows in browser is about-us-i-6.html

 

I am using HeaderTags_SEO_V_3.1.0 and every thing else is workign perfectly.

 

Have I done something wrong, or can you point me in right direction

 

Thanks

 

Dean

For anyone having this problem, I just installed the latest InfoPages into a shop with Header Tags SEO installed and it works correctly.

 

Jack

Share this post


Link to post
Share on other sites
No, it doesn't matter but the code shouldn't be causing that, at least in my installations it doesn't. Perhaps you entered spaces when you added the keywords?

 

Jack

 

The code was simple I should have checked html_output. It was the two references of title. I think this is stock oscommerce and I just did not realize it. For some reason an html validation saw spaces in the title of images as errors, although now it does not.

Share this post


Link to post
Share on other sites

Jack,

 

I have an unusual heather tags seo contribution question.

 

I have multiple domains on the same webserver running the same oscommerce shop.

 

Because it is running on the same server, I choose to share the same admin and I've created symbolic links to the images directory.

 

All sites are basically identical with the exception of a different header and stylesheet to create a different "feel".

 

I would like to optimize all websites with different header tags. Is this even possible. ???

 

I've looked at this contribution http://www.oscommerce.com/community/contributions,1534 but seem to be unable to get it to work properly.

 

Any pointers (if any) would be greatly appreciated.

Share this post


Link to post
Share on other sites
Jack,

 

I have an unusual heather tags seo contribution question.

 

I have multiple domains on the same webserver running the same oscommerce shop.

 

Because it is running on the same server, I choose to share the same admin and I've created symbolic links to the images directory.

 

All sites are basically identical with the exception of a different header and stylesheet to create a different "feel".

 

I would like to optimize all websites with different header tags. Is this even possible. ???

 

I've looked at this contribution http://www.oscommerce.com/community/contributions,1534 but seem to be unable to get it to work properly.

 

Any pointers (if any) would be greatly appreciated.

The title and meta tag information is stored in the database and the code only allows for one entry of them so, as the code is now, it is not possible. You might be able to get it to work by creating a second copy of the Header Tags tables and then adding code in the admin and shop to cause it to use one set or the other. I think that would work but it wouldn't be a quick change. If you weren't going to change them much, then you could go to admin and setup the tables for Shop A. Then copy those tables in the database so they are no longer reachable from admin. Go into admin and setup the tables again for Shop B. At this point, Shop B will work as usual. Then go into the includes/header_tags.php and includes/functions/header_tags.php files for Shop A and change the reference to the Header Tags tables to the second set you created. That should make Shop A work correctly. The problem is that if you add more products or need to edit the existing titles and meta tags, there wouldn't be an easy way to do it.

 

Jack

Share this post


Link to post
Share on other sites
The title and meta tag information is stored in the database and the code only allows for one entry of them so, as the code is now, it is not possible. You might be able to get it to work by creating a second copy of the Header Tags tables and then adding code in the admin and shop to cause it to use one set or the other. I think that would work but it wouldn't be a quick change. If you weren't going to change them much, then you could go to admin and setup the tables for Shop A. Then copy those tables in the database so they are no longer reachable from admin. Go into admin and setup the tables again for Shop B. At this point, Shop B will work as usual. Then go into the includes/header_tags.php and includes/functions/header_tags.php files for Shop A and change the reference to the Header Tags tables to the second set you created. That should make Shop A work correctly. The problem is that if you add more products or need to edit the existing titles and meta tags, there wouldn't be an easy way to do it.

 

Jack

Jack,

 

It worked like a charm. Optimized 5 websites in less than an hour. Thank you.

This is what I did for each shop:

CREATE TABLE headertags_mystorereference SELECT * FROM headertags

CREATE TABLE headertags_default_mystorereference SELECT * FROM headertags_default

 

Made the necessary changes directly in the newly created tables.

 

Referenced /includes/headertags.php an includes/functions/headertags.php to the appropriate "newly created tables" for each shop.

 

Thanks Jack. Happy New Year.

Share this post


Link to post
Share on other sites

After the installaton of SEO header tags, I ran the test - ok and the fill all tags. Then checked work at browser and admin -> products.

 

This is the results:

 

view source at browser displays it this way:

--------------------------------------------------------

 

<meta name="Description" content="products new description - Mighty symbols of freedom adorn these highly detailed, alabastrite bookends. <---

(WHY ALL THIS FREE SPACE? --->

Dimensions:   Each piece is 4-7/8 in x 4-1/8 in 5-7/8 in high." />

 

And in admin -> product description box under meta tag information, it looks like this:

--------------------------------------------------------------------------

 

Mighty symbols of freedom adorn these highly detailed, alabastrite bookends.

 

Dimensions:   Each piece is 4-7/8 in x 4-1/8 in 5-7/8 in high.

 

 

When entering text for this product, I do like this:

--------------------------------------------------------------

 

Mighty symbols of freedom adorn these highly detailed, alabastrite bookends.<br><hr><br> Dimensions:   Each piece is 4-7/8 in x 4-1/8 in 5-7/8 in high.

 

 

 

http://brs-giftshop.com/american-eagle-bookends-p-240.htmllick here to see what I am trying to create.

 

I did read I can use HTML to do this. So is this so or not? Just am trying to dress up product decriptions a bit.

 

thanks.

 

blr044

Share this post


Link to post
Share on other sites

You shouldn't use formatting code in your titles and meta tags. They are only for the search engines and the extra code will just be striped out in most cases.

 

Jack

Share this post


Link to post
Share on other sites

First great work from the author - thank you

 

There is an issue with the include/header_tags.php

 

If you have two pages like

 

index.php and newsdesk_index.php

 

header tags will shown up for both sides - in this case for newsdesk_index.php - the same.

 

Reason is, that strstr compares first php_self with the default title (index.php) and becomes true because

it find it in newsdesk_index.php.

 

i would prefer also some additional snippets in header_tags.php includes and functions

for example if i am in a category then i would like to have the parent and childs from this category also listed

in the title tag - but only there.

 

br Frank

Share this post


Link to post
Share on other sites

Yes, you are correct. I had the code in at one time to check for the actual name but removed it for some reason. I'll have to go over my notes and see why I did that. In the meastime, you make the following change, it should work.

In includes/header_tags.php, replace

case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT)):

with

case (basename($_SERVER['PHP_SELF']) == FILENAME_DEFAULT):

All of the entries should really be changed but this one will get around the immediate problem.

 

Jack

Share this post


Link to post
Share on other sites

Hi,

 

I know im an idiot and a dummy and don't really understand what is going on but i tried to use this contrib. I installed it and set up the tags and everything looks fine. When i bring up my website pages i can see the tags in the browswer no problem.

But when i try to create a google sitemap it generates just 2 url and they are both for the main url page! This can't be right can it?

 

I can't find my website at all whenever i try to look for it in google even though i have submitted it. What am i missing something blatently obvious to the educated i guess?

 

Many thanks, Keith

Share this post


Link to post
Share on other sites

This contribution doesn't have anything to do with the google sitemap. You will need to post your question in that support thread.

 

Jack

Share this post


Link to post
Share on other sites
Yes, you are correct. I had the code in at one time to check for the actual name but removed it for some reason. I'll have to go over my notes and see why I did that. In the meastime, you make the following change, it should work.

In includes/header_tags.php, replace

case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT)):

with

case (basename($_SERVER['PHP_SELF']) == FILENAME_DEFAULT):

All of the entries should really be changed but this one will get around the immediate problem.

 

Jack

 

Another solution - which i prefer at the moment is, to move the sensitive cases (like ..._index.php) above the case for filename_default.

Frank

Share this post


Link to post
Share on other sites

Okay hope I can get this ressolved, thought I had once, but it wasnt to be.

 

Okay we have the sts and the header tags installed.

 

The header tags works fine if the STS is switched off.

 

When the sts is switched on I have:-

 

1. No tags except normal title tag in index.php

2. On selecting a product get the following error

 

Fatal error: Cannot redeclare tep_header_tag_page() (previously declared in /home/simplydr/public_html/shop2/includes/functions/header_tags.php:15) in /home/simplydr/public_html/shop2/includes/functions/header_tags.php on line 50

 

3. where I do not have an sts_template, ie. product reviews, the values work fine

 

I am guesing I have :-

 

1. Missed something out for the index.php in sts for the header tags to work as they do on a non sts index.php page

2. I have some duplication somewhere?

 

I am re looking through the forum as I say to see if I can refind what I looked at last night to see if that ressolves the issue again as I thought it did but canbt be 100% certain.

 

Any help or guidance in the meantime would be much appreciated.

 

 

Thanks

Johnny


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

1. includes/modules/sts_inc/general.php

 

$sts->template['headertags']= "<title>" . TITLE ."</title>";

 

2. includes/classes/sts.php

 

$this->template['headcontent'] = $this->template['headcontent'].$this->template['headertags']. "\n";;

 

THE BUG: you can change tags of any page except the index.php because it takes only default TITLE.

 

QUESTION:

 

how to add :

 

require(DIR_WS_INCLUDES . 'header_tags.php');
$preventDuplicates->checkTarget(ob_get_clean());
echo $preventDuplicates->finalMeta . "\n";

 

to the header of index.php STS template? or what to do to let it work normally on all pages?

Share this post


Link to post
Share on other sites
Okay hope I can get this ressolved, thought I had once, but it wasnt to be.

 

Okay we have the sts and the header tags installed.

 

The header tags works fine if the STS is switched off.

 

When the sts is switched on I have:-

 

1. No tags except normal title tag in index.php

2. On selecting a product get the following error

 

Fatal error: Cannot redeclare tep_header_tag_page() (previously declared in /home/simplydr/public_html/shop2/includes/functions/header_tags.php:15) in /home/simplydr/public_html/shop2/includes/functions/header_tags.php on line 50

 

3. where I do not have an sts_template, ie. product reviews, the values work fine

 

I am guesing I have :-

 

1. Missed something out for the index.php in sts for the header tags to work as they do on a non sts index.php page

2. I have some duplication somewhere?

 

I am re looking through the forum as I say to see if I can refind what I looked at last night to see if that ressolves the issue again as I thought it did but canbt be 100% certain.

 

Any help or guidance in the meantime would be much appreciated.

 

 

Thanks

Johnny

 

Issue ressolved, had placed this:-

 

<?php
/*** Begin Header Tags SEO ***/
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
 <title><?php echo TITLE; ?></title>
<?php
}
/*** End Header Tags SEO ***/
?>

 

in index.php and product_info.php when there was no need to, was having other issues, anyway all working for now so thanks for the great mod, maybe I need more fool proof instructions, not that I am a fool....lol


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

now I am understanding the problem a little more:-

 

I have the header tags working in sts templates but not the standard template now:-

 

So I need a switch, to say if sts is on switch this code off in catalog index.php and in product_info

<?php

/*** Begin Header Tags SEO ***/

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

<title><?php echo TITLE; ?></title>

<?php

}

/*** End Header Tags SEO ***/

?>

 

how would you do that?


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

start again tomorrow when running test now getting databse file mismatch error.

 

god only knows what I am doing with this.


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

hi,

thanks for your contribution.

 

I installed and tested.

When testing with "fill tags",

with all check marks are clicked for categories, manufacturers, products and Generic override checked,

with Fill products meta description with Products Description? checked,

with fill tags area with "Fill only empty tags" radios check all.

 

I got the following error :

 

1054 - Unknown column 'manufacturers_htc_title_tag' in 'field list'

update products_description set manufacturers_htc_title_tag="Jones New York is a great product", manufacturers_htc_desc_tag="We sell Jones New York in an quantity", manufacturers_htc_keywords_tag="Jones New York, Jones New York computer, Jones New York dresses", manufacturers_htc_description="JONES NEW YORK is one of our best categories. There are many types of Jones New York\\\'s in the Jones New York category. " where products_id = '369' and language_id='1'

[TEP STOP]

 

 

looks like $set variable value in the code is being carried over from manufacturers to products.(header_tags_fill_tags.php)

one thing I tried was to add one more line at line # 235

 

          if ($updateDB)
         {
           /************************ FILL THE DESCRIPTION **********************/
           if ($productsMetaDesc == 'fillMetaDesc_yes')          //fill the description with all or part of the 
           {                                                     //product description
             if (! empty($products_tags['products_description']))
             {
               if (isset($productsMetaDescLength) && (int)$productsMetaDescLength > 3 && (int)$productsMetaDescLength < strlen($products_tags['products_description']))
                 $desc = substr($products_tags['products_description'], 0, (int)$productsMetaDescLength);
               else                                              //length not entered or too small    
                 $desc = $products_tags['products_description']; //so use the whole description
             }   
             else
               $desc = $products_tags['products_name'];  

[color="#FF0000"]//	      $set = ' set '; // this line added to debug error  ************** this is line 235[/color]
           }  
           else if (isset($_POST['generic_enabled']) && $_POST['generic_enabled'] == 'on')
           {

 

 

can someone guide me to the permanent solution ?

 

thanks

 

genesis

Share this post


Link to post
Share on other sites
I got the following error :

 

1054 - Unknown column 'manufacturers_htc_title_tag' in 'field list'

It means that column in the database is missing. If you used the current database file to make the database changes, I can't even guess why that would be missing. You can try using the uninstall and install scripts to see if that will fix it.

 

Jack

Share this post


Link to post
Share on other sites

thanks for the reply.

 

if you look at the error code carefully, this 'manufacturers_htc_title_tag' is being called in products_description update query.

 

1054 - Unknown column 'manufacturers_htc_title_tag' in 'field list'
update products_description set manufacturers_htc_title_tag="Jones New York is a great product", manufacturers_htc_desc_tag="We sell Jones New York in an quantity", manufacturers_htc_keywords_tag="Jones New York, Jones New York computer, Jones New York dresses", manufacturers_htc_description="JONES NEW YORK is one of our best categories. There are many types of Jones New York\\\'s in the Jones New York category. " where products_id = '369' and language_id='1'[TEP STOP]

 

by seeing all other update situation is working fine, i think my db tables are ok...

 

Please help here.

 

thanks.

 

genesis

Share this post


Link to post
Share on other sites

I search the fill tags file and can't find that. Please let me know the line number it is on.

 

Jack

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

×