Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

anyone get this to work with register_globals off? it saves fine, but when it comes time to edit the product, the fields are not re-populated with the information in the database

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Sorry to bother you - not quite sure what I've done wrong, but I'm getting the following error:

 

Fatal error: Call to undefined function: clean_html_comments() in /home/(user)/public_html/includes/header_tags.php on line 208

 

Line 208 is this:

 

$tags_array['title']= clean_html_comments($the_product_info['products_head_title_tag']);

 

Category pages work fine, but the product pages are screwed.

 

Any help much appreciated.

Link to comment
Share on other sites

can someone help me with a header tags install please. It is installed in seems to be working correctly except for one thing. When I try to change the fill tags options it does not save it. Does anyone know which file I need to check to try and fix this? Thanks

Link to comment
Share on other sites

What do you mean by "change the fill tags options?" When you go to the fill tags section, you select what you want to change and click update. The settings you selected won't stay set the next time you go there. Is that what you mean?

 

Jack

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

I am trying to set it to fill all the tags automatically but it isnt working. There doesnt seem to be any errors and I have checked all of my install but cant seem to find where I have gone wrong. I have the featured sets contributution installed so I have had to botch the code together myself in some files(i am no a php programmer!) Can you give me any idea which file might be the problem. Thanks for any help you can give me.

Link to comment
Share on other sites

Oh, I see. Try this. Add a new product and do not fill in the sections for header tags (title and meta tags). Once the product is added, go back into it (edit) and see if the header tags fields are filled in. If they are, then it is working as it should be. If they are not, then the problem is in your categories.php file. You will need to compare it with the one in the archive to find where the problem is at.

 

Jack

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

Oh, I see. Try this. Add a new product and do not fill in the sections for header tags (title and meta tags). Once the product is added, go back into it (edit) and see if the header tags fields are filled in. If they are, then it is working as it should be. If they are not, then the problem is in your categories.php file. You will need to compare it with the one in the archive to find where the problem is at.

 

Jack

 

