Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Olorin,

 

catalog/includes/languages/english/header_tags.php is the file you're looking for. It has all the default titles and tags for the site there. If you use other languages, simply copy the file to the appropriate language directory and make the appropriate changes.

 

As you enter/edit products in the admin screen you'll see the area to enter in titles, descriptions and keywords for each specific product.

 

There's also additional information on general use in the README to Operate.txt file that comes with version 2.2 that may help as well.

 

HTH,

 

-C

Link to comment
Share on other sites

Now, this is a "behind the scenes" contrib right? How do I know if the meta tags are actually there and working for serch engines to find?

If you look at the "view source" option in your browser you should see the tags you entered. It should be headed with <!-- BOF: Generated Meta Tags -->.

 

-C

Link to comment
Share on other sites

I am having problems with the 3 images in The header tags controller contribution. I added the 2 fields to my database for medium, and large images. I get a message that says that the files were uploaded successfully. But when I click on the product, I get a thumbnail for all three pictures. Any clue?

Thanks,

kevin

Link to comment
Share on other sites

ive just installed this contribution and i get a parse error in admin/categories.php (error in bold):

 

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . '  <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>

</tr>

</table></form>

---

what can it be??

thanks!

Link to comment
Share on other sites

I seem to have a problem... My header_Tags.php doesn't include all the pages that I have, such as index.php, or alot of them.. Also, I don't see where I can edit the title either... Does anyone have a text file with all the stuff for all the pages, and where I might enter the description?

Link to comment
Share on other sites

I belive the way they will be "inlcuded" is by replacing

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

with:

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

on any of the pages you want to have meta tags in. They will be automatically generated by the header tags contrib.

In order to specify/define what you want your tags to be/say, edit the header_tags.php in catalog/includes/languages/english. Not all pages are individually specified. Just read what's there. The first set is "For all pages not defined or left blank, and for products not defined" so you'll want to create descriptions and keywords for the site in general in that one. You'll get the hang of it.

So far the only meta tags you can define in the admin area are the ones for individual products.

 

Does that help?

Edited by millyramsey
Link to comment
Share on other sites

It helped greatly. I've got it all figured out, but now that I've figured out most of it, what kind of things should I put in the following

 

head_title_tag. I've got this one figured out

What kind of words should I put into head_desc_tag, stuff like for the video game mortal kombat, put something like 'games, ps2, mortal kombat, kang,' stuff? I put a more descriptive option in mine, tell me if you think this is fine?

 

define('HEAD_DESC_TAG_DEFAULT','LEDs, or L.E.D. s for wholesale prices. Only the highest quality light emitting diodes here. We have Blue Red Green Orange Amber Red and UV leds. Prices as low as 35 cents 3mm 4000mcd or 5000mcd or 6000mcd or 3.3 volts or 3.5 volts 20ma');

 

And I have no idea what goes in HEAD_KEY_TAG.

 

 

Thanks again for all the help, you've been an insane help thus far!

Link to comment
Share on other sites

Olorin, was your update done on a clean install? If so, can you email the updated files that you did. I'm getting undifined function errors.

 

Thanks!

 

[email protected]

Knowledge Base | Contributions | Tips & Tricks Forum

 

There are things known and there are things unknown, and in between are the doors.

-- Jim Morrison

Link to comment
Share on other sites

hello,

 

I have downloaded the HTC and now I'm trying to understand the procedure. Can some1 verify my so-called guideline before I start messing w/ those files:

 

admin section

=============

 

1)edit file : admin/includes/function/general.php

2)edit file : admin/includes/languages/english/categories.php

3)edit file : admin/categories.php

*the details in in README to Admin

 

 

Catalog section

===============

 

1)run header.sql file .. or use phpmyadmin

 

2)add new files

a)/catalog/includes/header_tags.php

B)/catalog/includes/languages/english/header_tags.php

c)/catalog/includes/languages/espanol/header_tags.php

d)/catalog/includes/functions/clean_html_comments.php

e)/catalog/includes/functions/header_tags.php

 

3)edit file /catalog/includes/application_top.php

 

4)make a change to ALL FILES(~35 files) in "catalog" that contains

certain code (any idea what's the easiest way to do this?)

 

thx

seru

Link to comment
Share on other sites

ive just installed this contribution and i get a parse error in admin/categories.php (error in bold):

 

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . '  <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>

</tr>

</table></form>

---

what can it be??

thanks!

ive just installed this contribution and i get a parse error in admin/categories.php (error in bold):

 

Soulfly, Im not a php expert, but I have had to fix a lot of these parse errors in my files as Ive added this mod or another. Instead of "bolding" the error, could you please list exactly what the error message says. Such as Parse error on line ???? and then copy and paste that line (or the whole thing)

 

Ill see if I can help

Tammy

Link to comment
Share on other sites

ive tried getting this thing to work but im a newbie so i am having a few problems!!

i keep getting thje folowing error

 

======================================================

Parse error: parse error in /usr/local/psa/home/vhosts/ipodskins.co.uk/httpdocs/includes/application_top.php on line 74

 

Warning: main(DIR_WS_LANGUAGES/FILENAME_DEFAULT): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/ipodskins.co.uk/httpdocs/index.php on line 36

 

Fatal error: main(): Failed opening required 'DIR_WS_LANGUAGES/FILENAME_DEFAULT' (include_path='.:/usr/local/lib/php') in /usr/local/psa/home/vhosts/ipodskins.co.uk/httpdocs/index.php on line 36

==========================================================

 

it only happens when i stick the code into application_top.php

 

thanks

Link to comment
Share on other sites

here are the lines respectivley

 

===============================

 

Add to /includes/application_top.php

 

===========================================

 

 

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

 

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

Edited by ipodskins
Link to comment
Share on other sites

I'm not sure where you got that bit of code to add to application_top. This is what it should be

Add to /catalog/includes/application_top.php:

 

 

// BOF: WebMakers.com Added: Header Tags Controller v1.0

  require(DIR_WS_FUNCTIONS . 'header_tags.php');

// Clean out HTML comments from ALT tags etc.

  require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE

// EOF: WebMakers.com Added: Header Tags Controller v1.0

Be sure that you add the code to the very bottom of application_top, just before the closing ?> tag.

 

 

Perhaps you should re-read the instructions.

 

 

(Also, if you are using MS2, there is no default.php, it is now index.php)

Link to comment
Share on other sites

No matter what page I visit on my site, I get the same title, except for one product out of my 500 or so. Can someone please explain to me what I am supposed to do to get a unique title for each page?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi All

 

Have just started playing with some of the many great contributions on here.

After making the Admin Mods I am getting the following error on the preview page:

 

Warning: reset(): Passed variable is not an array or object in path/to/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /path/to/admin/includes/classes/object_info.php on line 18

 

I apologise if this has been addressed before or I am just being dumb!

So far I have installed STS Template system as well as this.

 

TIA for any help.

 

Dave

"Imagination is more important than knowledge" - Albert Einstein

Link to comment
Share on other sites

Catalog section

===============

 

1)run header.sql file .. or use phpmyadmin

I've just started to work on this myself. Could someone please clue me in as to what "header.sql" and "phpmyadmin" are, where to find it, how to "run", what it does, etc? Thanks.

Link to comment
Share on other sites

Catalog section

===============

 

1)run header.sql file .. or use phpmyadmin

I've just started to work on this myself. Could someone please clue me in as to what "header.sql" and "phpmyadmin" are, where to find it, how to "run", what it does, etc? Thanks.

In order to use Header Tags, you need to add some new tables to your database. In earlier versions of HTC, the instructions just said that you need to make those changes. In the latest version, the header.sql file was added. With it, you can just upload the file and the changes will be made for you.

 

phpmyadmin is a program that allows you to work with your database via your browser - it, too, makes things easier. You need to install it on your server the same way OSCommerce was installed. Do a google search to find a place to download it from (it's free). If your host supports OSCommerce, they may be willing to install it for you or your control panel may have an option to enable it.

 

HTH,

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

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.
Note: Your post will require moderator approval before it will be visible.

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