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 think we are talking about two different things. The title of the page and the meta tags should not be html formatted. The categories description can be formatted. Please let me know which problem you are working on so I can stay with you.

 

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

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Im confused too, i guess becaues there are many category pages. When i redid the instructions for the admin/categ page for this contribution 2.5.5, those tag sections disappeared that i first showed you in my first screenshot. Now it only shows prod description. now when i click on a category, the right hand side shows this below, but again no text space, i think im totally lost

 

headertags.jpg

 

Screenshot for my first problem is above this reply, and then this is the other problem, the second problem i have is when i click on "fill all tags" but it never stays there, it keeps going back to "skip tags" no matter what i do

Link to comment
Share on other sites

You are using an edited version of Header Tags so I'm afraid I can't help you. I don't use the editor so I can't say if it works or not (although it should).

 

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

thanks. im not using an edited version at all, im using the exact one 2.5.5. the wysiwyg was already installed in my categories. ill figure it out myself, thanks

Link to comment
Share on other sites

i finally got it, i changed to this:

// HTC BOC

$contents[] = array('text' => '<br>' . 'Header Tags Category Title' . '<br>' .

 

tep_draw_input_field('htc_title', '', 'size="30"'));

 

$contents[] = array('text' => '<br>' . 'Header Tags Category Description' . '<br>' .

 

tep_draw_input_field('htc_desc', '', 'size="30"'));

 

$contents[] = array('text' => '<br>' . 'Header Tags Category Keywords' . '<br>' .

 

tep_draw_input_field('htc_keywords', '', 'size="30"'));

 

$contents[] = array('text' => '<br>' . 'Header Tags Categories Description' . '<br>' .

 

tep_draw_input_field('htc_description', '', 'size="30"'));

 

// HTC EOC

thanks!

 

One more question though, why are we putting

'Header Tags Category Description' AND

'Header Tags Categories Description'

Isnt it the same thing ?

Link to comment
Share on other sites

Uhhh im fed up. I enter the words for keywords, etc, and then when I edit it, all the words are gone. this contribution is just too complicated and not working right for me

Link to comment
Share on other sites

While the two names appear similiar, one is for the description meta tag and the other is for the category description that gets displayed on the page.

 

If the admin tool is not working correctly, it could be a number of things. All that tool does is write to the includes/header_tags.php and english/header_tags.php files. So try adding the text you want right in the english/header_tags.php file. If that works, then it is probably a prmissions problem. If it doesn't, then you have something wrong woth the installation.

 

If you followed the install instructions though, this last step would have already been done since the instructions tell you to check the title in the shop before continuing.

 

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

Jack

Yes adding text to the english/headers pages does show up in the view source, but I want to be able to add words depending on the category i am working on, so i was adding words on the actual admin/categ pages and it doesnt do a thing

Link to comment
Share on other sites

The text you add for a category is stored in the database. Are you saying that if you go to admin->catalog, click on edit for a category, enter some text into the meta fields and save it, the new text is not there the next time you look? If so, then there something wrong with your admin/categories.php file. If you replace that file with the one from the contribution and it works, then the problem is with the editor you are using.

 

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

Yes thats exactly what i mean!! (Are you saying that if you go to admin->catalog, click on edit for a category, enter some text into the meta fields and save it, the new text is not there the next time you look?)

Thats exactly what i mean, and if i view source of the page i just entered keywords for, there are no keywords. the odd thing is, i followed every single instruction carefully and then even restored my backup file and did it again, and it still not working. i cant figure this out. im afraid to replace the file , since i did other contributions. actually i looked and i didnt see any files for the admin/catalog; i didnt see that the contribution had copies of the file. thansk for your help

Link to comment
Share on other sites

Nope, i just copied the entire admin/categ file to mine and it still doesnt work; im still ONLY getting the default keywords, and none of the ones i type in the categ page

Link to comment
Share on other sites

Haha, it was my index page that was all wrong, I got everything working now except keywords, now the keywords are just the default ones but maybe thats the option i change in the header_tags, thanks for everything!!

Link to comment
Share on other sites

Hi guys,

I just installed this contribution, it works fine for category pages but when I try to add for products either by autofill or manually I get:

 

Fatal error: Call to undefined function: clean_html_comments() in /home/fullthro/public_html/catalog/includes/header_tags.php on line 187

 

I'm new to this, so some help please.

Also when manually editing a category, why is there two spots for a "Category Description".

Can anyone point me to a sitemap contribution that plays nice with this cont.

Thanks alot to those responsible for this contribution and for any help.

