Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

You made some mistake in the changes for the index.php file. The parser is going to the end of the file so the error is probably an extra or missing }. You will just need to to that file over to find the problem.

 

Jack

 

Thanks Jack you were right. I went over index.php, corrected the mistake and finished the installation. :)

 

I have nother question :blush:

I'm trying to use the Page Control of the Admin section, especifically to add particular meta tags to the other pages (for examples, specials). So, on the "Add a New Page" section, I type the page name (specials.php), leave all the switches unchecked and enter the particular title, description and keywords. Then I click on the Update button right below the keywords. The page refreshes and comes back looking exactly the same (no error messages or confirmation that the changes were done). When I go to the Text Control page the specials page is still marked in red and the particular tags are not set. What am I missing?

 

Thanks!

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Page Control is used to add new pages. Header Tags comes setup with the code for specials so you shouldn't have to do anything with it in Page Control. If the text is red in Text Control, it means you don't have the title code installed for that page and Header Tags won't work.

 

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

You should be able to delete the All Products entry without any problems. However, if you have delted your index page and added it back in, you have broken the code since the index page is a psecial case. You will need to compare your includes/header_tags.php file with the original to fix that.

 

Jack

 

 

Ok, i understand that index.php is a special case and i can live with that, but with the allprods one i deleted why would the only tags being shown be the default ones for all pages?

Link to comment
Share on other sites

I'm sorry but I don't have an answer for that. If you look in the includes/languages/english/header_tags.php file, you will see the text that is displayed for the index page. Maybe it is set wrong and is not clearing due to that page being deleted?

 

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

just a quickie, but is there a reason why on lines 477 to 480 in the file includes/header_tags.php:

 

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

 

the closing '>' has a '/' before it? I know that I tried validating the page the other day and it returned an error, saying this was not a valid way to code the page.

 

many thanks, Luke

Link to comment
Share on other sites

Page Control is used to add new pages. Header Tags comes setup with the code for specials so you shouldn't have to do anything with it in Page Control. If the text is red in Text Control, it means you don't have the title code installed for that page and Header Tags won't work.

 

Jack

 

Thanks Jack. I added the appropriate code to the pages (as instructed on install_catalog.txt :blush: ) and it's working now. Well, I still have to figure out why the HTKA parameter doesn't work for my Specials page (and ony this one!). I leave that unchecked and type the particular keywords, but it's still appending the default keywords. Does anyone have the same problem?

Link to comment
Share on other sites

just a quickie, but is there a reason why on lines 477 to 480 in the file includes/header_tags.php:

 

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

 

the closing '>' has a '/' before it? I know that I tried validating the page the other day and it returned an error, saying this was not a valid way to code the page.

 

many thanks, Luke

It's xhtml. See a few pages back for a further explanation. You can remove it if you want.

 

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 Jack. I added the appropriate code to the pages (as instructed on install_catalog.txt :blush: ) and it's working now. Well, I still have to figure out why the HTKA parameter doesn't work for my Specials page (and ony this one!). I leave that unchecked and type the particular keywords, but it's still appending the default keywords. Does anyone have the same problem?
You found a bug in the code it seems. Try changing
	} else {
  $tags_array['keywords']= HEAD_KEY_TAG_SPECIALS . ' ' . HEAD_KEY_TAG_ALL;
}

to

	} else {
   if ( HTKA_SPECIALS_ON=='1' ) {
	$tags_array['keywords']= HEAD_KEY_TAG_SPECIALS . ' ' . HEAD_KEY_TAG_ALL;
   } else {
	$tags_array['keywords']= HEAD_KEY_TAG_SPECIALS;
   }
}

There is still a problem with the other code in that seciton, from a fast look at it, but this should fix the immediate 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

Hi

Can anyone see an error here, i created a page, added it via the page control, it appears ok, and in black.

 

Here is the page..

<?php

/*
 $Id: designerclassics.php,v 1.00 2006/07/31 Phil Pearce $
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2003 osCommerce
 Released under the GNU General Public License

*/

 require('includes/application_top.php');

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

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_DESIGNER_RANGE));

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<?php
// BOF: Header Tag Controller v2.5.7
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.5.7
?>


<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">


<?php
if (DISPLAY_DHTML_MENU == 'CoolMenu') {
	 echo '<script LANGUAGE="JavaScript1.2" SRC="includes/coolMenu.js"></SCRIPT>';
}

?>

</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">


<?php
if (DISPLAY_DHTML_MENU == 'CoolMenu') {
	 require(DIR_WS_INCLUDES . 'coolmenu.php');
}

?>

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH_LEFT_IS; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT_IS; ?>" cellspacing="0" cellpadding="2">


<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

</table></td>

<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>
		<td class="pageHeading" align="right"><?php //echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><?php echo tep_get_defined_content('Designer-Range'); ?> <?php //echo TEXT_INFORMATION; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
		   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

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


<td width="<?php echo BOX_WIDTH_RIGHT_IS; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT_IS; ?>" cellspacing="0" cellpadding="2"> 

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

</table></td>
 </tr>
</table>


<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>


<br>
</body>
</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

in the english.header_tags.php

// DEFINE TAGS FOR INDIVIDUAL PAGES
// designerclassics.php
define('HTTA_DESIGNERCLASSICS_ON','1');
define('HTDA_DESIGNERCLASSICS_ON','1');
define('HTKA_DESIGNERCLASSICS_ON','1');
define('HEAD_TITLE_TAG_DESIGNERCLASSICS','Test');
define('HEAD_DESC_TAG_DESIGNERCLASSICS','Test');
define('HEAD_KEY_TAG_DESIGNERCLASSICS','Test');

 

