Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

Hello everyone,

 

I use the latest HTC release along with STS v4.1. I have few questions about setting up and using HTC.

 

1. In my admin side, when I create either, new category or new product, I have Header Tags Category Description fields twice for each language, once as Header Tags Category Description listed four times and second time as Header Tags Categories Description also listed four times with wider fields to enter text. Is it how it suppose to be or it's something wrong with my code?

 

2. If I create a new page and enter special meta tags for that page through admin/Header Tags Page Control, the meta tags still remain default if I look at the page from the catalog side, even though they are saved correctly in admin/Header Tags Text Control. I tried to enter my special meta tags to english/header_tags.php and any other languages manually, but they don't change and still are default doesn't matter what I'm trying to do. What's the problem?

 

3. The option Header Tags - Fill Tags in admin side is for entering meta tags for CATEGORIES, MANUFACTURERS, and PRODUCTS only? What about the rest of the files, such as contact_us.php, about_us.php, etc? I also tried to fill in the meta tags for my other three languages by selecting a different language every time and then clicking Update, but it doesn't fill any meta tags in my language files except for English. Is there a support for additional languages or just English, which means I need to enter all the meta tags to my language files manually?

 

4. For my index file, the default meta tags are used automatically. However, the problem is that the title is displayed with the dash ( - ) in front of it, like: <title> - Company: The Solution Expert</title>. How can I remove that dash? I don't see it anywhere, not in my english/header_tags.php neither in admin/Header Tags Text Control. Where can I find it to remove it?

 

Any help would be greatly appreciated. Thanks in advance.

Share this post


Link to post
Share on other sites

Hi I just uploaded all the files from HeaderTags_V_2.5.9\Database_Files into my public_html folder as the instructions suggested, tried to go to the address suggested by the Read Me First document and came up with this error:

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@everything-asian.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

 

What did I do wrong or what do I have to change now????

Share this post


Link to post
Share on other sites

I also just tried to upload using phpMyAdmin and got the following error:

 

Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

 

ERROR: Unknown Punctuation String @ 1

STR: <?

SQL: <?php

