Loaded Commerce Community

Banner


Board index » Loaded Commerce Support » Feedback

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Header Tags Controller is very old and doesn't work.
PostPosted: Sat Sep 06, 2008 5:08 pm 
Offline
CRE Freak
User avatar

Joined: Sun May 18, 2008 11:29 pm
Posts: 41
Well, I like 6.2[13(SP1)] version which I installed.

Still, it has very old Header Tags Controller (version 2.0) and it is awkward and doesn't work as should. I am trying to find any help how to fix it and only some members are willing to help, but not a CRE loaded stuff. It looks like they don't care :(


Top
 Profile  
 
 Post subject: Re: Header Tags Controller is very old and doesn't work.
PostPosted: Tue Sep 16, 2008 6:38 pm 
Offline
CRE Talented
User avatar

Joined: Tue Aug 16, 2005 12:00 am
Posts: 382
Location: India
Gamer wrote:
Well, I like 6.2[13(SP1)] version which I installed.

Still, it has very old Header Tags Controller (version 2.0) and it is awkward and doesn't work as should. I am trying to find any help how to fix it and only some members are willing to help, but not a CRE loaded stuff. It looks like they don't care :(
in creloaded
catalog/includes/header_tags.php is the file.

Replace with the one in tha latest release.

Satish

_________________
Satish Mantri.
expert in CREloaded,osCommerce.
Payment Gateways-Shipping-Order total-Template Integration.
www.oscprofessionals.com


Top
 Profile  
 
 Post subject: Re: Header Tags Controller is very old and doesn't work.
PostPosted: Tue Sep 16, 2008 9:44 pm 
Offline
CRE Freak
User avatar

Joined: Sun May 18, 2008 11:29 pm
Posts: 41
Satish,
As probably you noticed, I have the latest 6.2[13(SP1)].
If you are giving advice to download the latest version of the file or patch,
please, be so kind to give more info where it can be downloaded.
Also, I don't think that changing only one file will make a difference. I am sure that it will require more than one file to be updated and some change in a database.

Please do not mislead me and anybody else.

Thanks for trying to help, though.


Top
 Profile  
 
 Post subject: Re: Header Tags Controller is very old and doesn't work.
PostPosted: Wed Sep 17, 2008 4:01 am 
Offline
CRE Talented
User avatar

Joined: Tue Aug 16, 2005 12:00 am
Posts: 382
Location: India
Gamer wrote:
Satish,
As probably you noticed, I have the latest 6.2[13(SP1)].
If you are giving advice to download the latest version of the file or patch,
please, be so kind to give more info where it can be downloaded.
Also, I don't think that changing only one file will make a difference. I am sure that it will require more than one file to be updated and some change in a database.

Please do not mislead me and anybody else.

Thanks for trying to help, though.
well If You can make up from the patch apply chanegs to this file.
Else just replace with new file.

If You paste Your
catalog/includes/header_tags.php might be able to comment.

Why You feel am misleading You.

Satish

_________________
Satish Mantri.
expert in CREloaded,osCommerce.
Payment Gateways-Shipping-Order total-Template Integration.
www.oscprofessionals.com


Top
 Profile  
 
 Post subject: Re: Header Tags Controller is very old and doesn't work.
PostPosted: Wed Sep 17, 2008 12:17 pm 
Offline
CRE Freak
User avatar

Joined: Sun May 18, 2008 11:29 pm
Posts: 41
Satish,
1. I told you I have a LATEST version of 6.2[13(SP1)], so I understand that files I have are the latest.
2. I can not find any files or patches for download on that site, only version 6.3 for download.
3. Changing one file not going to update Linda's old Header Tags to Jack's HTC SEO 3.X.


Top
 Profile  
 
 Post subject: Re: Header Tags Controller is very old and doesn't work.
PostPosted: Wed Sep 17, 2008 3:14 pm 
Offline
CRE Talented
User avatar

Joined: Tue Aug 16, 2005 12:00 am
Posts: 382
Location: India
Provide links of both the contribution.
1)Linda's old Header Tags
2)Jack's HTC SEO 3.X.

Also initially You were only commnenting on header tags.

