Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

Omg after I succeed in installing htc in combination with sts I have a short question:

For what is Header Tags Categories Description? I cant find it in my site code after I set a value?

There are four Tags: Title, Category Decriptionand Keywords. All seem to be there (meta name="decription", name="keywords" and <title>/title>). But Categories Decription is not aviable!

 

Second question: Why is Header Tags Title the <title></title> tag and not a <meta name="title" content=""></meta> tag?

 

Hope you can help me.

Erik, before I get too deep here...did you happen to install HTC & STS according to my step by step installation instructions (see link in my signature below)?

 

If you did, then you will need to do one more step in order to see the category descriptions in your template. In my step by step, I point out that you should not add any of the HTC modifications to the catalog side. One side effect of doing that will be that you category descriptions will not display on the category pages. To get your descriptions to display and still have everything work properly, go ahead and make the modifications to the index.php file that is suggested in the HTC Catalog Installation Instructions.

 

Hope this helped,


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Omg after I succeed in installing htc in combination with sts I have a short question:

For what is Header Tags Categories Description? I cant find it in my site code after I set a value?

There are four Tags: Title, Category Decriptionand Keywords. All seem to be there (meta name="decription", name="keywords" and <title>/title>). But Categories Decription is not aviable!

 

Second question: Why is Header Tags Title the <title></title> tag and not a <meta name="title" content=""></meta> tag?

 

Hope you can help me.

The categories description option is to allow you to add text to the category pages, under the page title. If you are using STS, then you should follow Bill's advice. If not, and Header Tags is installed correctly, then you just need to go to admin->Catalog, edit a category and enter the text in there. It is not added by Fill Tags as the other items are.

 

The title code of a page is not a tag at all, but a page element. The meta name="title" is not a defined meta tag, as such. it can be used but there is no clear purpose for it so it is doubtful that it would be used.

 

Jack

Share this post


Link to post
Share on other sites
The categories description option is to allow you to add text to the category pages, under the page title. If you are using STS, then you should follow Bill's advice. If not, and Header Tags is installed correctly, then you just need to go to admin->Catalog, edit a category and enter the text in there. It is not added by Fill Tags as the other items are.

 

The title code of a page is not a tag at all, but a page element. The meta name="title" is not a defined meta tag, as such. it can be used but there is no clear purpose for it so it is doubtful that it would be used.

 

Jack

Jack, I used to give a link to explain the above in detail but someone screwed up the links in the STS thread. :'(

 

Basically, STS users would still need to go to admin->Catalog, edit a category and enter the text in there. But, in order for it to be displayed in their template, they would have to have the $headcontent tag in the head section of their template page.

 

Also (as noted in my step by step below), STS users need to configure the STS Modules in order for HTC to work properly. This is very very simple:

For example:

For the STS Default module, you have a parameter named “Files for normal template”. By default it contains only “sts_user_code.php”. If you modify this parameter to “sts_user_code.php;headertags.php”, you will have Header Tags Controller working for all of the pages using the default template. Do the same for the other modules below.

For the index module, the parameter is called “Files for index.php template”.

For “product_info module”, there are 2 parameters:

“Files for normal template”

“Files for content template”.

 

STS users should refer to my "How to install HTC with STS" link in signature below for more detailed explaination of the above. :thumbsup:

 

Don't get freaked out with this...these are really simple modifications and you will have full HTC admin functions. :lol:


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

Permissions settings for the /home/my_domain/public_html/shop/includes/header_tags.php file appear to be incorrect. Change to 755

Error Permissions settings for the /home/my_domain/public_html/shop/includes/languages/english/header_tags.php file appear to be incorrect. Change to 755

 

 

After I installed I got that?

 

Did I install it wrong or do I just need to change the permissions?

 

I followed bkellums post http://forums.oscommerce.com/index.php?s=&...t&p=1086557

 

I also had a question to this step....

