Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

In additional to my post above

I checked source code for a page with the tags and without

 

Correct page has:

<head>

<title>my Title</title>

<meta name="Description" content="my content " />

<meta name="Keywords" content="my keywords " />

 

The mentioned pages on 3-rd language also have tags in source code but it is not displaying in a browser and html code color is diferent

<head>

<title>my Title</title>

<meta name="Description" content="my content " />

<meta name="Keywords" content="my keywords " />

 

I still don't understand source of this bug, please advice

There must a header_tags.php file in each language directory you want to use. So go to includes/languages/XXX/, where XXX is the language that's failing and open the header_tags.php file. If it is valid, then it is something else in the shop. There are also other changes needed for the various languages but if you missed those, they wouldn't cause this problem.

 

Jack

Share this post


Link to post
Share on other sites
There must a header_tags.php file in each language directory you want to use. So go to includes/languages/XXX/, where XXX is the language that's failing and open the header_tags.php file. If it is valid, then it is something else in the shop. There are also other changes needed for the various languages but if you missed those, they wouldn't cause this problem.

 

Jack

 

Thanks Jack for advice, but my includes/languages/XXX/header_tags.php on server in all languages are simple copy of the same file form contibution folder includes/languages/english/

I may be not clear with information in my above posts but my OSC shop is not failing to open the languages/XXX/header_tags.php file in all languages.

But with 3-rd language it opens it different as I understand from the source code

 

Source code:

<head>

<title>It is my OSC shop</title>

<meta name="Description" content="we sale here products " />

<meta name="Keywords" content="video, dvd, films" />

 

This way <title> and <meta name="Description" are not readable by a browser

 

I searched the topic and found that the problem with getting tags if language is not english was discussed but I haven't found a posted solution

 

May it be the problem with encoding?

I use 'ru_RU.cp1251', 'en_US.ISO_8859-1' and 'et_EE.ISO_8859-1'

Problem is only with last one.

 

Still looking for help

 

Sergei

Share this post


Link to post
Share on other sites

I have noticed that the header tags are not being correctly used in pages added using the 'add new page' function. The code is correctly added to the /includes/languages/english/header_tags.php file as in the example shown below, but I only ever get the default tags. I've looked through the code but can't work out what is going wrong, can anybody help?

 

// limited_editions.php

define('HTTA_LIMITED_EDITIONS_ON','1');

define('HTDA_LIMITED_EDITIONS_ON','0');

define('HTKA_LIMITED_EDITIONS_ON','0');

define('HEAD_TITLE_TAG_LIMITED_EDITIONS','- Limited Editions');

define('HEAD_DESC_TAG_LIMITED_EDITIONS','');

define('HEAD_KEY_TAG_LIMITED_EDITIONS','');

Share this post


Link to post
Share on other sites
I have noticed that the header tags are not being correctly used in pages added using the 'add new page' function. The code is correctly added to the /includes/languages/english/header_tags.php file as in the example shown below, but I only ever get the default tags. I've looked through the code but can't work out what is going wrong, can anybody help?
Be sure there is a section of code for that page in includes/header_tags.php and the FILENAME on the page is correct. Also be sure the header_tags code is in the head section of the new page.

 

Jack

Share this post


Link to post
Share on other sites
There must a header_tags.php file in each language directory you want to use. So go to includes/languages/XXX/, where XXX is the language that's failing and open the header_tags.php file. If it is valid, then it is something else in the shop. There are also other changes needed for the various languages but if you missed those, they wouldn't cause this problem.

 

Jack

 

Here is a link to the site having problems I posted above

Website with title tag problem

 

Look what a index page display no title tag in browser but tag is in source code.

Pages where contribution is not applyed to the header have no problems with title tag to display

 

Also noted what on product_info page in Description and Keywords content there is no space between text product tags and text category tag. Where to adjust it?

 

Thanks

Sergei

Share this post


Link to post
Share on other sites
Be sure there is a section of code for that page in includes/header_tags.php

 

Thanks Jack. I checked and that is where the problem is, must be something to do with the permissions thing. I checked with my host and it seems that the osCommerce app is not the owner of the files and that is probably where the problem lies.

 

I will just clone the sections of code for now but I really could do with finding a solution to the permissions.

 

Ian

Share this post


Link to post
Share on other sites
Hi, I am looking for a little help. I installed HTC and I thought all was well, but when I finished I got an error message

 

Fatal error: Cannot redeclare tep_get_header_tag_products_title() (previously declared in /home/ganydire/public_html/includes/functions/header_tags.php:7) in /home/ganydire/public_html/includes/functions/header_tags.php on line 7

In includes/application_top.php, try changing the line
require(DIR_WS_FUNCTIONS . 'header_tags.php');

to

require_once(DIR_WS_FUNCTIONS . 'header_tags.php');

 

Jack

Share this post


Link to post
Share on other sites
Also noted what on product_info page in Description and Keywords content there is no space between text product tags and text category tag. Where to adjust it?

 

Thanks

Sergei

Solved:

 

in header_tags.php v.2.6.3 description tags format is

 