this is the code:
<?php
/*
/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 (c) 2003 WebMakers.com
Linda McGrath - osCommerce@WebMakers.com
*/


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 categories_name, categories_head_title_tag, categories_head_desc_tag, categories_head_keywords_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");
// $the_category_query = tep_db_query("select cd.categories_name, cd.categories_head_desc_tag ,cd.categories_head_title_tag, cd.categories_head_keywords_tag 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 = '" . (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['categories_head_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT . ' ' . HEAD_DESC_TAG_ALL;
} else {
$tags_array['desc']= $the_category['categories_head_desc_tag'] . ' ' . HEAD_DESC_TAG_ALL;
}
// $the_desc= $the_category['categories_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['categories_head_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT;
// $the_desc= $the_category['categories_head_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT;
} else {
$tags_array['desc']= $the_category['categories_head_desc_tag'];
}
} else {
$tags_array['desc']= HEAD_DESC_TAG_DEFAULT;
}
}

if (HTKA_DEFAULT_ON=='1') {
if ($showCatTags == true) {
// $the_key_words= clean_html_comments($the_category['categories_head_keywords_tag']) . ' ' . HEAD_KEY_TAG_ALL;
if (HTTA_CAT_DEFAULT_ON=='1') {
$tags_array['keywords']= $the_category['categories_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;
} else {
$tags_array['keywords']= $the_category['categories_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_DEFAULT;
}
} else {
$tags_array['keywords']= HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;
}
} else {
if ($showCatTags == true) {
// $the_key_words= clean_html_comments($the_category['categories_head_keywords_tag']) . ' ' . HEAD_KEY_TAG_DEFAULT;
if (HTTA_CAT_DEFAULT_ON=='1') {
$tags_array['keywords']= $the_category['categories_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_DEFAULT;
} else {
$tags_array['keywords']= $the_category['categories_head_keywords_tag'];
}
} else {
$tags_array['keywords']= HEAD_KEY_TAG_DEFAULT;
}
}

if (HTTA_DEFAULT_ON=='1') {
if ($showCatTags == true) {
// $the_title= $the_category['categories_head_title_tag'] . ' ' . HEAD_TITLE_TAG_ALL . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'];
if (HTTA_CAT_DEFAULT_ON=='1') {
$tags_array['title']= $the_category['categories_head_title_tag'] .' '. HEAD_TITLE_TAG_DEFAULT . " " . $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;
} else {
$tags_array['title']= $the_category['categories_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['categories_head_title_tag'] . ' ' . HEAD_TITLE_TAG_DEFAULT;
// $the_title= $the_category['categories_head_title_tag'] . ' ' . HEAD_TITLE_TAG_DEFAULT;
} else {
$tags_array['title']= $the_category['categories_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;


// 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, "About Us",
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 ' <META NAME="robots" CONTENT="index, follow">' . "\n";
echo ' <META NAME="revisit-after" CONTENT="30 days">' . "\n";
echo ' <META NAME="generator" CONTENT="CRELoaded osCommerce Version 6.2">' . "\n";

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

_________________
Satish Mantri.
expert in CREloaded,osCommerce.
Payment Gateways-Shipping-Order total-Template Integration.
www.oscprofessionals.com


Top
 Profile  
 
 Post subject: Re: Header Tags Controller is very old and doesn't work.
PostPosted: Wed Sep 17, 2008 3:40 pm 
Offline
CRE Freak
User avatar

Joined: Sun May 18, 2008 11:29 pm
Posts: 41
It looks like my file is newer than yours, but I'm not sure.
This is the code of my catalog/includes/header_tags.php file:

<?php
/*
/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 (c) 2003 WebMakers.com
Linda McGrath - osCommerce@WebMakers.com
*/


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);

if ( isset( $HTTP_GET_VARS['manufacturers_id'] ) ) {
$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);
} else {
$the_manufacturers['manufacturers_name'] = '';
}

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;



// INDEX.PHP
case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT) ):
$the_category_query = tep_db_query("select categories_name, categories_head_title_tag, categories_head_desc_tag, categories_head_keywords_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");
// $the_category_query = tep_db_query("select cd.categories_name, cd.categories_head_desc_tag ,cd.categories_head_title_tag, cd.categories_head_keywords_tag 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);

if ( isset( $HTTP_GET_VARS['manufacturers_id'] ) ) {
$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);
} else {
$the_manufacturers['manufacturers_name'] = '';
}

$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['categories_head_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT . ' ' . HEAD_DESC_TAG_ALL;
} else {
$tags_array['desc']= $the_category['categories_head_desc_tag'] . ' ' . HEAD_DESC_TAG_ALL;
}
// $the_desc= $the_category['categories_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['categories_head_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT;
// $the_desc= $the_category['categories_head_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT;
} else {
$tags_array['desc']= $the_category['categories_head_desc_tag'];
}
} else {
$tags_array['desc']= HEAD_DESC_TAG_DEFAULT;
}
}

