Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

The default title should appear after the individual page title for best SE results. If you want to change the order thougjh, read back in this thread for 2-3 pages. I explain how to do it there.

 

Jack

Thanks, i'll keep it as you suggest, i'll only balls it up otherwise :thumbsup: . In 'Header Tags' 'Text Control' my default descriptions and keywords are not saving the changes i make, the title does though, it seems ok when i click on update but then when i return to that page it is back to the original oscommerce default text, why would this be?

 

Just one more thing, is it possible to make this work with the 'extra pages' contribution installed where the pages don't have individual php files but have urls like http://www.mysite.com/info_pages.php?pages_id=7 AND http://www.mysite.com/info_pages.php?pages_id=8 etc.

 

Thanks again for your help

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

The includes/header_tags.php and includes/languages/english/header_tags.php files need to be changed. Some hosts won't allow a program to change the permissions so that it is why you are sesing the error.

 

Jack

 

I revised categories.php again, and now everything appears to work fine except I get the same message about chmod. What do you mean the above files need to be changed?

 

Thanks.

Link to comment
Share on other sites

Thanks, i'll keep it as you suggest, i'll only balls it up otherwise :thumbsup: .  In 'Header Tags' 'Text Control' my default descriptions and keywords are not saving the changes i make, the title does though, it seems ok when i click on update but then when i return to that page it is back to the original oscommerce default text, why would this be?

 

Just one more thing, is it possible to make this work with the 'extra pages' contribution installed where the pages don't have individual php files but have urls like http://www.mysite.com/info_pages.php?pages_id=7 AND http://www.mysite.com/info_pages.php?pages_id=8 etc.

 

Thanks again for your help

I can't imagine why it would write the title and not the other fields. They are all in the same file so that doesn't make sense. Maybe try replacing the header tags files in admin. If something was changed in them to troubleshoot the problem, it may not have been changed back. Other than that, I'm at a loss.

 

I don't use that contribution so I can't say if it will work or not. You would need to include the code to call the header tags functions in it somehow. If the page it creates is included in a regular page, tehn you can. If it is included as part of a page (like a section on the index page), then you can't.

 

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 revised categories.php again, and now everything appears to work fine except I get the same message about chmod.  What do you mean the above files need to be changed?

 

Thanks.

The original qustion was asking what files needed to have the permissions changed. That is what I was referring to. Some hosts won't allow you to use chmod like I'm doing. So you need to change the permissions of the files yourself so that the chmod call is not needed.

 

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 can't imagine why it would write the title and not the other fields. They are all in the same file so that doesn't make sense.  Maybe try replacing the header tags files in admin. If something was changed in them to troubleshoot the problem, it may not have been changed back. Other than that, I'm at a loss.

 

Jack

I've tried uploading the header_tags file again but unfortunately still no luck, bit strange. Where there is the generic osCommerce description and keywords, is there any way of editing these manually in the php file containing that info, if so i could change it there as it only happens on the default text so may not cause too much of a problem if this is possible?

 

Thanks again for your help

Justin

Link to comment
Share on other sites

The oscommerce package doesn't have those meta tags at all. You need to add them to the files in the root of your shop. Did you edit those files to include the code needed by Header Tags? The admin section can be removed and that part of the contribution will still work. If it is not, there is something wrong with the installtion.

 

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

The oscommerce package doesn't have those meta tags at all. You need to add them to the files in the root of your shop. Did you edit those files to include the code needed by Header Tags?  The admin section can be removed and that part of the contribution will still work. If it is not, there is something wrong with the installtion.

 

Jack

I edited all of the files in the root, but as i'm quite new to this i may have done it wrong, here's an example of one(contact_us.php):

 