Link to comment
Share on other sites

Hi guys,

I just installed this contribution, it works fine for category pages but when I try to add for products either by autofill or manually I get:

 

Fatal error: Call to undefined function: clean_html_comments() in /home/fullthro/public_html/catalog/includes/header_tags.php on line 187

 

I'm new to this, so some help please.

Also when manually editing a category, why is there two spots for a "Category Description".

Can anyone point me to a sitemap contribution that plays nice with this cont.

Thanks alot to those responsible for this contribution and for any help.

Any sitemap should work with Header Tags, as long as you add the code to the head of the file. See my signature for Dynamic Sitemap.

 

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've noticed that if you go to the Text Control page and then to the index.php section, if you specify a default Title and Description for index.php it is overridden if you put a Title and description for the Categories (when you edit the category tags individually). I like this. But I've also noticed that if you put keywords for index.php and for the categories then it will connect all the keywords together. Is there anyway to have it only use the index.php for the main catalog index, then only use the category keywords for the catgories? I hope that isn't too confusing :)

 

Nevermind, I figured it out:

 

I changed this:

 

		  if (HTTA_CAT_DEFAULT_ON=='1') {
		$tags_array['keywords']= $the_category['categories_htc_keywords_tag'] . ' ' . HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;
	  } else {  
		$tags_array['keywords']= $the_category['categories_htc_keywords_tag'] .  ' ' . HEAD_KEY_TAG_DEFAULT;
	  }

 

To this:

 

		  if (HTTA_CAT_DEFAULT_ON=='1') {
		$tags_array['keywords']= $the_category['categories_htc_keywords_tag'] . ' ' . HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;
	  } else {  
		$tags_array['keywords']= $the_category['categories_htc_keywords_tag'];
	  }

Link to comment
Share on other sites

Hi. I seem to be having a problem with the same issue as somebody who recently posted. No matter what I try, the category name never appears in the title bar, nor do the names for the products on their respective pages' title bars.

 

Anybody hae some ideas?

 

Some background: I've had a topic going on this on the installation forum (http://www.oscommerce.com/forums/index.php?showtopic=177874)

Early on, I needed to install the registe_globals patch.

 

Thank you very much.

Bruce

Link to comment
Share on other sites

Hi,

I found the post with the explaination for the two category descriptions, Thanks.

Also thanks to Jack for giving me what looks like another great contribution.

I'm looking foward to installing after I get this figured out.

 

Still having this Fatal Error problem. It reads:

 

Fatal error: Call to undefined function: clean_html_comments() in /home/fullthro/public_html/catalog/includes/header_tags.php on line 187

 

This error comes up when I autofill or manually input meta tags to products and then try to view the products page.

 

I am new to php and osCommerce, but what I have gathered so far is this.

In clean_html_comments.php there is a warning that reads:

 

BE CAREFUL NOT to use this function where it will effect currencies.php or the listings for product name

This is used for cosmetic purposes for what the visitor sees and not for what the php code sees. The php code needs to see the HTML comment tags.

 

I Don't think I took this to heart, and I think its what is causing my problem. Real sorry but I installed this before hurricane Wilma came and took the power away, now that its back up I am having trouble remembering what I did. Thanking you in advance. -Jay

Link to comment
Share on other sites

Hello

 

I am really hoping someone can help :D (as i guess mst are!). Will be very concise and offer a reward!

All Fine untill I reach lines in index.php to replace. Will post code sorry if the post is long.

 

 

THIS IS WHAT I HAVE OT DO (from the instuctions)

 

Around line 78:

 

 

 

Find

 

 

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

</tr>

 

 

 

and replace it with

 

 

 

<td><h1><?php echo $category['categories_htc_title_tag']; ?></h1></td>

 

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

</tr>

 

<?php if (tep_not_null($category['categories_htc_description'])) { ?>

 

<tr>

 

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

 

</tr>

 

<tr>

 

<td><h2><?php echo $category['categories_htc_description']; ?></h2></td>

 

</tr>

 

<?php } ?>

 

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

 

Around line 247:

 

 

 

Find

 

 

 

?>

 

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

<tr>

 

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

<tr>

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

 

 

and replace it with

 

 

 

