Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

I just installed HTC with STSv4.3.3. My images are not working and Im seeing this at the top on my source:

 

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<!-- footer_eof //-->

<br>

</body>

</html>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html $htmlparams>

<head>

<meta http-equiv="Content-Language" content="en-us">

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title> - Name of My Store</title>

<meta name="Description" content="descriptive words here"/>

<meta name="Keywords" content="list of keywords here, "/>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

<!-- EOF: Generated Meta Tags -->

<base href="http://www.mysite.com/">

 

<!-- start get_javascript(applicationtop2header) //-->

 

<!-- end get_javascript(applicationtop2header) //-->

 

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

</head>

<body>

<div id="wrapper">

etc

 

I hope some wizard can help --

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

I just installed HTC with STSv4.3.3. My images are not working and Im seeing this at the top on my source:

 

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<!-- footer_eof //-->

<br>

</body>

</html>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html $htmlparams>

<head>

<meta http-equiv="Content-Language" content="en-us">

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title> - Name of My Store</title>

<meta name="Description" content="descriptive words here"/>

<meta name="Keywords" content="list of keywords here, "/>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

<!-- EOF: Generated Meta Tags -->

<base href="http://www.mysite.com/">

 

<!-- start get_javascript(applicationtop2header) //-->

 

<!-- end get_javascript(applicationtop2header) //-->

 

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

</head>

<body>

<div id="wrapper">

etc

 

I hope some wizard can help --

Check the permissions on your image folder. By the way, what is the url?

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

I fixed the image problem but am still seeing the weirdness at the top of my page source. Any ideas?

 

Thank You

I went to your web site but did not notice anything out of the ordinary in IE6. Did you get this worked out?

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

I went to your web site but did not notice anything out of the ordinary in IE6. Did you get this worked out?

I fixed the image problem but if you go to view>source, there code is still very strange at the top. But this code isnt evident in the regular page when I look at it via ftp. This didnt happen until right after installing the header tags contribution.

Thanks Bill

Link to comment
Share on other sites

Have you tried replacing your includes/header_tags.php and english/header_tags.php file with the ones in the contribution to see if the problem goes away?

 

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

Have you tried replacing your includes/header_tags.php and english/header_tags.php file with the ones in the contribution to see if the problem goes away?

 

Jack

 

I will try it now. Thanks

Link to comment
Share on other sites

Have you tried replacing your includes/header_tags.php and english/header_tags.php file with the ones in the contribution to see if the problem goes away?

 

Jack

 

Replaced the above header tags, added keywords in admin and still get this when I look at view>source:

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<!-- footer_eof //-->

<br>

</body>

</html>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html $htmlparams>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

 

<title>My Site Name Here: Quality Art and Craftwork - </title>

<meta name="Description" content="an online art gallery that designs free web sites for artists, then sells their work through our gallery "/>

<meta name="Keywords" content=", Free Web Sites for Artists, Web Design, Native American Art"/>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

<!-- EOF: Generated Meta Tags -->

<base href="http://www.mysite.com/">

 

<!-- start get_javascript(applicationtop2header) //-->

 

<!-- end get_javascript(applicationtop2header) //-->

 

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

 

</head>

<body>

<div id="wrapper">

 

Notice the double entries and strange html at the top?

 

thanks

Link to comment
Share on other sites

Oops, you skipped ahead. I didn't say you should add anything in admin. You should just replace the files and see what happens. If it is still there, try posting the contents of your conditions page (I chose that since there is less code). You only need post the part up to the <body> tag.

 

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

Oops, you skipped ahead. I didn't say you should add anything in admin. You should just replace the files and see what happens. If it is still there, try posting the contents of your conditions page (I chose that since there is less code). You only need post the part up to the <body> tag.

 

Jack

 

Still there minus my keywords (lists stock oscommerce stuff, dvds, etc). Conditions.php?

Link to comment
Share on other sites

What is wrong with my header tags????????? I have tried everything even re replacing the header tags pages with the ones fromthe contribution. Same tags for all categories pages. popup image is the only one that displays correct. Again categories all have same names in the explorer bar.

Link to comment
Share on other sites