<?php
/*
 $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);

$page_query = tep_db_query("select 
                              p.pages_id, 
                              p.sort_order, 
                              p.status, 
                              s.pages_title, 
                              s.pages_html_text
                           from 
                              " . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id 
                           where 
                              p.status = 1
                           and
                              s.language_id = '" . (int)$languages_id . "'
                           and 
                              p.page_type = 2");


$page_check = tep_db_fetch_array($page_query);

 $error = false;
 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) {
   $name = tep_db_prepare_input($HTTP_POST_VARS['name']);
   $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
   $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

   if (tep_validate_email($email_address)) {
     tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);

     tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
   } else {
     $error = true;

     $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
   }
 }

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.4.5
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.4.5
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td class="column" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
        </tr>
<tr>
<td class="main"><?php  echo MY_INFO;  ?></td>  </tr>
      </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 if ($messageStack->size('contact') > 0) {
?>
     <tr>
       <td><?php echo $messageStack->output('contact'); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }

 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
?>
     <tr>
       <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
<?php
 } else {
?>
     <tr>
           <td class="main"><?php echo $page_check[pages_html_text]; ?><br><br></td>
         </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td class="main"><?php echo ENTRY_NAME; ?></td>
             </tr>
             <tr>
               <td class="main"><?php echo tep_draw_input_field('name'); ?></td>
             </tr>
             <tr>
               <td class="main"><?php echo ENTRY_EMAIL; ?></td>
             </tr>
             <tr>
               <td class="main"><?php echo tep_draw_input_field('email'); ?></td>
             </tr>
             <tr>
               <td class="main"><?php echo ENTRY_ENQUIRY; ?></td>
             </tr>
             <tr>
               <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
<?php
 }
?>
   </table></form></td>
<!-- body_text_eof //-->
   <td class="column" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Does this seem ok?

 

Where is the admin getting the description 'What\'s New Here? - Hardware Software DVD Movies' and keywords 'Hardware Software DVD Movies What\'s New Here?' from to add into the text fields?

 

Thanks

Edited by Gordon_Gekko
Link to comment
Share on other sites

The original qustion was asking what files needed to have the permissions changed. That is what I was referring to.  Some hosts won't allow you to use chmod like I'm doing.  So you need to change the permissions of the files yourself so that the chmod call is not needed.

 

Jack

 

 

I misunderstood -- I thought you were indicating that the php files needed to be changed.

 

Thanks for your response.

Link to comment
Share on other sites

In the package that i downloaded i had the instructions to upload some files when installing the admin part including admin/includes/filenames.php, however this wasn't in the package that i have. Might this cause the problem that i'm having where the default descriptions and keywords are not being saved?

 

Thanks

Justin

Link to comment
Share on other sites

I don't see how since you said the title is being changed. However, if you did not edit the filenames file per the instructions then it won't work correctly.

 

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

How would I change the font and size of the Category Title that is generated by the header tag?

 

Thanks,

Will.

You need to change it in the stylesheet where you should have added something like this:

h1 {

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

font-size: 14px;

font-weight: bold;

}

 

Hope this helps

Link to comment
Share on other sites

I installed the whole HeaderTags_V_2.4.5 following all steps.

I can see "HEADER TAGS" in the Admin Panel. Nevertheless, when I click I get a 404 error at this link:

my.com/shop/admin/header_tags_controller.php?selected_box=header%20tags

 

Any ideas why? The rest of the contribution seems to work ok; when adding products I can add all tags, and also in categories. I just seem to be not able to enter the admin part.

 

HELP!

Link to comment
Share on other sites

Hi,

I have manged to install Header Tags Controller v2.4.6 Complete, this is a real good contribution.

 

Just added some Titles and Keywords and Meta Descriptions to a small sample database of 2 or 3 products.

 

But when I view the site I can only see the original heaader I had set with store name on the english.php page

 

Can some one help me here!! Where am I going wrong?

Have I missed out any thing?

 

i did a manual install rather than the auto install.

 

Please help!!!

Regards,

Kunal

Link to comment
Share on other sites

It sounds like you may have missed the code changes in index.php. Does the page title on any of your products change to the proper title?

 

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,

Thanks for this contribution.

It's my first time using this contribution, and I've tried almost ten times to reinstall and follow all the installation procedures carefully, but still kept getting the following error when I click on the link

HEADER TAGS (with submenu Page Control and Text Control) in the administration control panel.

Fatal error: Cannot redeclare changeswitch() (previously declared in /home/wsa/public_html/demo-shopping-cart/admin/includes/functions/header_tags.php:12) in /home/wsa/public_html/demo-shopping-cart/admin/includes/functions/header_tags.php on line 12

 

I've done nothing to the admin/includes/functions/header_tags.php file though, I simply copy it from the contribution zip file to my oscommerce folder (on my webserver).

 

Any help is greatly appreciated!

Thanks in advance.

Regards,

Irwin

Link to comment
Share on other sites

It's not my contibution - I just added some things to it. As for the problem, read back a few pages for the same problem. I don't know what is causing it but you can try the fix I posted.

 

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 sugegest going back through the installation and be sure you make the changes mentioned in the instructions for admin.

 

Jack

 

ok, I did so and now all seems ok in the admin.

 

Only one issue: in all pages where I have done the next step...

Replace the existing two lines in all files that you want to use the Header Tags Controller:

 

Old Lines:

 

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

<title><?php echo TITLE ?></title>

 

 

New Lines:

 

<?php

// BOF: WebMakers.com Changed: Header Tag Controller v2.4.5

// Replaced by header_tags.php

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

<title><?php echo TITLE; ?></title>

<?php

}

// EOF: WebMakers.com Changed: Header Tag Controller v2.4.5

?>

 

 

...Im getting a load of code visible on the HTML. As follows:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

<head>

/*

/catalog/includes/header_tags.php

WebMakers.com Added: Header Tags Generator v2.0

Add META TAGS and Modify TITLE

 

NOTE: Globally replace all fields in products table with current product name just to get things started:

In phpMyAdmin use: UPDATE products_description set PRODUCTS_HEAD_TITLE_TAG = PRODUCTS_NAME

 

Shoppe Enhancement Controller - Copyright © 2003 WebMakers.com

Linda McGrath - [email protected]

*/

 

 

