Jump to content



* * * * * 14 votes

Header Tags SEO


  • Please log in to reply
7500 replies to this topic

#1   Jack_mcs

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

Posted 04 April 2008 - 02:14 AM

This is the support thread for the new Header Tags SEO contribution. It is based on the Header Tags Controller but is not compatible.

Why the new name?
There are a couple of reasons for this. First, so much has changed in the code that it is mostly a different package and maintaining it would be difficult if it were considered just an update. But beyond that, a lot of people mistakenly confuse the Header Tags Controller as just a meta tags handler. It is that but has gone beyond that basic function for some time now. So to compare it to the other meta tags contributions is just wrong. And I should say here that if all you are looking for is a way to handle the meta tags of your shop, you should not install this contribution since it is definitely overkill. But when you consider that the keywords meta tag is rarely used by google at all nowadays, I can't imagine why someone would want to install a package that relied on that tag so much. And that is the real reason for the new name. This contribution is the only one of its kind to tie together so many Search Engine Optimization (SEO) tricks, that the new namejust made sense.

What's the difference?
The following are the major changes (or the ones I could remember) in this new
contribution:

-> The code is 100% langage compliant.
-> Removed the english/header_tags.php file in favor of database entries.
-> Fixed a bug introduced in a previous version. A spelling mistake would make Page Control fail in some cases. I only mention this here because it was a nasty little bug I could never locate. So anyone having that problem should consider upgrading.
-> Added control options to admin->Configuration.
-> Added additional meta tag options. It is doubtful these will be used that much but a number of requests were received for this option so it was added.
-> Added an option to view the title and meta tags on the actual web page from admin.
-> Added Social Bookmark code.
-> Added code to apply mouseover text to the sites logo - unique for each page.
-> Added code to have the breadcrumb use the header tags titles.
-> Added an exclude list in admin/includes/functions/header_tags.php that prevents header tags code from being added to certain files (like checkout pages). This is because those pages don't need tags and excluding them will simplify matters.
-> Added option to Page Control and Fill Tags so that the keywords can be dynamically generated from the pages on the site. Currently, the code only supports single keywords but I plan on changing that. There is an option in admin to only pick keywords that fall within the keyword density settings.
-> Added an automatic page add feature. You still have to edit the actual file in the root but that's all.
-> Added easy install instruction for STS shops. There is just one change to make and the two contribution work together.
-> Added code to have the new features work with BTS based shops. There may be a few cases where an option doesn't work due to how BTS handles the files, but they should be minimal and not anything to cause a great stir.
-> Changed how title, description and keywords are built. This should provide more flexibility for those that want that option. Each item has a sort order and is displayed in the string of text based on that sort order. So, for example, the title of a page can contain some entered text, the default title and the category and manufacturers names (if applicable), in any order.
-> Added an Un-Install file to completely remove Header Tags from the database. This should make testing and troubleshooting easier.
-> Added code to use curl instead of standard php file calls. The code will try curl first and then switch to a file command if it is not present.
-> Tested in MS2, RC2, STS and BTS shops.


Special thanks to the following for their suggestions:

bkellum
java roasters
surfalot

A lot of time went into creating this contribuiton. I hope it proves useful.

Jack

Edited by Jack_mcs, 04 April 2008 - 02:21 AM.


#2   adam777

adam777
  • Members
  • 101 posts
  • Real Name:Adam
  • Gender:Male
  • Location:Sydney

Posted 04 April 2008 - 03:15 AM

Thankyou Jack!

#3   bkellum

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

Posted 04 April 2008 - 03:36 AM

I'm looking forward to playing with this. Thanks for all of the energy you put into it. :thumbsup:
Bill Kellum

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

#4   paulchen2005

paulchen2005
  • Members
  • 146 posts
  • Real Name:Paul

Posted 04 April 2008 - 06:44 AM

thank you

i have install your contrib Header Tags Controller V2.6.3 Complete ... must i deinstall it to install this contrib ?

best regards

Edited by paulchen2005, 04 April 2008 - 06:45 AM.


#5   Jack_mcs

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

Posted 04 April 2008 - 02:37 PM

Adam & Bill - thanks.