Step 7: Be sure you have the following line of code at the beginning of your includes/header_tags.php file:

 

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

- or -

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

My shop seems to work without that code but...

 

If i add that first code I get a fatal error when trying to view my shop.

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /home/my_domain/public_html/shop/includes/functions/clean_html_comments.php:11) in /home/my_domain/public_html/shop/includes/functions/clean_html_comments.php on line 24

 

If i add that second code I don't get a fatal error and it works.

Just wondering what the purpose of it is.

Edited by tookie

Share this post


Link to post
Share on other sites

The permissions message has been covered many times. Just read back through the thread to find what to do about that.

 

How to include the funtions file depends on whether or not you are using STS. If you are, then you need to follow the install instructions Bill mentions.

 

Jack

Share this post


Link to post
Share on other sites

Hi there - thanks for a great module - I've installed it and it seems to be working fairly well. Hopefully it'll improve my Google ranking!

 

A small problem I've encountered, though, is that when I go back onto a product on categories.php which I have previously added tags for, it seems to clear the tags that I've added and I have to add them again.

 

I've looked through the thread and couldn't see anyone else had reported a similar problem. Can anyone shed any light on this problems?

 

Thanks in advance.

Share this post


Link to post
Share on other sites
Permissions settings for the /home/my_domain/public_html/shop/includes/header_tags.php file appear to be incorrect. Change to 755

Error Permissions settings for the /home/my_domain/public_html/shop/includes/languages/english/header_tags.php file appear to be incorrect. Change to 755

 

 

After I installed I got that?

 

Did I install it wrong or do I just need to change the permissions?

 

I followed bkellums post http://forums.oscommerce.com/index.php?s=&...t&p=1086557

 

I also had a question to this step....

Step 7: Be sure you have the following line of code at the beginning of your includes/header_tags.php file:

 

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

- or -

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

My shop seems to work without that code but...

 

If i add that first code I get a fatal error when trying to view my shop.

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /home/my_domain/public_html/shop/includes/functions/clean_html_comments.php:11) in /home/my_domain/public_html/shop/includes/functions/clean_html_comments.php on line 24

 

If i add that second code I don't get a fatal error and it works.

Just wondering what the purpose of it is.

You need to have one or the other:

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

- or -

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

It will not function correctly without it. :thumbsup:

You need to set the permissions to the same level that you have your images folder set to, most likely at 755 or 777 (again, one or the other).


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Hi there - thanks for a great module - I've installed it and it seems to be working fairly well. Hopefully it'll improve my Google ranking!

 

A small problem I've encountered, though, is that when I go back onto a product on categories.php which I have previously added tags for, it seems to clear the tags that I've added and I have to add them again.

 

I've looked through the thread and couldn't see anyone else had reported a similar problem. Can anyone shed any light on this problems?

 

Thanks in advance.

Any problem related to the categories file is in that file. Please use the one included to see if your problem goes away. If it does, you will need to reinstall those changes or compare your file with that one.

 

Jack

Share this post


Link to post
Share on other sites

Thanks for the help so far. Really appreciate it.

 

This is the directions for HTC

So if you have the option checked, both titles will be displayed. Let's say your title is Mysite and the default title is osCommerce.

With HTTA on, the title is

Mysite Oscommerce

With HTTA off, the title is

Mysite

 

However, is there a way to change it so that the ordering is switched

With HTTA on, the title is

Oscommerce Mysite

With HTTA off, the title is

Oscommerce

 

I would like to turn on HTTA all the time so that every webpage header would have the "oscommerce" first and then list the rest after. If someone can tell me how to change the ordering of that it would be great. Thank you.

 

 

I think I found a small bug as well. If you turn on all the options for product_info and turn on HTPA option as well. And you check a product info page, the spacing is okay. But if you look at the source code and the meta keyword and description...it combines two tags with no space.

Share this post


Link to post
Share on other sites