What is wrong with my header tags????????? I have tried everything even re replacing the header tags pages with the ones fromthe contribution. Same tags for all categories pages. popup image is the only one that displays correct. Again categories all have same names in the explorer bar.
Did you install the changes in the index file? Did you run the Fill Tags option in admin?

 

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 all

I have just updated Richard Fielder Admin mod to be compatible with Milestone 2.2. Its a simple update

let me know if anyone finds any problems.

Get it here:

http://www.oscommerce.com/community/contributions,207

 

 

How do I add the title tags

 

<?php

// BOF: Header Tag Controller v2.6.0

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

?>

 

to the login.php without getting all sorts of scary-looking error messages?? Everything was coming along beautifully, but then I added this to the login page (I thought I'd have a decent title instead of the default) and I get no such file, division by zero warnings in header_tags and everything else. pinch.gif

 

Right now on the index page I have:

 

Warning: Division by zero in /Catalog/includes/header_tags.php on line 23

 

Does anyone know what this is, or how I can fix it...? :sweating:

Link to comment
Share on other sites

Did you add the Login page using admin->Header Tags->Page Control? The problem is most likely the includes/header_tags.php or english/header_tags.php file has a problem in it. You could post them here if you can't isolate the problem.

 

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

A new version has been uploaded. Here are the changes made:

 

-> Changed - to , in includes/header_tags.php for the keywords tag.

-> Included code for NOODP tag to prevent DMoz from changing site description

-> Changed h1 and h2 classes to eliminate extra space

-> Changed instructions to use an on-page link to increase link exposure

for the products

-> Added an infobox that will appear on the product page and contain information

about that product. This increases the keyword density count for that page.

-> Added a note to the Install_Admin.txt file to the section of change that

seems to trip up most people. Hopefully that will prevent that common mistake.

-> Added a "How To Operate" file to make working with Header Tags easier.

-> Fixed code for font size in header_tags_fill_tags.php file so it displayed

correctly with IE.

-> Added defines to text in header_tags_fill_tags.php file.

 

Highlights of the above:

 

When you submit your site to DMoz, you include a description that you want displayed with it. This rarely happens since DMoz editors are told to strip away any text that is used to make the products appear better, like "This is a great product." With Header Tags, you want the listings to have the description you set up for the page. Last year, the main search engines made this tag availalbe so that the description by DMoz can be ignored.

 

Since anchored links is the best way to increase page rank, form within a site, this version adds an on-page anchor. The text it displays is Viewing: product name, but that can be changed in the files.

 

Most sites don't have enough text on their sites, espeically for products. This version adds an infobox when a product page is being displayed. The box contains the title of the product and part of the description for the product as well as a link to the page. This all serves to increase the SEO effectiveness of the product page. The amount of text displayed can be limited by changing the code in the infobox. If your shop has been edited to not use the standard infoboxes, you may need to edit that file to make it fit in with yours, or just not use this option.

 

I added a How To Operate file that briefly explans how Header Tags should be set up initially. Quite a few people have requested this. Hopefully it will make things easier.

 

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,

 

This contribution just gets better and better everytime you do an update :D

 

I have just upgraded as per the instructions and a very easy job it was to.

 

One small problem I have come across is that the product description expands the info boxes in the left column or whichever column you add it to.

 

I have overcome this by changing the code to this (anyone who uses this please bear in mind this is specific to my store and wont work 100% on yours.)

 

<?php
/*
 $Id: header_tags.php,v 1.6 2007/01/10 by Jack_mcs

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>

<!-- header_tags.php //-->
	  <tr>
		<td>
<?php
 $product_info_query = tep_db_query("select pd.products_name, pd.products_description from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
 $product_info = tep_db_fetch_array($product_info_query);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<table><tr><td align="left" width="20" class="mws_boxTop_inner">' . tep_image(DIR_WS_IMAGES . 'icon_heart.jpg', '', '20', '18') . '</td><td width="BOX_WIDTH" class="mws_boxTop_inner" valign="bottom">  ' . BOX_HEADING_OVERVIEW . '</td></tr></table>');

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<tr><td><table width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2" border="0">
									  <tr><td class="main" align="center"><strong>' . $tags_array['title'] . '</strong></td></tr><tr><td><span class="product_overview">' . substr($product_info['products_description'], 0, 200) . '</span></td></tr></table></td></tr>');

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- header_tags.php_eof //-->

 

Jack it is maybe worth looking at for the next release.

 

Oops forgot to add that maybe its not worth having the 'read more' link in the box because you are already on that page. If you disagree then please shoot me down in flames hehe

 

Thanks for another great contribution! :thumbsup:

 

Mark

Edited by mark27uk3

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

The text in the box should already be limited by the standard code so I think it might be something different in your code that requires that change. I could be wrong though. If others have the same problem, I look closer at it.

 

For people, the "read more" link is a useless link. But for the search engines, links to a page, even if they are on the same page, counts towards that pages Page Rank so the "read more" link should stay to get the most out the box.

 

Jack

Edited by Jack_mcs

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 everyone I've just installed header tags and my question is does header tags work with order check v2.5.1b, because all seemed to be ok, but when I get to the page

check out confirmation I get this message

 

1054 - Champ 'comments' inconnu dans field list

 

insert into holding_orders (customers_id, customers_name, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, comments, currency, currency_value) values ('2', 'xxxxx xxxxxx', 'xxxxxxxx', '', 'xxxxx', '15130', 'xxxxx', 'xxxxxx', 'xxxxxxxx', 'xxxxxxx', '1', 'xxxxxx', 'xxxxxx', '', 'xxxx', 'xxxxx', 'xxxxx', 'xxxxx', '1', 'xxxxxxxxxxxxxxxxxxx', '', 'xxxxxxxxxxx', '', '', now(), '1', '', 'EUR', '1.00000000')

 

[TEP STOP]

hope someone can help

Mark

Edited by wheeloftime
Link to comment
Share on other sites

That error can't be related to Header Tags since that section of code isn't touched by it. You've got some other problem with your shop and should ask in the order check support thread.

 

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 error can't be related to Header Tags since that section of code isn't touched by it. You've got some other problem with your shop and should ask in the order check support thread.

 

Jack

thanks for your response

well Iwould agree with you but it it works great with out header tags ! i'll try order check support thread.

mark

Link to comment
Share on other sites

The text in the box should already be limited by the standard code so I think it might be something different in your code that requires that change. I could be wrong though. If others have the same problem, I look closer at it.

 

For people, the "read more" link is a useless link. But for the search engines, links to a page, even if they are on the same page, counts towards that pages Page Rank so the "read more" link should stay to get the most out the box.

 

Jack

 

Hi Jack,

 

Thanks for setting the record straight about the 'read more' link, definately leave that one in if its gonna help with pr.

 

Now this is probably another naff question but quite a few of my products have an image at the beginning of them and obviously if the image is wider than the BOX_WIDTH then it is going to break the display.

 

How about some sort of code to strip out image tags so that it keeps things nice and tidy?

 

Regards

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Hi Jack,

 

Thanks for setting the record straight about the 'read more' link, definately leave that one in if its gonna help with pr.

 

Now this is probably another naff question but quite a few of my products have an image at the beginning of them and obviously if the image is wider than the BOX_WIDTH then it is going to break the display.

 

How about some sort of code to strip out image tags so that it keeps things nice and tidy?

 

Regards

 

Mark

Try changing this line in the infobox code
  $info_box_contents[] = array('text' => substr($product_info['products_description'], 0, 100).'<a style="color: red;" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$_GET['products_id']).'"  >  (...see more)</a>');

to this

  $info_box_contents[] = array('text' => strip_tags(substr($product_info['products_description'], 0, 100)).'<a style="color: red;" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$_GET['products_id']).'"  >  (...see more)</a>');

 

Jack

Edited by Jack_mcs

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

Ive just installed the new version, on product_info ive got HTPA selected. but it comes out like

 

Product NameCategory ,

in the meta keyword and description

 

How can i get a space between productname and category

It works fine when I test it here but that might be due to the other settings. Do you have any other HT boxes checked for the product_info section?

 

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

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