I have done the alterations to the categories.php file again. I have added a new product and then when editing it the header tags are filled in still. But still no header tags are displayed. :(

Link to comment
Share on other sites

I just updated from version 1.0.... lot of work figuring out what was new and what was old but I got it working. My problem is that when I view my page source to check my header tags I see they have an extra "/" on the end like this:

 

<meta name="Description" content="Bush and Kerry"/>

<meta name="Keywords" content="Bush and Kerry"/>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

 

 

I am sorry if it has been asked before but Ididn't see it. Anyone know how to get rid of the "/" above??

"Your focus is your reality"

Link to comment
Share on other sites

I have done the alterations to the categories.php file again. I have added a new product and then when editing it the header tags are filled in still. But still no header tags are displayed. :(
I may not understand your problem. From the way I read your first post, you were having problems in admin. Now if sounds like you are talking about the shop side. Since the tags are present when you look at it in the edit window, it doesn't sound like a problem with the admin side. If you are saying that the tags are not showing on the shop side, that is a different problem. Assuming that to be the case, what page are you having problems with on the shop side? All of them, index, product info?

 

Jack

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

I just updated from version 1.0.... lot of work figuring out what was new and what was old but I got it working. My problem is that when I view my page source to check my header tags I see they have an extra "/" on the end like this:

 

<meta name="Description" content="Bush and Kerry"/>

<meta name="Keywords" content="Bush and Kerry"/>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

I am sorry if it has been asked before but Ididn't see it. Anyone know how to get rid of the "/" above??

From 1.0? That's got to be a record. :)

 

The extra slash is to make it compatible with xhtml. There's no reason to remove it. It is valid code.

 

Jack

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

Ok, thanks for the information! A couple more questions... I am wondering about the tag I am supposed to change to be:

 

<?php
// BOF: Header Tag Controller v2.5.7
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: Header Tag Controller v2.5.7
?>

 

 

1. Which changes the meta tags to use the contribution... I did it for ALL pages on my site but I am wondering if I should have only done it on SOME of the pages and not all....?

 

2 Then I am wondering if anyone has made it so that the contribution will fill the meta description with the description from the product rather than the title. Right now if I leave the tags blank they all get filled in with the product name but I want it to fill the product name for the title and use it for a keyword but use the description from the product for the description meta tag...?

 

3. Then lastly I am wondering about adding languages. I translated the language files but then I notice now that there is only one language in catalog/admin/header_tags_english.php. I made two new files for espanol and german but there is nothing to translate in the file, catalog/admin/header_tags_english.php so I don't know why there is only one language file for it and what will happen if someone uses the admin section in German, does it use the english file or what?

"Your focus is your reality"

Link to comment
Share on other sites

1 - As the instructions state, do the ones you want the tags to be displayed in. If you do them all, it won't hurt anything. But putting the tags in your checkout_process file won't help either since the search engines should not get to it.

 

2 - This is an option in Fill Tags.

 

3 - You just need to copy the files and changes made for english into the other languages.

 

Jack

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

 

i got a bit of an issue with the header tags it does not show the page title, descriptions or the keywords, on the product_info.php i have checked the file at it has all the releveant header tags code.

 

any advice welcome,

thank

saj

Link to comment
Share on other sites

1 - As the instructions state, do the ones you want the tags to be displayed in. If you do them all, it won't hurt anything. But putting the tags in your checkout_process file won't help either since the search engines should not get to it.

 

2 - This is an option in Fill Tags.

 

3 - You just need to copy the files and changes made for english into the other languages.

 

Jack

 

Ok, I think I understand about the pages to use the header tags contrib on better now. In the instructions it is recommended only for two files but I think I will enable it on manufacturers.php, and categories.php (since these have the ability to enter meta tags as well) and maybe on a couple of pages like my all products page or something and just see what it does on that. In Google's webmaster guidelines they recommend static links as much as possible and I am thinking it might not be good to have dynamically generated meta tags either (if someone knows, please post) but it's the impression I get. If anyone has recommendations, please post. I saw some other recommendations on which pages to use them on but nothing that answered all my questions.... The search engines like keeping us in the dark as to what helps us or hurts us..

 

On the fill tags option - geez, hadn't even seen that page yet! Thank you, figured it out.

 

On the language I just don't know if the one file is required or not. I think the script accesses only the english version of the one page and then relies on the other language files for the text changes but I am not sure so I made an espanol and german version too with no changes. It can't hurt right? .. Just trying to minimize leftover pages from old contribs, etc..

"Your focus is your reality"

Link to comment
Share on other sites

Ok, I think I understand about the pages to use the header tags contrib on better now. In the instructions it is recommended only for two files but I think I will enable it on manufacturers.php, and categories.php (since these have the ability to enter meta tags as well) and maybe on a couple of pages like my all products page or something and just see what it does on that. In Google's webmaster guidelines they recommend static links as much as possible and I am thinking it might not be good to have dynamically generated meta tags either (if someone knows, please post) but it's the impression I get. If anyone has recommendations, please post. I saw some other recommendations on which pages to use them on but nothing that answered all my questions.... The search engines like keeping us in the dark as to what helps us or hurts us..
It's not a recommendation. Those two files are the minimum that should be changed. Anything after that is up to you. I personally think it should be added to all files except for the secured ones but having that in the instructions creates a lot of work for others that would never set up the pages correctly anyway, so it was changed.

 

That particular google guideline is outdated. It used to matter to them if the link was static or not but not anymore.

 

You can't have static meta tags for the products without having every single product page ending up with the same meta tags, which would defeat the purpose.

 

Jack

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

I personally think it should be added to all files except for the secured ones...

 

Jack

 

 

By secured, do you mean admin section? SSL secured?

 

VERY interested to hear more about this, thank you.

"Your focus is your reality"

Link to comment
Share on other sites

I meant secured as in ssl. If your site is setup properly, then the search engines won't list pages like checkout process and create account so it servers no purpose to have header tags code installed in those files. You only need to add the code to the files that will be listed in the search engine listings.

 

Jack

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,

 

I have just installed and it seams to work well except one place. It does not have the category description and keywords for categories when editing or adding a category in admin/categories.php. I have tracked the problem down I think my code for entering the other information looks like this for earch fied:

<?php

for ($i=0; $i<sizeof($languages); $i++) {

?>

	  <tr>

		<td class="main"><?php if ($i == 0) echo TEXT_EDIT_CATEGORIES_NAME; ?></td>

		<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', (($categories_name[$languages[$i]['id']]) ? stripslashes($categories_name[$languages[$i]['id']]) : tep_get_category_name($cInfo->categories_id, $languages[$i]['id']))); ?></td>

	  </tr>

<?php

}

?>

	 <tr>

	   <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

	 </tr>

 

Does anyone know the code that I would need to add the other fields?

 

Thanks,

Philip

Link to comment
Share on other sites

You made a mistake when changing your categories.ph file. There is a one included in the archive. Just compare yours to it (winmerge is a free compare program) and you should be able to find your problem.

 

Jack

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

I installed the contribution and am shocked at how the contribution handles adding and deleting pages. I was debugging the contribution in Zend Studio and I kept getting all these "file was modified outside this program" messages. After playing with it for a while and accidentally corrupting the header_tags_controller.php catalog includes file, I figured out what was going on. Each time you add or delete a new file in admin the HTC code actually cuts and pastes code out of the php file. No offense, but isn't this the perfect job for a database table? There is no need to have the server editing php files behind the scenes to account for dynamic content. Just add a new table to the database and store the filenames there instead.

 

I wasn't planning on dedicating time to this contribution other than installing it, but I feel inclined to fix that now. I use my php files across two sites and besides not wanting to have scripts modifying my files in general, I need the files to apply to multiple sites. I also store my php files in SVN, so any changes I make on the live site would be overwritten each time I checked in an update.

Link to comment
Share on other sites

Hi,

 

Is there any way to make the field Default Keyword(s) in Admin/Header Tags/Text Control longer? My keywords truncate just in the middle.

 

Thanks.

Link to comment
Share on other sites

Hi Jack

Sorry, not very good at explaining the problem. I thought it was the admin side but now I am not so sure. Can you have a look at the site please then you can see the problem better. It just shows the default headers on each category but it does show them correctly when I look at a manufacturer.

Thanks

Sarah

http://www.lacookshop.co.uk/store/

Edited by jazzylily
Link to comment
Share on other sites

Hi,

 

Is there any way to make the field Default Keyword(s) in Admin/Header Tags/Text Control longer? My keywords truncate just in the middle.

 

Thanks.

The size of the keywords box is 255 characters. You can change that by going to admin/header_tags_english.php and changing this line of code
		  <td class="smallText" ><?php echo tep_draw_input_field('main_keyword', tep_not_null($main_key) ? $main_key : '', 'maxlength="255", size="60"', false); ?> </td>

But if your keywords are over 255 characters, you are probably doing something wrong and I wouldn't recommend increasing the size.

 

Jack

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

Sorry, not very good at explaining the problem. I thought it was the admin side but now I am not so sure. Can you have a look at the site please then you can see the problem better. It just shows the default headers on each category but it does show them correctly when I look at a manufacturer.

Thanks

Sarah

http://www.lacookshop.co.uk/store/

It appears the title and meta tags don't change on the product info page. If you have not ran Fill Tags, go to admin->Header Tags->Fill Tags and run it. Then go to admin->Header Tags->Text Control and be sure to uncheck all of the HT.. boxes for the product_info section. Does that make a difference?

 

Jack

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

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...