That is all controlled in the includes/header_tags.php file. You would have to manually edit them to get the arrangment you want.

 

Jack

Share this post


Link to post
Share on other sites
That is all controlled in the includes/header_tags.php file. You would have to manually edit them to get the arrangment you want.

 

Jack

 

I tried to do it myself, changing this and that and seeing what works and doesn't...but I'm pretty lost. Would it be too much trouble if you could edit it so that the default just comes first ie. default title with HTTA on? Thanks.

Edited by tookie

Share this post


Link to post
Share on other sites

Hi there. Yes the first time I used your howto. thanks, great work !!

 

But however I also ave a version where I have included sts (I think it's the second contribution I've included) and htc in the "normal" way as described in the htc installation manual. The only change that has to be done is to include the headertags.php content into sts (eitgher copy the file and expand the sts settings or place the content into sts_user_code.php).

 

Now all is working fine thanks again!

Share this post


Link to post
Share on other sites

Another way of including sts together with htc:

1. Install sts as mentioned in the installation files.

2. Install htc as mentioned in Install_Catalog.txt and Install_Admin.txt.

3. Paste into catalog/includes/modules/sts_inc/sts_user_code.php:

  $sts->start_capture();
 if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
require_once(DIR_WS_FUNCTIONS . 'header_tags.php');
require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
require(DIR_WS_INCLUDES . 'header_tags.php');
 } 
 $sts->stop_capture('headertags');

 

It's not as simple as modifying the way bkellum mentioned but thats the correct way (how sts and htc authors wanted it to be done).

Share this post


Link to post
Share on other sites

I have header tags installed on my website however, I cant get HTCA to work.

Also under "Text Control" I have two blank pages on there which I cannot delete. I have index and have tried to use HTCA but with no luck. Is there anything that I might have missed out for it now to work?

Thanks

parma

Share this post


Link to post
Share on other sites
I have header tags installed on my website however, I cant get HTCA to work.

Also under "Text Control" I have two blank pages on there which I cannot delete. I have index and have tried to use HTCA but with no luck. Is there anything that I might have missed out for it now to work?

Thanks

parma

Try replacing the includes/header_tags.php and english/header_tags.php files.

 

Jack

Share this post


Link to post
Share on other sites

Hi,

 

I have made a new page (about us), and it said HEAD_TITLE_TAG_ABOUT_US in the title page of the browser. Problem is I have english and dutch and I have been able to enter metatags for the english version, but can't find a dutch version. How do I do the dutch version. De HTC contrib is a pretty old one as I installed it as a combi with STS a couple of months ago. It was a painful operation, so I don't want to upgrade for 1 single page...

 

Creative ideas appreciated :)

 

thanks

gina

Share this post


Link to post
Share on other sites
Hi,

 

I have made a new page (about us), and it said HEAD_TITLE_TAG_ABOUT_US in the title page of the browser. Problem is I have english and dutch and I have been able to enter metatags for the english version, but can't find a dutch version. How do I do the dutch version. De HTC contrib is a pretty old one as I installed it as a combi with STS a couple of months ago. It was a painful operation, so I don't want to upgrade for 1 single page...

 

Creative ideas appreciated :)

 

thanks

gina

Hi,

first you can try to use the manufacteurer update (includes in newer htc versions) so all installed languages are supported.

 

Or you update htc (and eventually sts) to the actual version. In version 2.6.3 htc supports multilanguages out of the box. The installation procrs is also not that painfull. Just dfo my steps mentioned above (or follow bkellums steps) to integrate both. In combination with sts you only need to modify index.php and products_info.php (I think).

Share this post


Link to post
Share on other sites
Hi,

first you can try to use the manufacteurer update (includes in newer htc versions) so all installed languages are supported.

 

Or you update htc (and eventually sts) to the actual version. In version 2.6.3 htc supports multilanguages out of the box. The installation procrs is also not that painfull. Just dfo my steps mentioned above (or follow bkellums steps) to integrate both. In combination with sts you only need to modify index.php and products_info.php (I think).

 

thanks for the answer, I found the solution and I thought I replied to my own post. I guess I am having a blond day..

 

The solution was to choose the dutch language in the admin-pages, and than enter the metatags for the page. Normally I don't use the dutch admin, because a lot of my contribs are only in english and are a mess if i choose dutch.

 

Kind regards,

Gina

Share this post


Link to post
Share on other sites
Another way of including sts together with htc:

1. Install sts as mentioned in the installation files.

2. Install htc as mentioned in Install_Catalog.txt and Install_Admin.txt.

3. Paste into catalog/includes/modules/sts_inc/sts_user_code.php:

  $sts->start_capture();
 if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
require_once(DIR_WS_FUNCTIONS . 'header_tags.php');
require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
require(DIR_WS_INCLUDES . 'header_tags.php');
 } 
 $sts->stop_capture('headertags');

 

It's not as simple as modifying the way bkellum mentioned but thats the correct way (how sts and htc authors wanted it to be done).

Eric, what version of STS are you using? My instructions is for STSv4 and higher. The previous versions are practically a different contribution all together.

Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

I have uploaded the stock versions of categories.php and manufacturers.php to admin and I now save all fields successfully to the database (and pull them back again when I edit the fields afterwards) thank you for that.

 

My new problem is that categories.php saves my custom tags to TABLE_CATEGORIES whereas index.php pulls from TABLE_CATEGORIES_DESCRIPTION - meaning that all my custom tags (for categories at least aren't used!). Any ideas how to make index.php (maybe more precisely header_tags.php pull from TABLE_CATEGORIES rather than TABLE_CATEGORIES_DESCRIPTION?

 

The only thing that can cause that is the admin/manufacturers.php file. Use the one in the package to see if it works and to compare yourse against.

 

Jack


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites
I have uploaded the stock versions of categories.php and manufacturers.php to admin and I now save all fields successfully to the database (and pull them back again when I edit the fields afterwards) thank you for that.

 

My new problem is that categories.php saves my custom tags to TABLE_CATEGORIES whereas index.php pulls from TABLE_CATEGORIES_DESCRIPTION - meaning that all my custom tags (for categories at least aren't used!). Any ideas how to make index.php (maybe more precisely header_tags.php pull from TABLE_CATEGORIES rather than TABLE_CATEGORIES_DESCRIPTION?

That's not how Header Tags works so I'm guessing you have some other contribution or code change that does that. If that is the case, then you will have to edit the code to have it use what you want.

 

Jack

Share this post


Link to post
Share on other sites
That's not how Header Tags works so I'm guessing you have some other contribution or code change that does that. If that is the case, then you will have to edit the code to have it use what you want.

 

Jack

 

Looking at the database entries and page sources that's definitely what's happening.

 

Where would I look to find the code that's wrong?


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites
Looking at the database entries and page sources that's definitely what's happening.

 

Where would I look to find the code that's wrong?

Again, it may be what's happening but it is not because of Header Tags. If you replace the categories file and it works, which you said it did, then the problem is in the categories file. You'll need to find out what other code you are using and remove it. It is most like the Categories Description contribution.

 

Jack

Share this post


Link to post
Share on other sites
Again, it may be what's happening but it is not because of Header Tags. If you replace the categories file and it works, which you said it did, then the problem is in the categories file. You'll need to find out what other code you are using and remove it. It is most like the Categories Description contribution.

 

Jack

 

I don't have the categories description installed.

 

Is HTC supposed to pull from TABLE_CATEGORIES or TABLE_CATEGORIES_DESCRIPTION?


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites

Hello,

 

I've got a question: is it possible to get a title for a product page which contains the category the product belongs to?

Something like:

Title: $productname - $category - $shopname

 

Regards,

lemonis

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
Sign in to follow this  

×