require(DIR_WS_LANGUAGES . $language . '/' . 'header_tags.php');

 

$tags_array = array();

 

// Define specific settings per page:

switch (true) {

// ALLPRODS.PHP

case (strstr($_SERVER['PHP_SELF'],FILENAME_ALLPRODS) or strstr($PHP_SELF,FILENAME_ALLPRODS) ):

$the_category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "'");

$the_category = tep_db_fetch_array($the_category_query);

 

$the_manufacturers_query= tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'");

$the_manufacturers = tep_db_fetch_array($the_manufacturers_query);

 

if (HTDA_ALLPRODS_ON=='1') {

$tags_array['desc']= HEAD_DESC_TAG_ALLPRODS . ' ' . HEAD_DESC_TAG_ALL;

} else {

$tags_array['desc']= HEAD_DESC_TAG_ALLPRODS;

}

 

if (HTKA_ALLPRODS_ON=='1') {

$tags_array['keywords']= HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_ALLPRODS;

} else {

$tags_array['keywords']= HEAD_KEY_TAG_ALLPRODS;

}

 

if (HTTA_ALLPRODS_ON=='1') {

$tags_array['title']= HEAD_TITLE_TAG_ALLPRODS . ' ' . HEAD_TITLE_TAG_ALL . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'];

} else {

$tags_array['title']= HEAD_TITLE_TAG_ALLPRODS;

}

break;

 

// products_all.PHP

case (strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCTS_ALL) or strstr($PHP_SELF,FILENAME_PRODUCTS_ALL) ):

$the_category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "'");

$the_category = tep_db_fetch_array($the_category_query);

 

$the_manufacturers_query= tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'");

$the_manufacturers = tep_db_fetch_array($the_manufacturers_query);

 

if (HTDA_PRODUCTS_ALL_ON=='1') {

$tags_array['desc']= HEAD_DESC_TAG_PRODUCTS_ALL . ' ' . HEAD_DESC_TAG_ALL;

} else {

$tags_array['desc']= HEAD_DESC_TAG_PRODUCTS_ALL;

}

 

if (HTKA_PRODUCTS_ALL_ON=='1') {

$tags_array['keywords']= HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_PRODUCTS_ALL;

} else {

$tags_array['keywords']= HEAD_KEY_TAG_PRODUCTS_ALL;

}

 

if (HTTA_ALLPRODS_ON=='1') {

$tags_array['title']= HEAD_TITLE_TAG_PRODUCTS_ALL . ' ' . HEAD_TITLE_TAG_ALL . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'];

} else {

$tags_array['title']= HEAD_TITLE_TAG_PRODUCTS_ALL;

}

break;

 

// INDEX.PHP

case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT) ):