if (HTKA_DEFAULT_ON=='1') {
if ($showCatTags == true) {
// $the_key_words= clean_html_comments($the_category['categories_head_keywords_tag']) . ' ' . HEAD_KEY_TAG_ALL;
if (HTTA_CAT_DEFAULT_ON=='1') {
$tags_array['keywords']= $the_category['categories_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;
} else {
$tags_array['keywords']= $the_category['categories_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_DEFAULT;
}
} else {
$tags_array['keywords']= HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;
}
} else {
if ($showCatTags == true) {
// $the_key_words= clean_html_comments($the_category['categories_head_keywords_tag']) . ' ' . HEAD_KEY_TAG_DEFAULT;
if (HTTA_CAT_DEFAULT_ON=='1') {
$tags_array['keywords']= $the_category['categories_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_DEFAULT;
} else {
$tags_array['keywords']= $the_category['categories_head_keywords_tag'];
}
} else {
$tags_array['keywords']= HEAD_KEY_TAG_DEFAULT;
}
}

if (HTTA_DEFAULT_ON=='1') {
if ($showCatTags == true) {
// $the_title= $the_category['categories_head_title_tag'] . ' ' . HEAD_TITLE_TAG_ALL . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'];
if (HTTA_CAT_DEFAULT_ON=='1') {
$tags_array['title']= $the_category['categories_head_title_tag'] .' '. HEAD_TITLE_TAG_DEFAULT . " " . $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;
} else {
$tags_array['title']= $the_category['categories_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['categories_head_title_tag'] . ' ' . HEAD_TITLE_TAG_DEFAULT;
// $the_title= $the_category['categories_head_title_tag'] . ' ' . HEAD_TITLE_TAG_DEFAULT;
} else {
$tags_array['title']= $the_category['categories_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 = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . (int)$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;


// 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;

// ARTICLES.PHP
case ((strstr($_SERVER['PHP_SELF'],'articles.php') or strstr($PHP_SELF,'articles.php')) &! strstr($PHP_SELF,'new_articles.php')):
$the_topic_query = tep_db_query("select td.topics_name from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.topics_id = '" . (int)$current_topic_id . "' and td.topics_id = '" . (int)$current_topic_id . "' and td.language_id = '" . (int)$languages_id . "'");
$the_topic = tep_db_fetch_array($the_topic_query);

$the_authors_query= tep_db_query("select authors_name from " . TABLE_AUTHORS . " where authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "'");
$the_authors = tep_db_fetch_array($the_authors_query);

if (HTDA_ARTICLES_ON=='1') {
$tags_array['desc']= HEAD_DESC_TAG_ARTICLES . '. ' . HEAD_DESC_TAG_ALL;
} else {
$tags_array['desc']= HEAD_DESC_TAG_ARTICLES;
}

if (HTKA_ARTICLES_ON=='1') {

if (tep_not_null($the_topic['topics_name'])) {
$tags_array['keywords'] .= $the_topic['topics_name'];
} else {
if (tep_not_null($the_authors['authors_name'])) {
$tags_array['keywords'] .= $the_authors['authors_name'];
}
}

$tags_array['keywords'] = HEAD_KEY_TAG_ARTICLES . ', ' . $tags_array['keywords'] . ', ' . HEAD_KEY_TAG_ALL;

} else {
$tags_array['keywords']= HEAD_KEY_TAG_ARTICLES;
}

if (HTTA_ARTICLES_ON=='1') {
$tags_array['title']= HEAD_TITLE_TAG_ALL . ' - ' . HEAD_TITLE_TAG_ARTICLES;

if (tep_not_null($the_topic['topics_name'])) {
$tags_array['title'] .= ' - ' . $the_topic['topics_name'];
} else {
if (tep_not_null($the_authors['authors_name'])) {
$tags_array['title'] .= TEXT_BY . $the_authors['authors_name'];
}
}

} else {
$tags_array['title']= HEAD_TITLE_TAG_ARTICLES;
}

break;

// ARTICLE_INFO.PHP
case ( strstr($_SERVER['PHP_SELF'],'article_info.php') or strstr($PHP_SELF,'article_info.php') ):
$the_article_info_query = tep_db_query("select ad.language_id, a.articles_id, ad.articles_name, ad.articles_description, ad.articles_head_title_tag, ad.articles_head_keywords_tag, ad.articles_head_desc_tag, ad.articles_url, a.articles_date_added, a.articles_date_available, a.authors_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and ad.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "'" . " and ad.language_id ='" . (int)$languages_id . "'");
$the_article_info = tep_db_fetch_array($the_article_info_query);

if (empty($the_article_info['articles_head_desc_tag'])) {
$tags_array['desc']= NAVBAR_TITLE . '. ' . HEAD_DESC_TAG_ALL;
} else {
if ( HTDA_ARTICLE_INFO_ON=='1' ) {
$tags_array['desc']= $the_article_info['articles_head_desc_tag'] . ' ' . HEAD_DESC_TAG_ALL;
} else {
$tags_array['desc']= $the_article_info['articles_head_desc_tag'];
}
}

if (empty($the_article_info['articles_head_keywords_tag'])) {
$tags_array['keywords']= NAVBAR_TITLE . ', ' . HEAD_KEY_TAG_ALL;
} else {
if ( HTKA_ARTICLE_INFO_ON=='1' ) {
$tags_array['keywords']= $the_article_info['articles_head_keywords_tag'] . ', ' . HEAD_KEY_TAG_ALL;
} else {
$tags_array['keywords']= $the_article_info['articles_head_keywords_tag'];
}
}

if (empty($the_article_info['articles_head_title_tag'])) {
$tags_array['title']= HEAD_TITLE_TAG_ALL . ' - ' . NAVBAR_TITLE;
} else {
if ( HTTA_ARTICLE_INFO_ON=='1' ) {
$tags_array['title']= HEAD_TITLE_TAG_ALL . ' - ' . HEAD_TITLE_TAG_ARTICLE_INFO . ' - ' . $topics['topics_name'] . $authors['authors_name'] . ' - ' . clean_html_comments($the_article_info['articles_head_title_tag']);
} else {
$tags_array['title']= clean_html_comments($the_article_info['articles_head_title_tag']);
}
}

break;

// ARTICLES_NEW.PHP
case ( strstr($_SERVER['PHP_SELF'],'articles_new.php') or strstr($PHP_SELF,'articles_new.php') ):
if ( HEAD_DESC_TAG_ARTICLES_NEW!='' ) {
if ( HTDA_ARTICLES_NEW_ON=='1' ) {
$tags_array['desc']= HEAD_DESC_TAG_ARTICLES_NEW . '. ' . HEAD_DESC_TAG_ALL;
} else {
$tags_array['desc']= HEAD_DESC_TAG_ARTICLES_NEW;
}
} else {
$tags_array['desc']= NAVBAR_TITLE . '. ' . HEAD_DESC_TAG_ALL;
}

if ( HEAD_KEY_TAG_ARTICLES_NEW=='' ) {
// Build a list of ALL new article names to put in keywords
$articles_new_array = array();
$articles_new_query_raw = "select ad.articles_name
from " . TABLE_ARTICLES . " a,
" . TABLE_AUTHORS . " au,
" . TABLE_ARTICLES_DESCRIPTION . " ad
where a.articles_status = '1'
and a.authors_id = au.authors_id
and a.articles_id = ad.articles_id
and ad.language_id = '" . (int)$languages_id . "'
order by a.articles_date_added DESC, ad.articles_name";
$articles_new_split = new splitPageResults($articles_new_query_raw, MAX_NEW_ARTICLES_PER_PAGE);
$articles_new_query = tep_db_query($articles_new_split->sql_query);

$row = 0;
$the_new_articles='';
while ($articles_new = tep_db_fetch_array($articles_new_query)) {
$the_new_articles .= clean_html_comments($articles_new['articles_name']) . ', ';
}
if ( HTKA_ARTICLES_NEW_ON=='1' ) {
$tags_array['keywords']= NAVBAR_TITLE . ', ' . $the_new_articles . ', ' . HEAD_KEY_TAG_ALL;
} else {
$tags_array['keywords']= NAVBAR_TITLE . ', ' . $the_new_articles;
}
} else {
$tags_array['keywords']= HEAD_KEY_TAG_ARTICLES_NEW . ', ' . HEAD_KEY_TAG_ALL;
}

if ( HEAD_TITLE_TAG_ARTICLES_NEW!='' ) {
if ( HTTA_ARTICLES_NEW_ON=='1' ) {
$tags_array['title']= HEAD_TITLE_TAG_ALL . ' - ' . HEAD_TITLE_TAG_ARTICLES_NEW;
} else {
$tags_array['title']= HEAD_TITLE_TAG_ARTICLES_NEW;
}
} else {
$tags_array['title']= HEAD_TITLE_TAG_ALL . ' - ' . NAVBAR_TITLE;
}

break;

// ARTICLES_REVIEWS_INFO.PHP and ARTICLES_REVIEWS.PHP
case ( strstr($_SERVER['PHP_SELF'],'article_reviews_info.php') or strstr($_SERVER['PHP_SELF'],'article_reviews.php') or strstr($PHP_SELF,'article_reviews_info.php') or strstr($PHP_SELF,'article_reviews.php') ):
if ( HEAD_DESC_TAG_ARTICLE_REVIEWS_INFO=='' ) {
if ( HTDA_ARTICLE_REVIEWS_INFO_ON=='1' ) {
$tags_array['desc']= NAVBAR_TITLE . '. ' . tep_get_header_tag_articles_desc(isset($HTTP_GET_VARS['reviews_id'])) . ' ' . HEAD_DESC_TAG_ALL;
} else {
$tags_array['desc']= NAVBAR_TITLE . '. ' . tep_get_header_tag_articles_desc(isset($HTTP_GET_VARS['reviews_id']));
}
} else {
$tags_array['desc']= HEAD_DESC_TAG_ARTICLE_REVIEWS_INFO;
}

if ( HEAD_KEY_TAG_ARTICLE_REVIEWS_INFO=='' ) {
if ( HTKA_ARTICLE_REVIEWS_INFO_ON=='1' ) {
$tags_array['keywords']= NAVBAR_TITLE . ', ' . tep_get_header_tag_articles_keywords(isset($HTTP_GET_VARS['reviews_id'])) . ', ' . HEAD_KEY_TAG_ALL;
} else {
$tags_array['keywords']= NAVBAR_TITLE . ', ' . tep_get_header_tag_articles_keywords(isset($HTTP_GET_VARS['reviews_id']));
}
} else {
$tags_array['keywords']= HEAD_KEY_TAG_ARTICLE_REVIEWS_INFO;
}

if ( HEAD_TITLE_TAG_ARTICLE_REVIEWS_INFO=='' ) {
if ( HTTA_ARTICLE_REVIEWS_INFO_ON=='1' ) {
$tags_array['title']= HEAD_TITLE_TAG_ALL . ' - ' . HEADING_TITLE . tep_get_header_tag_articles_title(isset($HTTP_GET_VARS['reviews_id']));
} else {
$tags_array['title']= tep_get_header_tag_articles_title(isset($HTTP_GET_VARS['reviews_id']));
}
} else {
$tags_array['title']= HEAD_TITLE_TAG_ARTICLE_REVIEWS_INFO;
}
break;

// pages.php
case ( strstr($_SERVER['PHP_SELF'],FILENAME_PAGES) or strstr($PHP_SELF,FILENAME_PAGES) && (isset($HTTP_GET_VARS['pID']) && tep_not_null($HTTP_GET_VARS['pID'])) ):
$the_pages_info_query = tep_db_query("select pages_meta_title, pages_meta_keywords, pages_meta_description from " . TABLE_PAGES_DESCRIPTION . " where pages_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and language_id ='" . (int)$languages_id . "'");
$the_pages_info = tep_db_fetch_array($the_pages_info_query);

if (empty($the_pages_info['pages_meta_description'])) {
$tags_array['desc']= NAVBAR_TITLE . '. ' . HEAD_DESC_TAG_ALL;
} else {
if ( HTDA_ARTICLE_INFO_ON=='1' ) {
$tags_array['desc']= $the_pages_info['pages_meta_description'] . ' ' . HEAD_DESC_TAG_ALL;
} else {
$tags_array['desc']= $the_pages_info['pages_meta_description'];
}
}

if (empty($the_pages_info['pages_meta_keywords'])) {
$tags_array['keywords']= NAVBAR_TITLE . ', ' . HEAD_KEY_TAG_ALL;
} else {
if ( HTKA_ARTICLE_INFO_ON=='1' ) {
$tags_array['keywords']= $the_pages_info['pages_meta_keywords'] . ', ' . HEAD_KEY_TAG_ALL;
} else {
$tags_array['keywords']= $the_pages_info['pages_meta_keywords'];
}
}

if (empty($the_pages_info['pages_meta_title'])) {
$tags_array['title']= HEAD_TITLE_TAG_ALL . ' - ' . NAVBAR_TITLE;
} else {
if ( HTTA_ARTICLE_INFO_ON=='1' ) {
$tags_array['title']= HEAD_TITLE_TAG_ALL . ' - ' . clean_html_comments($the_pages_info['pages_meta_title']);
} else {
$tags_array['title']= clean_html_comments($the_pages_info['pages_meta_title']);
}
}

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;
}

//RCI start
echo $cre_RCI->get('headertags', 'addswitch');
//RCI end

echo ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">'."\n";
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 name="robots" content="index, follow">' . "\n";
echo ' <meta name="revisit-after" content="30 days">' . "\n";
echo ' <meta name="generator" content="' . PROJECT_VERSION . '[' . PROJECT_PATCH . ']">' . "\n";
echo ' <!-- EOF: Generated Meta Tags -->' . "\n";
?>


Top
 Profile  
 
 Post subject: Re: Header Tags Controller is very old and doesn't work.
PostPosted: Wed Sep 17, 2008 4:54 pm 
Offline
CRE Talented
User avatar

Joined: Tue Aug 16, 2005 12:00 am
Posts: 382
Location: India
Did YOu chek whether is thios code getting executed.

Place a file write or hard code some values and chek if the header tags are affected.


The code in switch uses some defines so if they are not there then too the case wil not get executed and a default switch case goes.

Satish

_________________
Satish Mantri.
expert in CREloaded,osCommerce.
Payment Gateways-Shipping-Order total-Template Integration.
www.oscprofessionals.com


Top
 Profile  
 
 Post subject: Re: Header Tags Controller is very old and doesn't work.
PostPosted: Wed Sep 17, 2008 5:04 pm 
Offline
CRE Freak
User avatar

Joined: Sun May 18, 2008 11:29 pm
Posts: 41
Satish,
all files are in place.
I don't have time now to check coding and I feel I'm wasting my time trying to make it work.
I will try to find working store files and copy or just move to other shopping cart software, like very promissing Magento.
Probably I will just copy again all 6.2 files again, but I'm not sure it will work.
Thanks for your help.


Top
 Profile  
 
 Post subject: Re: Header Tags Controller is very old and doesn't work.
PostPosted: Sun Oct 12, 2008 12:05 am 
Offline
CRE Expert
User avatar

Joined: Wed Jul 30, 2003 12:00 am
Posts: 1411
Gamer, what is the error or symptom you are trying to correct?

_________________
Regards,

Salvatore Iozzia
Founder and Chief Evil Overlord
Loaded Commerce, LLC & The Reactor Works / Hosting
http://loadedcommerce.com | http://thereactorworks.com | http://thereactorhosting.com

JOIN THE LOADED SKYPE CHAT:
http://tinyurl.com/7mlvwot

follow me on TWITTER! http://www.twitter.com/saliozzia


Top
 Profile  
 
 Post subject: Re: Header Tags Controller is very old and doesn't work.
PostPosted: Sun Oct 12, 2008 12:01 pm 
Offline
CRE Freak
User avatar

Joined: Sun May 18, 2008 11:29 pm
Posts: 41
Sal,
Thank you very much for trying to help me.
I got your email about changes in CREload team and everything and thought "This is a good sign!".
The things with header tag was that it didn't worked as it supposed to: as I recall I filled default titles, but it still showed something like Home Page or something else, doesn't matter what I filled defaults with. I moved to Magento now and I am not sure if I will return back to CREload.
I wish you luck, I liked CREload a lot.

Thanks for help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

Board index » Loaded Commerce Support » Feedback

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Wed May 23, 2012 9:17 pm
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Forums Latest Activity

Top Listing

1. Cart2Cart - Shopping...
    Category: Shopping Cart Database Conversion Scripts
    
2. Points & Rewards PLUS!...
    Category: Add-Ons
    
3. Configuration Server...
    Category: Fixes
    
4. Credit Card with CCV
    Category: Payment Modules
    
5. CC7333_ATS
    Category: Templates
    
Show more...

© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy