Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

Hondo,

 

the miltilanguage version doesn't work perfectly yet. You've realised the first change when category_head_title_tag cannot be used and has to be changed for categories_description in your index.php.

 

For products, use title, keywords and description on each individual product page in your admin > catalog.

 

With categories, there are no options for different language versions as far as I can se at the moment.

 

All other pages, such as privacy, terms, etc. - even if you edit admin > Header Tags > Text Control using any other than English version, it is still writing into this file: /includes/languages/english/header_tags.php therefore all you need to do is this:

1/ complete all tags for all your pages via Text Control in English admin

2/ manually edit / change tags in header_tags.php

3/ upload header_tags.php in any language directory that you need

 

That is, now your pages have different tags for different languages.

 

Hope that helps, if you figure out how to change tags for categories, please let me know.

 

Alex

Absinthe Original Liquor Store

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

I was fiddling with my header tag controller today and for some reason now all the pages have taken on the default settings  in the text controller. No matter what I do all the pages on my site show nothing but the default tags. Anyone have a clue as to what I have done?

Moon

 

 

I am still having this problem...

Everything was working fine, I edited some keywords and some descriptions in my admin. I then updated the changes and went back to my catalog. Now every page has taken on the default settings instead of the individual changes that had been made. What could be the problem?

Moon

"Woohoo, Just Havin Funnn!"

Link to comment
Share on other sites

Hello Jack,

 

Do you comprehend my above-mentioned problem and would be so kind to assist me, please?

 

Hondo

If you read back in the thread, you will find that it is a known problem. I haven't had time to get to it but I will.

 

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

If you read back in the thread, you will find that it is a known problem. I haven't had time to get to it but I will.

 

Jack

 

 

Ok, thank you.

 

I tried to find in the Thread using the Search, without success. 44 pages are hard to read as non-native speaker.

 

I?m looking forward to your update for it.

 

Perhaps can you meanwhile tell me how to change the wrong generated tags for the index.php/cpath-sides manually?

 

Thanks and Greets

 

Hondo

Link to comment
Share on other sites

I am still having this problem...

Everything was working fine, I edited some keywords and some descriptions in my admin. I then updated the changes and went back to my catalog. Now every page has taken on the default settings instead of the individual changes that had been made. What could be the problem?

Moon

 

 

OK, so maybe I should post my link...Here I would appreciate any help.

Thanks, Moon

Edited by moonbeam

"Woohoo, Just Havin Funnn!"

Link to comment
Share on other sites

OK, so maybe I should post my link...Here I would appreciate any help.

Thanks, Moon

 

I ended up reinstalling parts of the header tags contribution, It seems to have fixed my problem. I reinstalled the header_tag admin files. I really dont understand why things went wrong, I didnt mess with any code in those files. I had only updated descriptions and keywords under text control in admin when things went wrong. Anyway, I fixed it for now. So I guess the lesson here is, when you can't find help or advise, suck it up and reinstall.

I hope somehow in a strange twisted way this helps someone...

Moon

"Woohoo, Just Havin Funnn!"

Link to comment
Share on other sites

Hi,

 

I just installed HTC 2.5.1 and it seems to work fine except for a one glitch.

When displaying a category, nothing shows up in the title, only the default text. Before the install, it used to show the category name.

 

In the install instructions, it tells to update the categories table with 3 new fields for the tags. I supposed that's where it's getting its information from. Well, where/how do you enter that information? In the admin/new category there is no field to enter that information whereas in the admin/products page there are. The Fill_tags does not work for me, I don't know why, but still that would not solve my problem for new categories.

 

BTW, I also have Ultimate SEO installed (the latest one available) and both contributions seem to work with the exception of the above.

 

Now, if you thought this contribution was hard to install, try to install it on CRE Loaded 6! I had to do it twice to get it right, but you know what? I'm not complaining, I'm greatfull to people who spend there time sharing these kind of things.

 

One last thing, is there a manual on how to use this contribution?

 

Thanks

Link to comment
Share on other sites

When you click on Ne Category inadmin, you should see a field for Cateogries Description, which it sounds like you don't see. If you don't see that, then something is wrong with your admin/categories.php file.

 

There is not a manual.

 

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 don't know what i have done wrong but i can't create a new category anymore? I used the 2.5.1 install. Anyone know how to help me? I am desperate :(

 

I have gone thru the categories.php file once more but everything is as described in installfile...

Edited by woosah
Link to comment
Share on other sites

When you click on Ne Category inadmin, you should see a field for Cateogries Description, which it sounds like you don't see. If you don't see that, then something is wrong with your admin/categories.php file.

 

There is not a manual.

 

Jack

 

In the Add/Edit categories I have the standard fields as follows:

Category Name, Category heading title, Category heading Description, Category Image and Sort Order.

 

How are these fields being populated?

category_head_title_tag,ategory_head_desc_tag,category_head_keywords_tag, category_head_description

 

One more thing, in the Keywords filed, how are keywords delimited? space, comma...

Link to comment
Share on other sites

When you click on Ne Category inadmin, you should see a field for Cateogries Description, which it sounds like you don't see. If you don't see that, then something is wrong with your admin/categories.php file.

 

There is not a manual.

 

Jack

 

Jack,

 

This piece of code in admin/categories.php seems to be supposed to display input fields for those extra field. However, I don't see them.

 

//** BOF Header Tag 2.5.1

$contents[] = array('text' => '<br>' . 'Header Tags Category Title' . '<br>' . tep_draw_input_field('htc_title', '', 'size="30"'));

$contents[] = array('text' => '<br>' . 'Header Tags Category Description' . '<br>' . tep_draw_input_field('htc_desc', '', 'size="30"'));

$contents[] = array('text' => '<br>' . 'Header Tags Category Keywords' . '<br>' . tep_draw_input_field('htc_keywords', '', 'size="30"'));

$contents[] = array('text' => '<br>' . 'Header Tags Categories Description' . '<br>' . tep_draw_input_field('htc_description', '', 'size="30"'));

//** EOF Header Tag 2.5.1

Link to comment
Share on other sites

I don't know what i have done wrong but i can't create a new category anymore? I used the 2.5.1 install. Anyone know how to help me? I am desperate  :(

 

I have gone thru the categories.php file once more but everything is as described in installfile...

If you could create a category, then installed Header Tags and now you can't create a category, then there has been a mistake in the installation. The admin/categories.php file is the one that has that code so that's where you should start. Try replacing the file with your oringnal file(before installing Header Tags) and see if you can create a category.

 

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

In the Add/Edit categories I have the standard fields as follows:

Category Name, Category heading title, Category heading Description, Category Image and Sort Order.

 

How are these fields being populated?

category_head_title_tag,ategory_head_desc_tag,category_head_keywords_tag, category_head_description

 

One more thing, in the Keywords filed, how are keywords delimited? space, comma...

You have to populate the fields, either by running fill_tags or manually.

 

Use commas for the keywords.

 

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

You have to populate the fields, either by running fill_tags or manually.

 

Use commas for the keywords.

 

Jack

 

Sorry for being a pain here but how do I update the tag fields manually when there's no tag field on the form?

 

If fill_tags is the only way then does it mean I have to run fill_tags everytime I add a new category? If that's the case what happens to the product tags I manually updated?

Link to comment
Share on other sites

I'm sorry. I misunderstood what you were saying. If you are not seeing the fields in the form, you really should fix that. If you don't, and there is some other problem too, it will only get worse with time.

 

If you run fill_tags, it will replace al of your products tags so any edits you made will be lost. And, yes, if you cannot see the field to add the tag, then you would need to run fill_tags each time. Better to just fix it now, I think.

 

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'm having problems, it says unexpected end at line 1125 (i think thats the line whatever the last line is) i've followed the instructions to the letter, and tried it 3 times, no go. Could someone just edit a stock vanilla categories.php for me and let me use that, i dont have any other contribs installed.

Link to comment
Share on other sites

I could not find my question discussed but if I missed it I appologize.

 

I have had Header Tags working for a few weeks but one thing that continues to bug me is that every time I go into admin to edit the text it reverts back to the original OSCommerce default stuff. I can change it all back to my descriptions, keywords and the like but if I so much as go into Header Tags in Admin it is to do all over again.

 

I can't even imagine what would be causing this!

 

Thank you

Sandra

Link to comment
Share on other sites

i'm having problems, it says unexpected end at line 1125 (i think thats the line whatever the last line is) i've followed the instructions to the letter, and tried it 3 times, no go.  Could someone just edit a stock vanilla categories.php for me and let me use that, i dont have any other contribs installed.

I'll PM you the link.

 

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 could not find my question discussed but if I missed it I appologize.

 

I have had Header Tags working for a few weeks but one thing that continues to bug me is that every time I go into admin to edit the text it reverts back to the original OSCommerce default stuff.  I can change it all back to my descriptions, keywords and the like but if I so much as go into Header Tags in Admin it is to do all over again. 

 

I can't even imagine what would be causing this!

 

Thank you

Sandra

Edit what text?

 

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'm sorry. I misunderstood what you were saying. If you are not seeing the fields in the form, you really should fix that. If you don't, and there is some other problem too, it will only get worse with time.

 

If you run fill_tags, it will replace al of your products tags so any edits you made will be lost. And, yes, if you cannot see the field to add the tag, then you would need to run fill_tags each time. Better to just fix it now, I think.

 

Jack

 

OK, I fixed all my problems. I even modified the code so that if the tags information is missing for title_tag and desc_tag it will automatically grad the information form the product/category name and description.

 

The only problem with this is if your description contains html code (<B><FONT>...) it will display it on top of the page. To solve this problem you have to dynamically remove those tags from the field before displaying.

 

The following code will strip all html tags from any strings. Just put it in general.php and call it from header_tag.php

 

function remove_html_tags($document) {

// $document should contain an HTML document.

// This will remove HTML tags, javascript sections

// and white space. It will also convert some

// common HTML entities to their text equivalent.

 

$search = array ("'<script[^>]*?>.*?</script>'si",  // Strip out javascript

                "'<[/!]*?[^<>]*?>'si",          // Strip out HTML tags

                "'([rn])+'",                // Strip out white space

                "'&(quot|#34);'i",                // Replace HTML entities

                "'&(amp|#38);'i",

                "'&(lt|#60);'i",

                "'&(gt|#62);'i",

                "'&(nbsp|#160);'i",

                "'&(iexcl|#161);'i",

                "'&(cent|#162);'i",

                "'&(pound|#163);'i",

                "'&(copy|#169);'i",

                "'(d+);'e");                    // evaluate as php

 

$replace = array ("",

                "",

                "\1",

                "\"",

                "&",

                "<",

                ">",

                " ",

                chr(161),

                chr(162),

                chr(163),

                chr(169),

                "chr(\1)");

 

  return preg_replace($search, $replace, $document);

 

  }

 

No I didn't write it, I found it on the web!

Link to comment
Share on other sites

Are you saying that if you edit a product in admin, save it and then click on edit again, the new data is not there?

 

Jack

 

Hello Jack, thx for the reply, that is what is happening but ONLY on the categories tags, the products tags are being saved ok, it's only when I try to change the tags for a category that I get this problem!

 

Thx again...

Link to comment
Share on other sites

HI,

 

I?m very new to OSC? I have been searching for hours to see anyone?s had the problem that I?m having but to no avail.

 

This is the prob.

 

I have installed the Header Tags Controller contribution? It?s seems to be working and I have to admit that I?m very impressed with the contribution.

 

One problem, so far?

 

After installing it when I go to my website it?s all working except when you click on any product you get a blank page. Not sure where to start looking.

 

Any ideas?

 

Have a look:

My Webpage

 

Thanks for any ideas you might have for me,

 

Terry

Link to comment
Share on other sites

Hello Jack, thx for the reply, that is what is happening but ONLY on the categories tags, the products tags are being saved ok, it's only when I try to change the tags for a category that I get this problem!

 

Thx again...

Then you have most likely missed the code changes for the categories changes in admin. That would be teh only thing to cause that that I can think of.

 

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?m very new to OSC? I have been searching for hours to see anyone?s had the problem that I?m having but to no avail.

 

This is the prob.

 

I have installed the Header Tags Controller contribution? It?s seems to be working and I have to admit that I?m very impressed with the contribution.

 

One problem, so far?

 

After installing it when I go to my website it?s all working except when you click on any product you get a blank page. Not sure where to start looking.

 

Any ideas?

 

Have a look:

My Webpage

 

Thanks for any ideas you might have for me,

 

Terry

Try replacing your product_info.php file with your backup. If it works, then you have made a mistake in that file or maybe in the products description in the database (although that is unlikely since they are all failing). If it still fails, then you have some other problem unrelated to Header Tags.

 

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?m very new to OSC? I have been searching for hours to see anyone?s had the problem that I?m having but to no avail.

 

This is the prob.

 

I have installed the Header Tags Controller contribution? It?s seems to be working and I have to admit that I?m very impressed with the contribution.

 

One problem, so far?

 

After installing it when I go to my website it?s all working except when you click on any product you get a blank page. Not sure where to start looking.

 

Any ideas?

 

Have a look:

My Webpage

 

Thanks for any ideas you might have for me,

 

Terry

 

That looks deffinitely like a bug in your code somewhere in product_info.php. What I do to trouble shoot these kinds of bug is I put echo 'something' in different places in the program and see which one shows and which ones don't. This doesn't always work but it usually does.

 

I've noticed something odd on your site however, the URL always have 2 slashes after the domail and before the catalog i.e.: yourdomain//catalog/product_info.php?...

 

This will not fix your problem but you may want to check it out. Some browsers may not like it.

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