$category_query = tep_db_query("select cd.categories_htc_title_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

 

$category = tep_db_fetch_array($category_query);

 

?>

 

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

<tr>

 

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

<tr>

 

<td><h1><?php echo $category['categories_htc_title_tag']; ?></h1></td>

 

 

 

 

 

Around line 294

 

 

 

Find

 

 

 

<td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

</tr>

 

 

 

REPLACE with

 

 

 

<td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, $category['categories_htc_title_tag'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

</tr>

 

<?php if (tep_not_null($category['categories_htc_description'])) { ?>

 

<tr>

 

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

 

</tr>

 

<tr>

 

<td><h2><?php echo $category['categories_htc_description']; ?></h2></td>

 

</tr>

 

<?php } ?>

 

 

 

3 Instructions Here is my file

 

link to file

 

link

 

zip

 

 

I dont know what to do to be frank!

Any help with any of the 3 would be brilliant. Will sort you out some guitar related stuff or a ?10? or somthing smile.gif

 

Cheers

James

Link to comment
Share on other sites

Hi,

I found the post with the explaination for the two category descriptions, Thanks.

Also thanks to Jack for giving me what looks like another great contribution.

I'm looking foward to installing after I get this figured out.

 

Still having this Fatal Error problem. It reads:

 

Fatal error: Call to undefined function: clean_html_comments() in /home/fullthro/public_html/catalog/includes/header_tags.php on line 187

 

This error comes up when I autofill or manually input meta tags to products and then try to view the products page.

 

I am new to php and osCommerce, but what I have gathered so far is this.

In clean_html_comments.php there is a warning that reads:

 

BE CAREFUL NOT to use this function where it will effect currencies.php or the listings for product name

This is used for cosmetic purposes for what the visitor sees and not for what the php code sees. The php code needs to see the HTML comment tags.

 

I Don't think I took this to heart, and I think its what is causing my problem. Real sorry but I installed this before hurricane Wilma came and took the power away, now that its back up I am having trouble remembering what I did. Thanking you in advance. -Jay

Be sure your includes/application_top.php file has the correct code for header tags and make sure you have the clean_html file in the functions directory. One of those is probably your problem.

 

Jack

 

 

Hello

 

I dont know what to do to be frank!

Any help with any of the 3 would be brilliant. Will sort you out some guitar related stuff or a ?10? or somthing smile.gif

Are you asking how to edit the file?

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Well Yes My index.php files doesnt have the same lines of code as the text file wants me to change.

 

has 'similar'

 

I know a little and have tried and failed for a while now. If anyone can tell me what I should change then that would be sweet. As im asking for help I will reward if you like :)

 

Thanks for the reply Jack

 

Cheers

James

Link to comment
Share on other sites

Hi,

Jack thanks for replying. Do you mean the code from the instructions saying

at the end of the file right before the last ?>
// BOF: WebMakers.com Added: Header Tags Controller v2.5.2
 require(DIR_WS_FUNCTIONS . 'header_tags.php');
// Clean out HTML comments from ALT tags etc.
 require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// EOF: WebMakers.com Added: Header Tags Controller v2.5.2

NOTE: if already using FREE-CALL FOR PRICE Add-on you do not need 
to add the clean_html_comments.php to application_top as you should 
already have it there.

NOTE for STS Users: The above also applies to STS shops but does not 
always work for some reason. If your STS shop fails, in your sts_output.php file, 

FIND
require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
require(DIR_WS_FUNCTIONS . 'header_tags.php');
CHANGE TO
require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
require_once(DIR_WS_FUNCTIONS . 'header_tags.php');

 

Because it is there, and I do have the clean_htmls_comments.php in the catalog/includes/functions folder.

Thanks so much for your help with this.

Link to comment
Share on other sites

Hi,

me again, I thought I should show you what I have for apllication_top.php just to make sure this is the end part of that page:

// set which precautions should be checked
 define('WARN_INSTALL_EXISTENCE', 'true');
 define('WARN_CONFIG_WRITEABLE', 'true');
 define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
 define('WARN_SESSION_AUTO_START', 'true');
 define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');

// BOF: WebMakers.com Added: Header Tags Controller v2.5.2
require(DIR_WS_FUNCTIONS . 'header_tags.php');
// Clean out HTML comments from ALT tags etc.
require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// EOF: WebMakers.com Added: Header Tags Controller v2.5.2
?>

Link to comment
Share on other sites

I filled in some title, description and keywords in product admin page and it showed up on the products page like it should.

 

I then removed the page product_info from admin -> header tags -> text control since i thought that page wasnt needed since i filled in the info above.. and now the tags in mu shop are gone on the product page! I added product_info.php in admin again but the tags do not show on the product page.. and yes, the info is still in admin -> catalog -> the product...

 

Somebody pleas help me.. the tags are showing on all other pages.. but not on the product pages. I have not modified the php files during this..

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