Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

Thanks Jack.

 

I think I've got a similiar issue with product_info.php. Have a look at this, I'm using both Dynamic Meta Tags and Header Controller Tags:

 

?>

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

<html <?php echo HTML_PARAMS; ?>>

<head>

<?php

//begin dynamic meta tags query -->

?>

<title><?php echo $the_product_name; ?>: <?php echo TITLE ?></title>

<meta name="keywords" content="<?php echo TITLE ?>, <?php echo $the_product_name; ?>, <?php echo $the_product_model; ?>, <?php echo $the_manufacturers['manufacturers_name']; ?>">

<meta name="description" content="<?php echo $the_product_description . "," . $the_product_name; ?>">

<?php

//end dynamic meta tags query -->

?>

<?php

// BOF: WebMakers.com Changed: Header Tag Controller v1.0

// 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 v1.0

?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

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

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=330,height=270,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

 

 

Do you think this will be considered as spamming? Should I be using both?

 

This is important to get right as it is the product info page. (By the way the Dynamic Meta Tags have been working very well, the site is being indexed by Google)

 

Please advise.

 

Thanks

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Yes, that might be considered spamming. Whether the SE's do anything about it or not is anyones guess. I would think they take into account human error and if the rest of the page looks OK then they might ignore it. I wouldn't take the chance myself. Besides, it serves no purpose to have them both there. They are just repeating the same tags except the first one (the Dynamic section) won't work right for your index page.

 

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

ok, I got V2.3.7 installed no probs thanks to the auto script :thumbsup: and it's all auto updating nicely :thumbsup:

but........ I have a trivial problem that I can't work out.....

since installing HTC, I've changed my <title> tag in \catalog\includes\languages\english.php and also done the same in the admin folder english.php

The admin page title has updated to reflect my change, but the main page is stuck with the old title no matter how many times I refresh, check the files, upload/download...... hmmmm.......

Is there some part of the HTC setup that captures what the <title> is at the time of install so it no longer refers to the info in english.php? and if so, where do I change it now?

thanks,

James

Link to comment
Share on other sites

One of the advantages of installing Header Tags is that you can make changes to any page all from one file - includes/languaes/header_tags.php. The define in english.php is no longer used.

 

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

Okay, so if you're not using Windoze so can't use that auto-installer program, which is the most complete version of the contrib to use? I find myself lost in the maze of possibilities. I need one, obviously, that has readmes updates with current install instructions, but some of them seem very old.

 

Thanks,

Susan

Link to comment
Share on other sites

The auto-installer uses the sed editor which I'm sure there is a Linux version of. Not sure about any other platforms though. The latest version is 2.3.7 updated about six weeks ago. How current do you need it to be?

 

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 auto-installer uses the sed editor which I'm sure there is a Linux version of. Not sure about any other platforms though.  The latest version is 2.3.7 updated about six weeks ago.  How current do you need it to be?

 

Jack

 

2.3.7 would be fine, except it doesn't seem to have updated manual install instructions in it. I don't know anything about sed, and I'd rather not have to get into it to install this contribution. Any tips?

 

Thanks,

Susan

Link to comment
Share on other sites

That's the way of all contributions I'm afraid. Nothing has changed with the core code since July of 2003 (or somewhere around then) so there is nothing to update in the instructions. The autoinstall isn't for everyone and was just added as an alternative approach. Some people like it while others can't get it to work at all. The basic install instructions do work. There is one mistake that I am aware of (mentioned on the last page or two of this thread I think) but it isn't anything that will cause the code to not work.

 

The install process can be broken down into three main steps:

- Install the database changes

- Install the catalog changes

- Install the admin changes

 

You can stop at each step and not do any damage to your shop. This takes a little of the stress off of the installation. If you run into a problem, ask for help 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

Hi, I am trying to install HTC and I have followed all steps so far, but am running into a problem after I run the autoinstall command:

 

Everything seems to go smoothly, but I can't seem to find the 'edited_files' directory.

 

Also, in my command window, there are numerous "the system cannot find the path specified" after there is a CD edited_files/ command.

 

Can anyone help me out?

 

Thanks in advance.

 

John

Link to comment
Share on other sites

When you unzip the HTC archive, there is an AutoInstall directory. You are suposed to copy this to somewhere on your computer. The edited_files directory already exists within the autoinstall directory.

 

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

When you unzip the HTC archive, there is an AutoInstall directory.  You are suposed to copy this to somewhere on your computer.  The edited_files directory already exists within the  autoinstall directory.

 

Jack

 

Hi Jack,

 

I extracted the contents to my desktop on the C drive, pointed to the directory in the DOS prompt, ran the autoinstall and that's when all the errors occurred.

 

Is there something else I'm missing?

 

Thanks.

 

John

Link to comment
Share on other sites

Hi Jack,

 

I extracted the contents to my desktop on the C drive, pointed to the directory in the DOS prompt, ran the autoinstall and that's when all the errors occurred.

 

Is there something else I'm missing?

 

Thanks.

 

John

 

Actually, I manually created the edited_files directory within the autoinstall directory and it successfully wrote the files.

 

Thanks for your help.

Link to comment
Share on other sites

How can you tell if this contribution worked?

 

Everything seems to have gone well, but I don't see META fields in my admin when I add a new product.

 

I could have missed one step, but not sure which one it was.

 

I made sure all of the admin files in the ZIP were uploaded to my server and I even checked that the code was changed....I feel like I am so close......

 

Thanks.

 

John

Link to comment
Share on other sites

The autoinstall option only works for the files in the catalog section. None of the admin files are touched. So you need to read through the instructions for the admin section and make all of the indicated changes.

 

However, with the changes made by autoinstall, you should see meta tags when you look at your source code with a browser. If not, something didn't take.

 

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 autoinstall option only works for the files in the catalog section. None of the admin files are touched.  So you need to read through the instructions for the admin section and make all of the indicated changes.

 

However, with the changes made by autoinstall, you should see meta tags when you look at your source code with a browser.  If not, something didn't take.

 

Jack

 

Ok, I got it working, there was one file that wasn't uploaded to my server. I now see META fields when I add new products. Am I able to add META tags when I create new categories, or can I create META tags for any page using this contribution?

 

Thanks again for all of your help.

 

John

Link to comment
Share on other sites

HTC doesn't have an option to add meta tags for categories. use the Category Meta Tag contribtuion for that. As for other pages, yes, you can, and should, add tags for each page. The way you do that is by editing the includes/header_tags.php and includes/languages/english/header_tags.php files. You'll see the code is broken down into blocks for each page. Duplicate a block and rename the variables to match the page you want to do.

 

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

  • 2 weeks later...

I thought I ran the install exactly per the instructions - but now I'm getting these errors -

 

on my admin page, now I get

 

Fatal error: Call to undefined function: tep_admin_check_login() in /home/virtual/site116/fst/var/www/html/shop/admin/includes/application_top.php on line 213

 

On my catalog (shop) page - I get

 

Fatal error: Cannot redeclare tep_get_header_tag_products_title() (previously declared in /home/virtual/site116/fst/var/www/html/shop/includes/functions/header_tags.php:8) in /home/virtual/site116/fst/var/www/html/shop/includes/functions/header_tags.php on line 8

 

any ideas how to fix this?

Link to comment
Share on other sites

The first error isn't referring to a HTC file but I would guess the application_top file has a problem. You need to go back over the instructions for that file.

 

Fixing the above problem may take care of the second one.

 

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 edited your includes/languages/header_tags.php file and the products in admin to add title and meta tags to each page?

 

I don't see any duplcate entries. Can you post a link? Maybe I'm not picking the right product.

 

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've just uploaded a new version.

 

I added the code to generate category meta tags and to display the page title as the header for the categories. The category tags are added in admin when you create.edit a category.

 

Also fixed some instruction errors, re-worded a lot of the instructions and rearranged the files in the archive to be less confusing (hopefully).

 

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,

 

I have HTC installed and working, but I am receiving oscommerce default items in my META tags.

 

For example, when I look at the source for my homepage, the following appears:

 

<META NAME="Description" Content="osCommerce : What's New Here? - Hardware Software DVD Movies J4Media provides custom design solutions for the Web, Home Theater, and eCommerce. We also offer world class hosting for your multi media needs. We locally service Suffolk County, NY - Smithtown, Long Island.">

 

Where is the osCommerce : What's new here..... stuff coming from????

 

Please help, I'm going crazy here :'(

Link to comment
Share on other sites

Those are coming from the includes/laguages/english/header_tags.php file. HTC comes with them added so you can see that it is working. You need to edit that file to what you want for your site.

 

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've just uploaded a new version.

 

I added the code to generate category meta tags and to display the page title as the header for the categories.  The category tags are added in admin when you create.edit a category.

 

Also fixed some instruction errors, re-worded a lot of the instructions and rearranged the files in the archive to be less confusing (hopefully).

 

Jack

 

Thanks for adding in category meta tags. That is a great feature.

 

The only problem is that when I have my Index.php title set and I have category titles (set in admin) I end up getting something like 'ABC123-' as my page title when I visit a category page, where 'ABC would be the title I have set up for my category and '123' is the title that I have set up as my HEAD_TITLE_TAG_DEFAULT for my Index.php page in header_tags.php (and just so you know I have the HEAD_TITLE_TAG_ALL set to blank). The title displays fine for the Index.php page and for each individual products page (I am assuming because I can manage how they behave in the header_tags.php under includes/languages/english. Is there a way to have more control over how the category title is displayed - like maybe in the header_tags.php file mentioned above? And why would it be using the Index.php default title tag instead of one for categories or the HEAD_TITLE_TAG_ALL that pages without specified titles are suppose to use?

Or is it possible that I actually just have something messed up with my install and the whole category meta tags thing actually is working fine for everyone else?

 

Thanks,

Kathy

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