/*

$Id: database_setup.php, v 2.5.7 by Jack York 12-04-04

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

 

 

SQL query:

 

 

MySQL said:

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php

 

require('includes/application_top.php')' at line 1

 

 

Did I do something wrong????

Share this post


Link to post
Share on other sites
I just can't find those fragmets of code to replace them with =(

3 posts above is the whole body of index.php... But nobody to point.

It's lightly modified version of 2.2 MS2 (for design and usability purposes).

I'm not a novice in fact but it's too hard for me

Please, tell me if it's possible to include HTC in my current index.php.

Thanks in advance, Jack!

There's no way for me to answer that not being familiar with your files. The code for header tags can be added to any shop. However, I have seen some index pages where header tags wouldn't work because it would ruin the design of the template if the code was added. But if you don't add that code, the majority of header tags will still work. The title and meta tags for the index page and all of the products.So it would still be worth the effort, in my opinion.

 

Jack

Share this post


Link to post
Share on other sites
Hello everyone,

 

I use the latest HTC release along with STS v4.1. I have few questions about setting up and using HTC.

 

1. In my admin side, when I create either, new category or new product, I have Header Tags Category Description fields twice for each language, once as Header Tags Category Description listed four times and second time as Header Tags Categories Description also listed four times with wider fields to enter text. Is it how it suppose to be or it's something wrong with my code?

 

2. If I create a new page and enter special meta tags for that page through admin/Header Tags Page Control, the meta tags still remain default if I look at the page from the catalog side, even though they are saved correctly in admin/Header Tags Text Control. I tried to enter my special meta tags to english/header_tags.php and any other languages manually, but they don't change and still are default doesn't matter what I'm trying to do. What's the problem?

 

3. The option Header Tags - Fill Tags in admin side is for entering meta tags for CATEGORIES, MANUFACTURERS, and PRODUCTS only? What about the rest of the files, such as contact_us.php, about_us.php, etc? I also tried to fill in the meta tags for my other three languages by selecting a different language every time and then clicking Update, but it doesn't fill any meta tags in my language files except for English. Is there a support for additional languages or just English, which means I need to enter all the meta tags to my language files manually?

 

4. For my index file, the default meta tags are used automatically. However, the problem is that the title is displayed with the dash ( - ) in front of it, like: <title> - Company: The Solution Expert</title>. How can I remove that dash? I don't see it anywhere, not in my english/header_tags.php neither in admin/Header Tags Text Control. Where can I find it to remove it?

 

Any help would be greatly appreciated. Thanks in advance.

1 - Sounds like a mistake was made in the admin/categories.ph file. Try using the one from the contribution to see if that clears up the problem.

 

2 - By default, do you mean the Header Tags default ones or the shops default title? If the latter, then you didn't install the Header Tags code into the new file.

 

3 - There is no way to fill in title and meta tag information for pages like index.php with fill tags since there is nothing to use as a source on those pages. The title and meta tags for those pages are filled in with Page Control. If you copyt the language files for admin and then switch to a different language, the text you enter for those pages should be saved in that other language. That is the standard way admin works. I hadn't thought of putting a language selector on Page Control but it is probably a good idea.

 

4 - The dash is in the includes/header_tags.php file.

 

Jack

Share this post


Link to post
Share on other sites
I also just tried to upload using phpMyAdmin and got the following error:

 

Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

 

ERROR: Unknown Punctuation String @ 1

STR: <?

SQL: <?php

/*

$Id: database_setup.php, v 2.5.7 by Jack York 12-04-04

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

SQL query:

MySQL said:

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php

 

require('includes/application_top.php')' at line 1

Did I do something wrong????

Yes. It appears you tried to upload a php file. If using phpmyadmin, you need to upload the header.sql file.

 

Jack

Share this post


Link to post
Share on other sites

I changed the headings coulers in the style sheet as kan be seen below but the H1 headers dont change on the web page can anyone tell me why..

 

thanks in advance

 

//header tags controller

h1 {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

font-weight: bold;

color: #FF8080;

}

 

h2 {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

color: #FF8080;

}

Share this post


Link to post
Share on other sites

Did you change the code in the index and product_info pages so that that class is used?

 

Jack

Share this post


Link to post
Share on other sites

Jack,

 

I am trying to install the latest version on my new site. I already have ultimate SEO urls installed so I have a conflict on product_info.php

 

I am supposed to replace my title info with this:

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

I already have code installed here for SEO urls that I would like to leave intact. If I leave this part of header tags out, will I still get my Header tag keywords and descriptions? This code is dealing with the title, but it looks like it is requiring header tags file so I am not sure if I can leave this out.

 

Tim

Share this post


Link to post
Share on other sites
1 - Sounds like a mistake was made in the admin/categories.ph file. Try using the one from the contribution to see if that clears up the problem.

 

2 - By default, do you mean the Header Tags default ones or the shops default title? If the latter, then you didn't install the Header Tags code into the new file.

 

3 - There is no way to fill in title and meta tag information for pages like index.php with fill tags since there is nothing to use as a source on those pages. The title and meta tags for those pages are filled in with Page Control. If you copyt the language files for admin and then switch to a different language, the text you enter for those pages should be saved in that other language. That is the standard way admin works. I hadn't thought of putting a language selector on Page Control but it is probably a good idea.

 

4 - The dash is in the includes/header_tags.php file.

 

Jack

Thanks for your reply, Jack. I compared my admin/categories.php with the one provided with the contribution. The only I can see that might be doubtful is the code below where Description listed twice. This code has been taken from the original file provided by contribution.

// HTC BOC

$category_htc_title_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . tep_draw_input_field('categories_htc_title_tag[' . $languages[$i]['id'] . ']');

$category_htc_desc_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . tep_draw_input_field('categories_htc_desc_tag[' . $languages[$i]['id'] . ']');

$category_htc_keywords_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . tep_draw_input_field('categories_htc_keywords_tag[' . $languages[$i]['id'] . ']');

$category_htc_description_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . tep_draw_textarea_field('categories_htc_description[' . $languages[$i]['id'] . ']', 'hard', 30, 5, '');

// HTC EOC

}

 

$contents[] = array('text' => '<br>' . TEXT_CATEGORIES_NAME . $category_inputs_string);

$contents[] = array('text' => '<br>' . TEXT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image'));

$contents[] = array('text' => '<br>' . TEXT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', '', 'size="2"'));

// HTC BOC

$contents[] = array('text' => '<br>' . 'Header Tags Category Title' . $category_htc_title_string);

$contents[] = array('text' => '<br>' . 'Header Tags Category Description' . $category_htc_desc_string);

$contents[] = array('text' => '<br>' . 'Header Tags Category Keywords' . $category_htc_keywords_string);

$contents[] = array('text' => '<br>' . 'Header Tags Categories Description' . $category_htc_description_string);

// HTC EOC

$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');

break;

case 'edit_category':

$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</b>');

 

$contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field('categories_id', $cInfo->categories_id));

$contents[] = array('text' => TEXT_EDIT_INTRO);

 

$category_inputs_string = '';

$languages = tep_get_languages();

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

$category_inputs_string .= '<br>' . 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'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id']));

// HTC BOC

$category_htc_title_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . tep_draw_input_field('categories_htc_title_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_title($cInfo->categories_id, $languages[$i]['id']));

$category_htc_desc_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . tep_draw_input_field('categories_htc_desc_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_desc($cInfo->categories_id, $languages[$i]['id']));

$category_htc_keywords_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . tep_draw_input_field('categories_htc_keywords_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_keywords($cInfo->categories_id, $languages[$i]['id']));

$category_htc_description_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . tep_draw_textarea_field('categories_htc_description[' . $languages[$i]['id'] . ']', 'hard', 30, 5, tep_get_category_htc_description($cInfo->categories_id, $languages[$i]['id']));

// HTC EOC

}

 

$contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string);

$contents[] = array('text' => '<br>' . tep_image(DIR_WS_CATALOG_IMAGES . $cInfo->categories_image, $cInfo->categories_name) . '<br>' . DIR_WS_CATALOG_IMAGES . '<br><b>' . $cInfo->categories_image . '</b>');

$contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image'));

$contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"'));

// HTC BOC

$contents[] = array('text' => '<br>' . 'Header Tags Category Title' . $category_htc_title_string);

$contents[] = array('text' => '<br>' . 'Header Tags Category Description' . $category_htc_desc_string);

$contents[] = array('text' => '<br>' . 'Header Tags Category Keywords' . $category_htc_keywords_string);

$contents[] = array('text' => '<br>' . 'Header Tags Categories Description' . $category_htc_description_string);

// HTC EOC

I think this is the reason I have Header Tags Category Description fields listed twice in my admin/categories. That's all came from the original categories file provided by contribution. Is this correct?

 

2. When I create a template for a new page, I use <!--$headcontent--> in the header of my newpage.php.html file as described by STS. Although, my store's default meta tags display instead of my new page's special meta tags. What else I'm doing wrong?

 

3. So, what you're saying is that meta tags suppose to be filled for all languages. Is this correct? And what did you mean by saying: "If you copyt the language files for admin and then switch to a different language, the text you enter for those pages should be saved in that other language."? What language files should I copy into admin? I thought that Header Tags - Fill Tags updates meta tags in catalog language files, but it not. Are we on the same topic?

 

4. I removed dash from the includes/header_tags.php file. Thanks.

 

Thanks a lot for helping me out.

Share this post


Link to post
Share on other sites
Jack,

 

I am trying to install the latest version on my new site. I already have ultimate SEO urls installed so I have a conflict on product_info.php

 

I am supposed to replace my title info with this:

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

I already have code installed here for SEO urls that I would like to leave intact. If I leave this part of header tags out, will I still get my Header tag keywords and descriptions? This code is dealing with the title, but it looks like it is requiring header tags file so I am not sure if I can leave this out.

 

Tim

Ultimate SEO doesn't change the product_info file so I'm not sure what you are looking at. But yo udon't want to leave that Header Tags code out of the product_info file. That would render the contribution almost useless.

 

Jack

Share this post


Link to post
Share on other sites
Thanks for your reply, Jack. I compared my admin/categories.php with the one provided with the contribution. The only I can see that might be doubtful is the code below where Description listed twice. This code has been taken from the original file provided by contribution.

I think this is the reason I have Header Tags Category Description fields listed twice in my admin/categories. That's all came from the original categories file provided by contribution. Is this correct?

 

2. When I create a template for a new page, I use <!--$headcontent--> in the header of my newpage.php.html file as described by STS. Although, my store's default meta tags display instead of my new page's special meta tags. What else I'm doing wrong?

 

3. So, what you're saying is that meta tags suppose to be filled for all languages. Is this correct? And what did you mean by saying: "If you copyt the language files for admin and then switch to a different language, the text you enter for those pages should be saved in that other language."? What language files should I copy into admin? I thought that Header Tags - Fill Tags updates meta tags in catalog language files, but it not. Are we on the same topic?

 

4. I removed dash from the includes/header_tags.php file. Thanks.

 

Thanks a lot for helping me out.

1 - The description isn't being listed twice in that code. One is Category Description and the other is Categories Description.

 

2 - I don't use STS so I can't help you. You should ask in the support thread for STS.

 

3 - If you look in the contribution files, you will see files in the english directory. If you want to you German, for example, you need to copy those files to the german directory. Fill Tags fills in the database, not files. The other pages are kept in the files.

 

Jack

Share this post


Link to post
Share on other sites
Ultimate SEO doesn't change the product_info file so I'm not sure what you are looking at. But yo udon't want to leave that Header Tags code out of the product_info file. That would render the contribution almost useless.

 

Jack

Hmmm. I figured that would be the case. If this is not from SEO urls, then I have no idea why my file has this in the title section.

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?> - <?php echo $products_name; ?></title>

My code has the products name echoed in the title. I know this is my website and I feel stupid asking, but are you familiar with a mod that would add this code?

<?php echo $products_name; ?>

Share this post


Link to post
Share on other sites

Google is your friend.

google is your friend.

I am trying to remeber that.

I found the mod: Show Product Name In Page Title

just by typing the code into google. Makes it real easy now to uninstall that one

 

Thanks for the help Jack.

Share this post


Link to post
Share on other sites

I finally installed everything. Seems to be working correctly on catalog side.

2 small problems on admin side. Fill tags works, but not page or text control.

I had to change the code on the file here:

catalog/admin/includes/functions/header_tags.php as directed in the install for the operation not permitted error. Now I get a 'file not writable' when trying to use page or text control. The default permissions on the named files was 644. I tried 777 and also 755. Neither setting will allow me to use the admin functions of text or page control to update the information.

Here is the exact text of the error

The file isn't writable

and it references this page:

https://mysite/admin/header_tags_english.php

 

Please give me a little nudge on this one,

 

Tim

Share this post


Link to post
Share on other sites

Header Tags only writes to the includes/header_tags.php and includes/lanugages/english/header_tags.php files so that error doesn't make any sense to me. I can't even think of anything to suggest.

 

Jack

Share this post


Link to post
Share on other sites
Header Tags only writes to the includes/header_tags.php and includes/lanugages/english/header_tags.php files so that error doesn't make any sense to me. I can't even think of anything to suggest.

 

Jack

Thanks for the reply Jack.

 

I googled for awhile and finally I decided to re-upload all the new header tags files. Changed permissions on the 2 indicated in the instructions. Now page control and text control and fill tags are all working. There must have been a corrupt file on the first go round.

 

As long as it took me to install this one, I can't imagine how long it took to create it. Nice work!

 

Tim

Share this post


Link to post
Share on other sites
1 - The description isn't being listed twice in that code. One is Category Description and the other is Categories Description.

 

2 - I don't use STS so I can't help you. You should ask in the support thread for STS.

 

3 - If you look in the contribution files, you will see files in the english directory. If you want to you German, for example, you need to copy those files to the german directory. Fill Tags fills in the database, not files. The other pages are kept in the files.

 

Jack

Ok, so what's the difference between Category Description and Categories Description? I can put my category description into Category Description fields but what should I put into Categories Description fields? I think Categories Description is just useless. May be I'm wrong.

 

Thanks.

Share this post


Link to post
Share on other sites

hi jack,

 

i am stil facing trouble to get it to look into the sub-directories. :'(

 

i want to be able to add title , desc and keyowrds for pages not only in the root:

 

www.site.com/catalog

 

but also for pages under

 

www.site.com/catalog/fiolder/file.php

 

how do i make it to look into those pages as well. thanks for any help :(

Share this post


Link to post
Share on other sites
Ok, so what's the difference between Category Description and Categories Description? I can put my category description into Category Description fields but what should I put into Categories Description fields? I think Categories Description is just useless. May be I'm wrong.

 

Thanks.

One is for the meta description and one is for the description on the category page in the sub-heading.

 

Jack

Share this post


Link to post
Share on other sites
hi jack,

 

i am stil facing trouble to get it to look into the sub-directories. :'(

 

i want to be able to add title , desc and keyowrds for pages not only in the root:

 

www.site.com/catalog

 

but also for pages under

 

www.site.com/catalog/fiolder/file.php

 

how do i make it to look into those pages as well. thanks for any help :(

If the file is setup properly and can be seen by the standard oscommerce code, then you just need to add it to admin->Header Tags->Page Control.

 

Jack

Share this post


Link to post
Share on other sites
If the file is setup properly and can be seen by the standard oscommerce code, then you just need to add it to admin->Header Tags->Page Control.

 

Jack

 

in the "Check Missing Pages" , i did not find it.

 

--------------

 

add in the "Add a New page" as

 

newfile.php, in the text control it shows the file as not found. (red coloured)

 

-----------

 

adding the new file as

 

folder/newfile.php,

 

by this way although it doesn't tell anything that the file not found, but doesn't change anything too!

 

 

so what should i do

Share this post


Link to post
Share on other sites

If it is not in Check Missing Pages in Page Control and it is red in Text Control, that means the code for Header Tags cannot be found in that file. You should verify you have added the code to the file. Once there, it should at least show up in admin properly.

 

Jack

Share this post


Link to post
Share on other sites
If it is not in Check Missing Pages in Page Control and it is red in Text Control, that means the code for Header Tags cannot be found in that file. You should verify you have added the code to the file. Once there, it should at least show up in admin properly.

 

1. i have the coded added, just like the other pages in the root

 

2. it's not in check missing pages bcoz it may be defined to look only in the main catalog directory. :'(

 

3. same for showing up red in text xontrol. if i add

 

file.php, it will show up in red bcoz it's looking for that in the root, that's it.

 

but when adding as

 

folder/file.php, althouh it doesn't show in red, no changes are made either

 

:'(

Share this post


Link to post
Share on other sites

Ahoy everybody! I have a new problem here that I would appreciate some help with.

 

I installed Header Tags Controller but am running into a problem with the product information. When I attempt to save the product information, including manufacturer, price, meta tags, etc, it saves everything EXCEPT for the meta tags.

 

Now I really have no idea of where to get started on this, so I was hoping this error was encountered before and there is a workaround.

 

Any help would be more than appreciated!

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  

×