['products_head_desc_tag']['cat_name'] - HEAD_DESC_TAG_PRODUCT_INFO HEAD_DESC_TAG_ALL

 

for example if

['products_head_desc_tag'] – aaaaa aaaaa

['cat_name'] – bbbbb bbbbb

 

The above code gives html output - aaaaa aaaaabbbbb bbbbb ...

 

From my point of view it should be improved to have space or dash between ['products_head_desc_tag'] and ['cat_name']

 

header_tags.php

change line 143

from

$tags_array['desc']= $the_product_info['products_head_desc_tag'].;

to

$tags_array['desc']= $the_product_info['products_head_desc_tag']. ' - ';

 

Don’t know how all above are important for description tags but the same problem is in format of Keywords tags and I think it is important because now it joins ['products_head_keywords_tag'] with ['cat_name'] in html output

 

 

To place comma between

['products_head_keywords_tag']['cat_name']

 

change line 166

from

$tags_array['keywords']= $the_product_info['products_head_keywords_tag'];

to

$tags_array['keywords']= $the_product_info['products_head_keywords_tag']. ' , ';

 

These mods works for me but may need to add code somewhere in the header_tags.php else

Please check me.

 

Sergei

Share this post


Link to post
Share on other sites

Ok everyone..................I have looked through all of the "ERROR" related posts on this topic and tried everything mentioned ( changed all related permissions including the images folder to match all header_tags.php folders in all languages as well as commented out the referred code in the other file, and tried a variety of different possibilities for permissions ) all to no avail. I have contacted my hosting service and made damn sure I was using the permissions properly but......................

 

I am still getting the errors in the following:

 

in the admin - Header tag Area I do not get an error in the fill tags screen,

 

but when I go to the text control screen I get the following error:

 

Error Permissions settings for the /html/catalog/includes/languages/english/header_tags.php file appear to be incorrect. Change to 755

 

 

 

And in the page control screen I get both of these errors:

 

Permissions settings for the /html/catalog/includes/header_tags.php file appear to be incorrect. Change to 755

Error Permissions settings for the /html/catalog/includes/languages/english/header_tags.php file appear to be incorrect. Change to 755.

 

I am sure it is due to my own neglect but I just cannot seem to find what I did wrong. I have checked and re-checked everything that I did but ARRRRRGH!!!!

 

 

Please be so kind as to offer some help.

 

Cheers,

 

David

Share this post


Link to post
Share on other sites

I have now commented out the code in the header_tags_controller and header_tags_english.php files and the errors went away.

 

I think I finally have this thing working!!!!

 

What a great contrib!!!!

 

Will this slight mode that was recommended to rid the errors make ANY difference in the operation or security of the site?

 

Cheers,

 

David

Share this post


Link to post
Share on other sites
... If it is valid, then it is something else in the shop. There are also other changes needed for the various languages but if you missed those, they wouldn't cause this problem.

 

Jack

Jack, you were right!

I found bug! Actually it is strange for me that my shop have been working with this bug fine for many months and that is why I hadn't noted it

I had my catalog/languages/3-rd language file

 

define('HTML_PARAMS','dir="LTR" lang="et');

 

but it should be

define('HTML_PARAMS','dir="LTR" lang="et"');

 

both IE and Firefox didn't pay attention to the missing " and gave correct language html ouput for pages and recognised bug in title tag with ET language only.

 

Many thanks for contribution!

Sergei

Share this post


Link to post
Share on other sites

Hi,

I am new here, my name is leo.

I have installed headertags, when I fill in all the fields at the enter new products page in admin. all the tags are nicely implemented on the pages. when I want to edit the same product, open it in admin, the header tag field are all empty.

Where should I have to look to solve this problem.

 

I am running:

 

oscommerce-2.2ms2-060817

 

Contribs:

email order

tinymce

image magic

header tags

STS

insert html

 

Thank you for your advices.

Regards,

Leo

Share this post


Link to post
Share on other sites
Hi,

I am new here, my name is leo.

I have installed headertags, when I fill in all the fields at the enter new products page in admin. all the tags are nicely implemented on the pages. when I want to edit the same product, open it in admin, the header tag field are all empty.

Where should I have to look to solve this problem.

 

I am running:

 

oscommerce-2.2ms2-060817

 

Contribs:

email order

tinymce

image magic

header tags

STS

insert html

 

Thank you for your advices.

Regards,

Leo

The problem would be in the admin/categories.php file. There is one included with the contribution that you can use to test and compare against to find the problem.

 

Jack

Share this post


Link to post
Share on other sites
The problem would be in the admin/categories.php file. There is one included with the contribution that you can use to test and compare against to find the problem.

 

Jack

 

Hi Jack thamk you for your quick response, I heva found that Tinymce is corrupting the header tag code in The admin/catagories.php

<!-- HTC BOC //-->
<?php
   for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
         <tr>
           <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
           <td><table border="0" cellspacing="0" cellpadding="0">
               <tr>
               <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>
               <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', '[b]mceEditor'[/b],  (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>
               </tr></table></td>
         </tr>

<?php
   }
?>

 

Also ? stripslashes has been removed. Above is part of the code wich you could find by seaching TEXT_PRODUCTS_DESCRIPTION about line 518 (install instruction)

 

Do I have a big problem now? What coud be the solution?

Regards,

Leo

Share this post


Link to post
Share on other sites

I'm not familiar with getting tinymce to work in that way so I can't help you with that. Asking in the support thread for whatever contribution you are using may help though.

 

Jack

Share this post


Link to post
Share on other sites

I would love to say I have read this entire thread but sorry 220 pges?

 

Anyway I have installed this and am just having one issue, everything goes fine until I get to the admin.

 

I install the files (as a clean install) and when I try to load the admin I get:

 

"The requested URL /admin/FILENAME_LOGIN was not found on this server."

 

I have probably missed something but cant figure out what or where!


Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites
I would love to say I have read this entire thread but sorry 220 pges?

 

Anyway I have installed this and am just having one issue, everything goes fine until I get to the admin.

 

I install the files (as a clean install) and when I try to load the admin I get:

 

"The requested URL /admin/FILENAME_LOGIN was not found on this server."

 

I have probably missed something but cant figure out what or where!

This came up several times a few pages back. I believe it was because the shop was RC1 and the filename file had been overwritten, or something like that.

 

Jack

Share this post


Link to post
Share on other sites

Hello.

 

I have just installed this awesome contribution (v2.6.3) on my site and everything seems to be working except that any information that I enter in the product_info in the admin Header Tags English does not show in the source code of any of my product info website. If all the boxes are unchecked the source page shows:

 

<title>Product Title Name</title>

<meta name="Description" content="Product Title Name" />

<meta name="Keywords" content="Product Title Name" />

 

Even though the information I have entered in the Title, Description and Keywords are completely different. I have played around with the boxes and the only difference is that the Default information is added to each respective field depending on which box is checked.

 

I've read some of the pages back on the forum, but after a couple of hours I decided to just ask for help. So, if this issue has already been covered I apologize. I'd appreciate some enlightment on this issue or just point me in the right direction (post# or page#).

 

Last, but not least, Thank you Jack for this great contribution!

 

Regards,

 

ski

Share this post


Link to post
Share on other sites

OK...........

 

I had everything working ................. I thought, but

 

No matter what I put in the INDEX title section and check the "HTTA" box ...................

 

I only get what is listed in the Default title section unless I put nothing in the default title section, in which case I get the regular path listed in the URL address bar.

 

Any thoughts on this??????

 

Contributions on my site are:

 

HTC

Add Buttons to Shopping Cart

Pop-up Estimated Shipping

Show Sub-Categories

Graphical Borders

LoginBox Best

Auto Update Currency Exchange Rate

Edited by diyAUDIOsupply

Share this post


Link to post
Share on other sites

FM & David - Be sure to run fill tags. If it still fails, try using the included includes/header_tags.php and english/header_tags.php files to see if it works.

 

Jack

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

Jack,

 

Thanks for the quick reply. I ran the fill tags (again) and I still get the same response.

 

I will try to use the files you recommend and see if that works for me.

 

Cheers,

 

David

Share this post


Link to post
Share on other sites
FM & David - Be sure to run fill tags. If it still fails, try using the included includes/header_tags.php and english/header_tags.php files to see if it works.

 

Jack

 

Jack, thank you for the quick response. I did try that but it did not work. I spent a few hours in the database instead and changed every product's HT there. A lot of work, but I'm sure it will pay off in the end.

 

Thank you again for this great contribution.

 

ski

Share this post


Link to post
Share on other sites

Ok........

 

I had everything working great again Jack and then I installed UltraPics w/Lighted Boxes contrib and I lost the ability to modify the tags information on my catalog products page in admin.

 

I know the foul up must be in the admin/categories.php file, it is the one that shares modifications with both contribs, so I tried first to merge the file provided in UltraPics............ that didn't work.

Then I tried merging the opposite direction and that didn't work either.

 

So then I spent the better half of the afternoon cutting and pasting the HTC admin/categories.php info into the file provided with UltraPics and still no love.

 

It must be a relatively simple fix but now I am at a loss as to what to do next.

 

Any suggestions from anyone out there who might know or has had similar problems.

 

Cheers,

 

David

Share this post


Link to post
Share on other sites
Look in the products edit page in admin. If the header tags title is still there, then look in Text Control to make if the HTTA box for products is set (try unchecking it). The last thing would be that the code in the products_info.php file somehow changed.

 

Jack

Jack,

I am having the same problem. I recently had to rebuild my entire website and install all modules fresh. My product tags and descriptions are all filled in but they all show up as the Default Title Tag and Description. I have tried each of your suggestions above. I also have tried using the fill all tags section (I asked it to limit the number of characters in the description and it did that, so I know this function works). However, the source still shows the default tags. The code in the products_info.php has not changed. I have tried checking and unchecking the boxes in Text Control page.

What's next?

Thanks,

Carol Ann

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  

×