Nothing apart from the default is being displayed. Can anyone help? I can give access to the files if needed??

URL

Link to comment
Share on other sites

You found a bug in the code it seems. Try changing
	} else {
  $tags_array['keywords']= HEAD_KEY_TAG_SPECIALS . ' ' . HEAD_KEY_TAG_ALL;
}

to

	} else {
   if ( HTKA_SPECIALS_ON=='1' ) {
	$tags_array['keywords']= HEAD_KEY_TAG_SPECIALS . ' ' . HEAD_KEY_TAG_ALL;
   } else {
	$tags_array['keywords']= HEAD_KEY_TAG_SPECIALS;
   }
}

There is still a problem with the other code in that seciton, from a fast look at it, but this should fix the immediate problem.

 

Jack

 

Sorry Jack, but which file should I change? Thanks!

Link to comment
Share on other sites

Hi

Can anyone see an error here, i created a page, added it via the page control, it appears ok, and in black.

 

Here is the page..

Nothing apart from the default is being displayed. Can anyone help? I can give access to the files if needed??

URL

Does the page display correctly if you delete it from Page Control? There is nothing that Header Tags adds that would cause such a change so I think your problem is elsewhere.

 

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,

 

First, thank you for this contribution...

 

I have installed it succesfully or so it seems so far... :blush:

 

my question to you is... can I create tags for individual products?

 

I have been able to set the ones for my index page and the product info and others... with general terms to their content...

 

It would really help my business though if I could create them for individual products or at least individual categories...

 

Did I miss something or am I asking too much and this is something that isn't possible to do at all?

 

Thanks again

Link to comment
Share on other sites

Hi

 

I have a problem with a new install of this contrib.

 

Im a complete newbie with this so bear with me!

 

I have tried to install by placing the database_setup.php file in my store directory, but then I go to www.mystore.com/store/database_setup.php I get -

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/ill007/public_html/store/includes/header.php:161) in /home/ill007/public_html/store/includes/boxes/categories.php on line 13

 

Whats the problem?

 

Thanks in advance!

Link to comment
Share on other sites

Hi Jack,

 

 

 

my question to you is... can I create tags for individual products?

 

 

Sorry I guess I am missing details here... I can see how each of my products now have more info... I wish I would have been able to write them individually...

 

so my question is more... is there a way I can do this... or the only would be to give more descriptive names to my products?? (which in my case will be very hard)

 

thanks

Link to comment
Share on other sites

Hi

 

I have a problem with a new install of this contrib.

 

Im a complete newbie with this so bear with me!

 

I have tried to install by placing the database_setup.php file in my store directory, but then I go to www.mystore.com/store/database_setup.php I get -

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/ill007/public_html/store/includes/header.php:161) in /home/ill007/public_html/store/includes/boxes/categories.php on line 13

 

Whats the problem?

 

Thanks in advance!

You are probably using a template in which they reproduce some of the code, causing that problem. If you search the forums for tep_show_category you will find explanations of how to fix that.

 

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

Sorry I guess I am missing details here... I can see how each of my products now have more info... I wish I would have been able to write them individually...

 

so my question is more... is there a way I can do this... or the only would be to give more descriptive names to my products?? (which in my case will be very hard)

 

thanks

Go to admin->Header Tags->Fill Tags, select the Fill All buttons and update. Or go into the category or product edit page and edit them individually.

 

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

V 2.5.9 doesn't have any problems that I am aware of, except for the one mentioned above regarding the specials code. I don't know what changes are in the other updates so I can't say if they work or not.

 

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

You are probably using a template in which they reproduce some of the code, causing that problem. If you search the forums for tep_show_category you will find explanations of how to fix that.

 

Jack

 

 

Hi Jack,

 

I renamed the tep_show_catergory to tep_show_catergory_template.

 

Now i get this -

 

Looks like Header Tags is already installed. Aborting...

 

I am nearly sure I have never tried to install this contrib before, if say I did, what file would I need to remove?

 

All I know is that I dont have the header tags for each item, all I have is the SEO urls thingy

Link to comment
Share on other sites

Hi Jack,

 

I renamed the tep_show_catergory to tep_show_catergory_template.

 

Now i get this -

 

Looks like Header Tags is already installed. Aborting...

 

I am nearly sure I have never tried to install this contrib before, if say I did, what file would I need to remove?

 

All I know is that I dont have the header tags for each item, all I have is the SEO urls thingy

It sounds like you tried to run the database setup from the browser after it has already been ran. It will only allow you to run it once. It just means that the database changes have been installed. You still need to make the code changes. If you have not ran the database setup, then I would be wary of the database since it has something in there to do with Header Tags.

 

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

It sounds like you tried to run the database setup from the browser after it has already been ran. It will only allow you to run it once. It just means that the database changes have been installed. You still need to make the code changes. If you have not ran the database setup, then I would be wary of the database since it has something in there to do with Header Tags.

 

Jack

 

 

Hi Jack,

 

Ok tried to implement the code changes, nearly broke the store, I had to restore the index.php and product_info.php back to the orig files. Also some of the code it says to change in the install notes doesnt exsist in my bulid or else its hacked up. I suspect this is beacuse we are using a templated store?

 

I need someone to install for me, somebody who knows what they are at and I shall pay for this service.

 

Please PM me with any offers and a quote for a 'header tags controller install'.

 

Thanks

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