$the_category_query = tep_db_query("select cd.categories_name, c.category_head_title_tag, c.category_head_desc_tag, c.category_head_keywords_tag from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

$the_category = tep_db_fetch_array($the_category_query);

 

$the_manufacturers_query= tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

$the_manufacturers = tep_db_fetch_array($the_manufacturers_query);

 

$showCatTags = false;

if ($category_depth == 'nested' || ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])))

$showCatTags = true;

 

if (HTDA_DEFAULT_ON=='1') {

if ($showCatTags == true) {

if (HTTA_CAT_DEFAULT_ON=='1') {

$tags_array['desc']= $the_category['category_head_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT . ' ' . HEAD_DESC_TAG_ALL;

} else {

$tags_array['desc']= $the_category['category_head_desc_tag'] . ' ' . HEAD_DESC_TAG_ALL;

}

} else {

$tags_array['desc']= HEAD_DESC_TAG_DEFAULT . ' ' . HEAD_DESC_TAG_ALL;

}

} else {

if ($showCatTags == true) {

if (HTTA_CAT_DEFAULT_ON=='1') {

$tags_array['desc']= $the_category['category_head_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT;

} else {

$tags_array['desc']= $the_category['category_head_desc_tag'];

}

} else {

$tags_array['desc']= HEAD_DESC_TAG_DEFAULT;

}

}

 

if (HTKA_DEFAULT_ON=='1') {

if ($showCatTags == true) {

if (HTTA_CAT_DEFAULT_ON=='1') {

$tags_array['keywords']= $the_category['category_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;

} else {

$tags_array['keywords']= $the_category['category_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_DEFAULT;

}

} else {

$tags_array['keywords']= HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;

}

} else {

if ($showCatTags == true) {

if (HTTA_CAT_DEFAULT_ON=='1') {

$tags_array['keywords']= $the_category['category_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_DEFAULT;

} else {

$tags_array['keywords']= $the_category['category_head_keywords_tag'];

}

} else {

$tags_array['keywords']= HEAD_KEY_TAG_DEFAULT;

}

}

 

if (HTTA_DEFAULT_ON=='1') {

if ($showCatTags == true) {

if (HTTA_CAT_DEFAULT_ON=='1') {

$tags_array['title']= $the_category['category_head_title_tag'] .' '. HEAD_TITLE_TAG_DEFAULT . " " . $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;

} else {

$tags_array['title']= $the_category['category_head_title_tag'] .' '. $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;

}

} else {

$tags_array['title']= HEAD_TITLE_TAG_DEFAULT . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;

}

} else {

if ($showCatTags == true) {

if (HTTA_CAT_DEFAULT_ON=='1') {

$tags_array['title']= $the_category['category_head_title_tag'] . ' ' . HEAD_TITLE_TAG_DEFAULT;

} else {

$tags_array['title']= $the_category['category_head_title_tag'];

}

} else {

$tags_array['title']= HEAD_TITLE_TAG_DEFAULT;

}

}

 

break;

 

// PRODUCT_INFO.PHP

case ( strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCT_INFO) or strstr($PHP_SELF,FILENAME_PRODUCT_INFO) ):

// $the_product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'");

$the_product_info_query = tep_db_query("select pd.language_id, p.products_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'" . " and pd.language_id ='" . $languages_id . "'");

$the_product_info = tep_db_fetch_array($the_product_info_query);

 

if (empty($the_product_info['products_head_desc_tag'])) {

$tags_array['desc']= HEAD_DESC_TAG_ALL;

} else {

if ( HTDA_PRODUCT_INFO_ON=='1' ) {

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

} else {

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

}

}

 

if (empty($the_product_info['products_head_keywords_tag'])) {

$tags_array['keywords']= HEAD_KEY_TAG_ALL;

} else {

if ( HTKA_PRODUCT_INFO_ON=='1' ) {

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

} else {

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

}

}

 

if (empty($the_product_info['products_head_title_tag'])) {

$tags_array['title']= HEAD_TITLE_TAG_ALL;

} else {

if ( HTTA_PRODUCT_INFO_ON=='1' ) {

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

} else {

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

}

}

 

break;

 

 

// PRODUCTS_NEW.PHP

case ( strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCTS_NEW) or strstr($PHP_SELF,FILENAME_PRODUCTS_NEW) ):

if ( HEAD_DESC_TAG_WHATS_NEW!='' ) {

if ( HTDA_WHATS_NEW_ON=='1' ) {

$tags_array['desc']= HEAD_DESC_TAG_WHATS_NEW . ' ' . HEAD_DESC_TAG_ALL;

} else {

$tags_array['desc']= HEAD_DESC_TAG_WHATS_NEW;

}

} else {

$tags_array['desc']= HEAD_DESC_TAG_ALL;

}

 

if ( HEAD_KEY_TAG_WHATS_NEW!='' ) {

if ( HTKA_WHATS_NEW_ON=='1' ) {

$tags_array['keywords']= HEAD_KEY_TAG_WHATS_NEW . ' ' . HEAD_KEY_TAG_ALL;

} else {

$tags_array['keywords']= HEAD_KEY_TAG_WHATS_NEW;

}

} else {

$tags_array['keywords']= HEAD_KEY_TAG_ALL;

}

 

if ( HEAD_TITLE_TAG_WHATS_NEW!='' ) {

if ( HTTA_WHATS_NEW_ON=='1' ) {

$tags_array['title']= HEAD_TITLE_TAG_WHATS_NEW . ' ' . HEAD_TITLE_TAG_ALL;

} else {

$tags_array['title']= HEAD_TITLE_TAG_WHATS_NEW;

}

} else {

$tags_array['title']= HEAD_TITLE_TAG_ALL;

}

 

break;

 

 

// shipping.php

case (strstr($_SERVER['PHP_SELF'],FILENAME_SHIPPING) or strstr($PHP_SELF, FILENAME_SHIPPING));

$tags_array = tep_header_tag_page(HTTA_SHIPPING_ON, HEAD_TITLE_TAG_SHIPPING,

HTDA_SHIPPING_ON, HEAD_DESC_TAG_SHIPPING,

HTKA_SHIPPING_ON, HEAD_KEY_TAG_SHIPPING );

break;

 

// SPECIALS.PHP

case ( strstr($_SERVER['PHP_SELF'],FILENAME_SPECIALS) or strstr($PHP_SELF,FILENAME_SPECIALS) ):

if ( HEAD_DESC_TAG_SPECIALS!='' ) {

if ( HTDA_SPECIALS_ON=='1' ) {

$tags_array['desc']= HEAD_DESC_TAG_SPECIALS . ' ' . HEAD_DESC_TAG_ALL;

} else {

$tags_array['desc']= HEAD_DESC_TAG_SPECIALS;

}

} else {

$tags_array['desc']= HEAD_DESC_TAG_ALL;

}

 

if ( HEAD_KEY_TAG_SPECIALS=='' ) {

// Build a list of ALL specials product names to put in keywords

$new = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and s.status = '1' order by s.specials_date_added DESC ");

$row = 0;

$the_specials='';

while ($new_values = tep_db_fetch_array($new)) {

$the_specials .= clean_html_comments($new_values['products_name']) . ', ';

}

if ( HTKA_SPECIALS_ON=='1' ) {

$tags_array['keywords']= $the_specials . ' ' . HEAD_KEY_TAG_ALL;

} else {

$tags_array['keywords']= $the_specials;

}

} else {

$tags_array['keywords']= HEAD_KEY_TAG_SPECIALS . ' ' . HEAD_KEY_TAG_ALL;

}

 

if ( HEAD_TITLE_TAG_SPECIALS!='' ) {

if ( HTTA_SPECIALS_ON=='1' ) {

$tags_array['title']= HEAD_TITLE_TAG_SPECIALS . ' ' . HEAD_TITLE_TAG_ALL;

} else {

$tags_array['title']= HEAD_TITLE_TAG_SPECIALS;

}

} else {

$tags_array['title']= HEAD_TITLE_TAG_ALL;

}

 

break;

 

 

// PRODUCTS_REVIEWS_INFO.PHP and PRODUCTS_REVIEWS.PHP

case((basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS) or (basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_INFO)):

if ( HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO=='' ) {

if ( HTDA_PRODUCT_REVIEWS_INFO_ON=='1' ) {

$tags_array['desc']= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_DESC_TAG_ALL;

} else {

$tags_array['desc']= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']);

}

} else {

$tags_array['desc']= HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO;

}

 

if ( HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO=='' ) {

if ( HTKA_PRODUCT_REVIEWS_INFO_ON=='1' ) {

$tags_array['keywords']= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_KEY_TAG_ALL;

} else {

$tags_array['keywords']= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']);

}

} else {

$tags_array['keywords']= HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO;

}

 

if ( HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO=='' ) {

if ( HTTA_PRODUCT_REVIEWS_INFO_ON=='1' ) {

$tags_array['title']= ' Reviews: ' . tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']) . HEAD_TITLE_TAG_ALL;

} else {

$tags_array['title']= tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']);

}

} else {

$tags_array['title']= HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO;

}

break;

 

// PRODUCTS_REVIEWS_WRITE.PHP

case((basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_WRITE)):

if ( HEAD_DESC_TAG_PRODUCT_REVIEWS_WRITE=='' ) {

if ( HTDA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {

$tags_array['desc']= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_DESC_TAG_ALL;

} else {

$tags_array['desc']= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']);

}

} else {

$tags_array['desc']= HEAD_DESC_TAG_PRODUCT_REVIEWS_WRITE;

}

 

if ( HEAD_KEY_TAG_PRODUCT_REVIEWS_WRITE=='' ) {

if ( HTKA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {

$tags_array['keywords']= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_KEY_TAG_ALL;

} else {

$tags_array['keywords']= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']);

}

} else {

$tags_array['keywords']= HEAD_KEY_TAG_PRODUCT_REVIEWS_WRITE;

}

 

if ( HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE=='' ) {

if ( HTTA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {

$tags_array['title']= ' Reviews: ' . tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']) . HEAD_TITLE_TAG_ALL;

} else {

$tags_array['title']= tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']);

}

} else {

$tags_array['title']= HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE;

}

break;

 

// about_us.PHP - was default.php

case (strstr($_SERVER['PHP_SELF'],FILENAME_ABOUT_US) or strstr($PHP_SELF, FILENAME_ABOUT_US) ):

$tags_array = tep_header_tag_page(HTTA_ABOUTUS_ON, HEAD_TITLE_TAG_ABOUTUS,

HTDA_ABOUTUS_ON, HEAD_DESC_TAG_ABOUTUS,

HTKA_ABOUTUS_ON, HEAD_KEY_TAG_ABOUTUS );

break;

 

// ALL OTHER PAGES NOT DEFINED ABOVE

default:

$tags_array['desc'] = HEAD_DESC_TAG_ALL;

$tags_array['keywords'] = HEAD_KEY_TAG_ALL;

$tags_array['title'] = HEAD_TITLE_TAG_ALL;

break;

}

 

echo ' <title>' . $tags_array['title'] . '</title>' . "\n";

echo ' <META NAME="Description" Content="' . $tags_array['desc'] . '">' . "\n";

echo ' <META NAME="Keywords" CONTENT="' . $tags_array['keywords'] . '">' . "\n";

echo ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">'."\n";

echo ' <META NAME="Reply-to" CONTENT="' . HEAD_REPLY_TAG_ALL . '">' . "\n";

 

echo '<!-- EOF: Generated Meta Tags -->' . "\n";

?>

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

Link to comment
Share on other sites

Looks like it is loading the english/header_tags.php file. What code are you using in the root files to load the header_tags file?

 

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

Looks like it is loading the english/header_tags.php file. What code are you using in the root files to load the header_tags file?

 

Jack

the following:

<?php

// BOF: WebMakers.com Changed: Header Tag Controller v2.4.5

// Replaced by header_tags.php

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

<title><?php echo TITLE; ?></title>

<?php

}

// EOF: WebMakers.com Changed: Header Tag Controller v2.4.5

?>

Link to comment
Share on other sites

You have probably copied the english/header_tags.php file to includes by mistake. Try replacing includes/header_tags.php with the one from the archive and see if that helps. If not, please post the includes/header_tags.php file here.

 

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

That was excactly the problem. Thanks a lot.

 

I have to say that for the next version of this contribution, someone should simplify the installation INSTRUCTIONS if not the process.

 

Thanks (hope dont have to come back here :huh: )

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