Paul - there is an update file with instructions on how to convert your version to this one. There weren't any changes to the admin/categories.php file, which is the most difficult part of the installation, but there are still quite a few changes. Just be sure to backup your database before trying the conversion.

Jack

#6   WebSource 5

WebSource 5

    ıllıllı < /> ıllıllı

  • Members
  • 664 posts
  • Real Name:G.L.Walker
  • Gender:Male
  • Location:Republic of Texas

Posted 04 April 2008 - 06:06 PM

As always, Great work Jack.
I installed this from the update file last night, everything went smooth. This thing is awesome!
However, you did leave out a few things in the upgrade instructions --- uploading the social bookmark module and overwriting the includes/headertags.php and includes/functions headertags.php
Nothing anyone thats already installed the previous version cant figure out.
Thanks

#7   WebSource 5

WebSource 5

    ıllıllı < /> ıllıllı

  • Members
  • 664 posts
  • Real Name:G.L.Walker
  • Gender:Male
  • Location:Republic of Texas

Posted 04 April 2008 - 08:50 PM

Wnated to confirm this block of code:
In catalog/includes/header_tags.php
Lines 65 & 66 read:
case (basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_INFO):  $filename = FILENAME_PRODUCT_REVIEWS; break; 
	 case (basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_PRODUCT_WRITE;   break;

Is that correct? Or should it be:
case (basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_INFO):  $filename = FILENAME_PRODUCT_REVIEWS_INFO; break; 
	 case (basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_PRODUCT_REVIEWS_WRITE;   break;


#8   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 04 April 2008 - 09:03 PM

I'm gonna add an upgrade with an extremely useless addition that will be irrelevant to all but those who live in a tiny village in the most northern reaches of Lapland muahahaha! (sorry I've had a few beers tonight I'll get my coat)

Nice work Jack looks great! I'll bash it about a bit and feed back.

Edited by FWR Media, 04 April 2008 - 09:04 PM.


#9   Jack_mcs

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

Posted 05 April 2008 - 12:06 AM

View PostGlcustoms, on Apr 4 2008, 03:50 PM, said:

Wnated to confirm this block of code:
In catalog/includes/header_tags.php
Lines 65 & 66 read:
case (basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_INFO):  $filename = FILENAME_PRODUCT_REVIEWS; break; 
	 case (basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_PRODUCT_WRITE;   break;

Is that correct? Or should it be:
case (basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_INFO):  $filename = FILENAME_PRODUCT_REVIEWS_INFO; break; 
	 case (basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_PRODUCT_REVIEWS_WRITE;   break;
Yes, you are correct. The change you posted is the correct code.

Jack

#10   tapuahk

tapuahk
  • Members
  • 202 posts
  • Real Name:T Dow

Posted 05 April 2008 - 01:13 AM

Okay. I'm going to use a duplicate I made of my store and database to test this.  I really liked the way HTC worked, so I am looking forward to the results this will bring.

~~~Tapuahk

#11   tapuahk

tapuahk
  • Members
  • 202 posts
  • Real Name:T Dow

Posted 05 April 2008 - 01:54 AM

USING:

Update instructions for updating Header Tags Controller version 2.6.3 to
Header Tags SEO V 3.0 by Jack_mcs

Step 3 says:

Quote

Find the following line in admin/includes/filenames.php

    define('FILENAME_HEADER_TAGS_CONTROLLER', 'header_tags_controller.php');
    define('FILENAME_HEADER_TAGS_ENGLISH', 'header_tags_english.php');

    and Replace it with delete it

  /*** Begin Header Tags SEO ***/
  define('FILENAME_HEADER_TAGS_SEO', 'header_tags_seo.php');
  define('FILENAME_HEADER_TAGS_FILL_TAGS', 'header_tags_fill_tags.php');
  /*** End Header Tags SEO ***/

But I found this:

Quote

// define HTC
  define('FILENAME_HEADER_TAGS_CONTROLLER', 'header_tags_controller.php');
  define('FILENAME_HEADER_TAGS_ENGLISH', 'header_tags_english.php');
  define('FILENAME_HEADER_TAGS_FILL_TAGS', 'header_tags_fill_tags.php');

I don't think I should have to define the same thing twice so I deleted all three lines not just the two.


~~~Tapuahk

#12   Jack_mcs

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

Posted 05 April 2008 - 02:09 AM

View Posttapuahk, on Apr 4 2008, 08:54 PM, said:

Step 3 says:
But I found this:
I don't think I should have to define the same thing twice so I deleted all three lines not just the two.
~~~Tapuahk
I'm not sure I follow but you will need the definitions for this contribution. If you do it wrong, it will just display the text in capital letters so it will be obvious where the mistake it.

Jack

#13   tapuahk

tapuahk
  • Members
  • 202 posts
  • Real Name:T Dow

Posted 05 April 2008 - 02:25 AM

Update instructions for updating Header Tags Controller version 2.6.3 to
Header Tags SEO V 3.0 by Jack_mcs


says

Quote

12)  Find the following in catalog/index.php

                <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>

i think you meant catalog/product_info.php

??

#14   tapuahk

tapuahk
  • Members
  • 202 posts
  • Real Name:T Dow

Posted 05 April 2008 - 02:39 AM

View PostJack_mcs, on Apr 4 2008, 09:09 PM, said:

I'm not sure I follow but you will need the definitions for this contribution. If you do it wrong, it will just display the text in capital letters so it will be obvious where the mistake it.

Jack

Just  saying if I blindly follow instructions I would have two lines saying

  define('FILENAME_HEADER_TAGS_FILL_TAGS', 'header_tags_fill_tags.php');

as a line saying

  define('FILENAME_HEADER_TAGS_FILL_TAGS', 'header_tags_fill_tags.php');

exists and you don't say to remove it.

#15   tapuahk

tapuahk
  • Members
  • 202 posts
  • Real Name:T Dow

Posted 05 April 2008 - 02:59 AM

Received the following error when running admin/headertags_seo_update.php

admin/headertags_seo_update.php

Warning: mysql_fetch_field(): supplied argument is not a valid MySQL result resource in /international/catalog/admin/includes/functions/database.php on line 125

  Administration  |  Online Catalog  |  Support Site Logged in as: admin (Logoff)  
Header Tags Controller Setup


Database successfully updated!!!  

???

I'm stopping here until I figure what went wrong.

Edited by tapuahk, 05 April 2008 - 03:03 AM.


#16   insaini

insaini
  • Members
  • 208 posts
  • Real Name:Jesse B.
  • Gender:Male
  • Location:Brampton, Ontario

Posted 05 April 2008 - 12:38 PM

Hey Jack,

Thanks for the contribution..

Im having a slight problem.. doesnt really make sense so maybe you can help..

everything has been installed..

I ran fill tags..

Now in the SEO Page.. I have setup the default tags and data...   I selected one of the pages on the site.. and just hit the checkboxes (do I need to enter numbers beside them or can I leave them blank)  .. I left the the other text fields for the specific page blank..  I hit 'view result'  and it came back with

New Home Page Title
new description
new keywords1,keywords2

Shouldnt it come back with the default data on the right side of the page?  

So I then tried entering something into the text fields of the specific page..

Then when I view result .. it comes back with the default data from the right side of the page.. BUT it doesnt include the data I entered in the text boxes for the specific page..   two peculiar results which don't make sense to me..

any thoughts?

J

#17   insaini

insaini
  • Members
  • 208 posts
  • Real Name:Jesse B.
  • Gender:Male
  • Location:Brampton, Ontario

Posted 05 April 2008 - 01:07 PM

Ok im pretty sure this is the problem

in catalog/includes/header_tags.php
// ALL OTHER PAGES NOT DEFINED ABOVE
  default:
	$header_tags_array['title'] = tep_db_prepare_input($defaultTags['default_title']);
	$header_tags_array['desc'] = tep_db_prepare_input($defaultTags['default_description']);
	$header_tags_array['keywords'] = tep_db_prepare_input($defaultTags['default_keywords']);
	break;
  }

Shouldnt the default tags be appended to the tags of each specific page.. this section seems incomplete... it seems it is why each page no matter what I set the tags to .. only the default tags are showing up..

#18   Jack_mcs

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

Posted 05 April 2008 - 01:12 PM

View Posttapuahk, on Apr 4 2008, 09:59 PM, said:

Received the following error when running admin/headertags_seo_update.php

admin/headertags_seo_update.php

Warning: mysql_fetch_field(): supplied argument is not a valid MySQL result resource in /international/catalog/admin/includes/functions/database.php on line 125

  Administration  |  Online Catalog  |  Support Site Logged in as: admin (Logoff)  
Header Tags Controller Setup


Database successfully updated!!!  

???

I'm stopping here until I figure what went wrong.
I saw that on a few of the servers I installed it on. It probably has to do with the php version but the script runs successfully so it can be ignored.

Jack

#19   Jack_mcs

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

Posted 05 April 2008 - 01:13 PM

View Postinsaini, on Apr 5 2008, 07:38 AM, said:

Hey Jack,

Thanks for the contribution..

Im having a slight problem.. doesnt really make sense so maybe you can help..

everything has been installed..

I ran fill tags..

Now in the SEO Page.. I have setup the default tags and data...   I selected one of the pages on the site.. and just hit the checkboxes (do I need to enter numbers beside them or can I leave them blank)  .. I left the the other text fields for the specific page blank..  I hit 'view result'  and it came back with
J
You have to enter a sort number.

Jack

Edited by Jack_mcs, 05 April 2008 - 01:14 PM.


#20   insaini

insaini
  • Members
  • 208 posts
  • Real Name:Jesse B.
  • Gender:Male
  • Location:Brampton, Ontario

Posted 05 April 2008 - 01:24 PM

View PostJack_mcs, on Apr 5 2008, 09:13 AM, said:

You have to enter a sort number.

Jack

Jack.. I did add sort numbers and they had no effect..  not until I changed the code from this (in catalog/includes/header_tags.php) did it finally work as it should.. with still a slight hiccup in the admin section with respect to sort orders (below)

// ALL OTHER PAGES NOT DEFINED ABOVE
  default:
	$header_tags_array['title'] = tep_db_prepare_input($defaultTags['default_title']);
	$header_tags_array['desc'] = tep_db_prepare_input($defaultTags['default_description']);
	$header_tags_array['keywords'] = tep_db_prepare_input($defaultTags['default_keywords']);
	break;
  }

to this

// ALL OTHER PAGES NOT DEFINED ABOVE
  default:
	$pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . basename($PHP_SELF) . "' and language_id = '" . (int)$languages_id . "'");
	$pageTags = tep_db_fetch_array($pageTags_query);  

	$sortOrder['title'][0] = $pageTags['page_title'];
	$sortOrder['description'][0] = $pageTags['page_description']; 
	$sortOrder['keywords'][0] = $pageTags['page_keywords'];
	$sortOrder['logo'][0] = $pageTags['page_logo']; 

	if ($pageTags['append_default_title'] && tep_not_null($tmpTags['def_title'])) $sortOrder['title'][$pageTags['sortorder_title']] = $tmpTags['def_title'];
	if ($pageTags['append_default_description'] && tep_not_null($tmpTags['def_desc'])) $sortOrder['description'][$pageTags['sortorder_description']] = $tmpTags['def_desc'];
	if ($pageTags['append_default_keywords'] && tep_not_null($tmpTags['def_keywords'])) $sortOrder['keywords'][$pageTags['sortorder_keywords']] = $tmpTags['def_keywords'];
	if ($pageTags['append_default_logo'] && tep_not_null($tmpTags['def_logo_text']))  $sortOrder['logo'][$pageTags['sortorder_logo']] = $tmpTags['def_logo_text'];
 
	FillHeaderTagsArray($header_tags_array, $sortOrder);  
	break;
  }


As for the sort orders.. I get these errors..

Error Duplicate sort orders are not allowed -> buy.php
Error Duplicate sort orders are not allowed -> buy.php
Error Duplicate sort orders are not allowed -> buy.php

I put in a sort order of 2 for the title and sort order of 2 for description..   I dont see why this is a problem..

However, with the change in code above.. specific page titles are now being appended by the default page titles.. this wasnt happening before..

Edited by insaini, 05 April 2008 - 01:26 PM.