Jack_mcs Posted July 30, 2007 Share Posted July 30, 2007 As one can see from the partial screen shot above, my admin menu is missing the Header Tags item. The catalog section of the contribution was installed correctly because its home page's title is "Home Page". So I must have made an error when installing the admin part. Where did I go wrong? My catalog is only days old and this is the first contribution I have attempted installing. Prior to attempting that install, I had made a few minor changes, all of which I can't recall but one was to do with changing the title of the home page. The Install_Catalog.txt file states in part: Well, from what I stated above, I didn't think my catalog could not really have been considered to be clean (even though the Header Tags Controller contribution would have been my first one). So, just to be on the safe side, instead of copying the files from the "catalog_for_new_shop_only" folder, I took the longer route. Unfortunately, this seems not to have worked. If you have made the required code change to the admin/includes/column_left.php file, then it might be because you have a contribution like admin access installed, which requires files to be enabled before they can be seen. If you don't have such a contribution, please post your admin/includes/column_left.php file here. Jack Quote 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 More sharing options...
abajan Posted July 31, 2007 Share Posted July 31, 2007 If you have made the required code change to the admin/includes/column_left.php file, then it might be because you have a contribution like admin access installed, which requires files to be enabled before they can be seen. If you don't have such a contribution, please post your admin/includes/column_left.php file here. Jack No, I don't have any other contributions installed but I do know what I did wrong - I uploaded files from the wrong admin folder (catalog/admin instead of catalog_for_new_shop_only/admin)! :blush: Look, to save any hassle, I'm going to delete my entire catalog and start over. It's no big deal because it's pretty new and no customers know about it as yet anyway. After that, I'll install the Header Tags Controller contribution. Thanks for your help, though. Cheers. Quote Link to comment Share on other sites More sharing options...
gabicho Posted July 31, 2007 Share Posted July 31, 2007 That error is from admincategories.php a mi tambien me sale ese error lo pudiste solucionar Quote Link to comment Share on other sites More sharing options...
bkellum Posted August 1, 2007 Share Posted August 1, 2007 okay figured it out the instructions say make sure its like this 'sts_user_code.php;headertags.php', but for some reason when i drop the ' it works fine. go figure....No, you would not want to put the apostrophe around the filenames. It was placed in the instructions only to put "emphasis" on the edit. :lol: Quote 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 More sharing options...
gregNwt Posted August 1, 2007 Share Posted August 1, 2007 A question to help me understand how HTC works especially when SEO URLs are being re-written. I have SEO urls that seems to change all URLS to category pages from http://www.rpc.com.au/catalog/index.php?cPath=105 to http://www.rpc.com.au/catalog/appliances-c-1.html (similar to product pages) http://www.rpc.com.au/catalog/product_info...?product_id=624 is re-written http://www.rpc.com.au/catalog/ttowel-energ...ture-p-624.html How does HTC know that the re-written url is really one of the pages that HTC is setup for (index.php, products_info.php) ?? eg If I call the SEO re-written url http://www.rpc.com.au/catalog/appliances-c-1.html HTC wont add the header tags. Are there any server setup issues that may make the 2 contribs not work together ??? Quote Link to comment Share on other sites More sharing options...
Eighteen48 Posted August 1, 2007 Share Posted August 1, 2007 Quick question, in the Admin » Header Tags » Text Control, it states Note that is the title of a section appears in red, it means that file does not have the required Header Tags code installed and, as a result, will not display the title or meta tags defined here. All of my sections are red, but they display the info on the Text Control page, but they wont display what is written in the "Header Tags Categories Description" section (the larger text box out of the two) on the category page in the catalog section, but it will display the first "Header Tags Categories Description". What am I missing, I have the header tags code installed per the instructions of HTC for STS, as i am running STS for osC RC1. Quote Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0 Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 1, 2007 Share Posted August 1, 2007 A question to help me understand how HTC works especially when SEO URLs are being re-written. I have SEO urls that seems to change all URLS to category pages from http://www.rpc.com.au/catalog/index.php?cPath=105 to http://www.rpc.com.au/catalog/appliances-c-1.html (similar to product pages) http://www.rpc.com.au/catalog/product_info...?product_id=624 is re-written http://www.rpc.com.au/catalog/ttowel-energ...ture-p-624.html How does HTC know that the re-written url is really one of the pages that HTC is setup for (index.php, products_info.php) ?? eg If I call the SEO re-written url http://www.rpc.com.au/catalog/appliances-c-1.html HTC wont add the header tags. Are there any server setup issues that may make the 2 contribs not work together ??? The url's created by Ultimate SEO gets the name from the products name and Header Tags fills in the tags from the products name, so everything matches. Which page is being shown is handled by the server and both contributions take the page from there so each knows what page is being shown. Jack Quote 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 More sharing options...
Jack_mcs Posted August 1, 2007 Share Posted August 1, 2007 Quick question, in the Admin » Header Tags » Text Control, it states All of my sections are red, but they display the info on the Text Control page, but they wont display what is written in the "Header Tags Categories Description" section (the larger text box out of the two) on the category page in the catalog section, but it will display the first "Header Tags Categories Description". What am I missing, I have the header tags code installed per the instructions of HTC for STS, as i am running STS for osC RC1. The "red" problem might be a problem related to how STS adds the titles. Bill would be better able to answer that. For the Categories Description problem, are you saying you type something in, save it and it is not there when you edit that category? Jack Quote 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 More sharing options...
bkellum Posted August 1, 2007 Share Posted August 1, 2007 Quick question, in the Admin » Header Tags » Text Control, it states All of my sections are red, but they display the info on the Text Control page, but they wont display what is written in the "Header Tags Categories Description" section (the larger text box out of the two) on the category page in the catalog section, but it will display the first "Header Tags Categories Description". What am I missing, I have the header tags code installed per the instructions of HTC for STS, as i am running STS for osC RC1. You are not missing anything. You should ignore the sections in red as HTC is doing it's job telling you that you did not add the code to the individual pages. Since you are using STS, you do not need that code in the catalog side, just the admin side. As far as the category descriptions go, STS already allows you to add your custom descriptions by creating a category template. Adding the description in HTC would be redundant. If you absolutely wanted to add your descriptions in the admin, then you would need to edit the $headtertags placeholder in catalog/includes/modules/sts_inc/general.php to include the text from the categories_description table in your database. Quote 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 More sharing options...
Eighteen48 Posted August 1, 2007 Share Posted August 1, 2007 You are not missing anything. You should ignore the sections in red as HTC is doing it's job telling you that you did not add the code to the individual pages. Since you are using STS, you do not need that code in the catalog side, just the admin side. As far as the category descriptions go, STS already allows you to add your custom descriptions by creating a category template. Adding the description in HTC would be redundant. If you absolutely wanted to add your descriptions in the admin, then you would need to edit the $headtertags placeholder in catalog/includes/modules/sts_inc/general.php to include the text from the categories_description table in your database. Thanks Bill, for clearing this up and giving back my sanity well what little I have left. I was beating my head thinking "Oh No where did I mess up now!", haha. Glad to know for once everything is okay. Quote Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0 Link to comment Share on other sites More sharing options...
Eighteen48 Posted August 1, 2007 Share Posted August 1, 2007 When editing the headertags placeholder should i use the HTC instructions to add in the necassary code or is it already there and all I have to do is uncomment it out? Quote Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0 Link to comment Share on other sites More sharing options...
abajan Posted August 1, 2007 Share Posted August 1, 2007 Jack, I went ahead and deleted my old catalog, installed a new one and incorporated the Header Tags Controller. The Header Tags section now shows up in the admin menu, as it should. :thumbsup: Just one question: My home page's title is Home Page - osCommerce: instead of just Home Page. Is this normal? I've searched these forums and found a post from someone with a similar situation back in 2005. At that time, you replied that that was fine (or words to that effect). But we're now in 2007 and I don't know if changes were made to the contribution since the time of that post that would make Home Page - osCommerce: indicate there's a problem with my installation. Is there? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 1, 2007 Share Posted August 1, 2007 Jack, I went ahead and deleted my old catalog, installed a new one and incorporated the Header Tags Controller. The Header Tags section now shows up in the admin menu, as it should. :thumbsup: Just one question: My home page's title is Home Page - osCommerce: instead of just Home Page. Is this normal? I've searched these forums and found a post from someone with a similar situation back in 2005. At that time, you replied that that was fine (or words to that effect). But we're now in 2007 and I don't know if changes were made to the contribution since the time of that post that would make Home Page - osCommerce: indicate there's a problem with my installation. Is there? If you look in admin->Header Tags->Text Control, the title of the index page is Home Page and the default title is osCommerce. The HTTA box for the index section is checked, meaning to use both titles, thus Home Page - osCommerce. Jack Quote 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 More sharing options...
abajan Posted August 1, 2007 Share Posted August 1, 2007 If you look in admin->Header Tags->Text Control, the title of the index page is Home Page and the default title is osCommerce. The HTTA box for the index section is checked, meaning to use both titles, thus Home Page - osCommerce. Jack Thanks Jack. I think I'm slowly getting the 'hang of this', so to speak. Something else: To rid my catalog of the error stating: Warning: I am able to write to the configuration file: ***/htdocs/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. (where '***' represents my domain), I just set the permissions of that file to 444. Will that interfere with the funtioning of the Header Tags Controller in any way? If so, is there a better fix you can recommend to get rid of that error? Quote Link to comment Share on other sites More sharing options...
gregNwt Posted August 1, 2007 Share Posted August 1, 2007 RE HTC and SEo Urls and how HTC knows to add tags to re-written urls The url's created by Ultimate SEO gets the name from the products name and Header Tags fills in the tags from the products name, so everything matches. Which page is being shown is handled by the server and both contributions take the page from there so each knows what page is being shown. Jack Thanks Jack, The HTC contrib is filling tags nicely, all products descriptions have HTC elements added, and I can see SEO urls using the product_name to make a new url. I still need to get a grip on how HTC understands a re-written url. My issue is that with pages that have re-written URLs, HTC does not add the correct headers. http://www.rpc.com.au/catalog/index.php [gets the 'index' HTC headers from Text Control Page ] eg http://www.rpc.com.au/catalog/accessories-c-1_105.html [gets the 'Default' HTC headers from Text Control Page, not the text setup for index.php] What I am trying to figure is how does HTC know that a browser calling the above page, is really wanting the http://www.rpc.com.au/catalog/index.php?cPath=105 page, that HTC is configured to add headers too ..?? I did think that both these contribs were working untill the ISP did a server upgrade....and is why Im trying to get to the logic of how SEO and HTC work together .... Cheers. Quote Link to comment Share on other sites More sharing options...
trogette Posted August 2, 2007 Share Posted August 2, 2007 As far as the category descriptions go, STS already allows you to add your custom descriptions by creating a category template. Adding the description in HTC would be redundant. If you absolutely wanted to add your descriptions in the admin, then you would need to edit the $headtertags placeholder in catalog/includes/modules/sts_inc/general.php to include the text from the categories_description table in your database. This is exactly what I was discussing on the STS thread, and really how is it better to have templates for every category and manufacturer as well as the main index page, than to have the template access the same bits of database that it does for the metatags for each category and manufacturer and use 1 template file? Am I missing something obvious or is it just a question of personal preference? For one thing, it's going to be far easier for most customers of designers to change their text by typing in the admin panel than to tinker about in the template html... Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 2, 2007 Share Posted August 2, 2007 (edited) Thanks Jack. I think I'm slowly getting the 'hang of this', so to speak. Something else: To rid my catalog of the error stating: Warning: I am able to write to the configuration file: ***/htdocs/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. (where '***' represents my domain), I just set the permissions of that file to 444. Will that interfere with the funtioning of the Header Tags Controller in any way? If so, is there a better fix you can recommend to get rid of that error? Some servers require 400. Some won't allow you to set them from an ftp program. You should try your hosts control panel to see if it works that way. Either way though, it won't affect Header Tags. Jack Edited August 2, 2007 by Jack_mcs Quote 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 More sharing options...
Jack_mcs Posted August 2, 2007 Share Posted August 2, 2007 RE HTC and SEo Urls and how HTC knows to add tags to re-written urlsThanks Jack, The HTC contrib is filling tags nicely, all products descriptions have HTC elements added, and I can see SEO urls using the product_name to make a new url. I still need to get a grip on how HTC understands a re-written url. My issue is that with pages that have re-written URLs, HTC does not add the correct headers. http://www.rpc.com.au/catalog/index.php [gets the 'index' HTC headers from Text Control Page ] eg http://www.rpc.com.au/catalog/accessories-c-1_105.html [gets the 'Default' HTC headers from Text Control Page, not the text setup for index.php] What I am trying to figure is how does HTC know that a browser calling the above page, is really wanting the http://www.rpc.com.au/catalog/index.php?cPath=105 page, that HTC is configured to add headers too ..?? I did think that both these contribs were working untill the ISP did a server upgrade....and is why Im trying to get to the logic of how SEO and HTC work together .... Cheers. It doesn't appear that Header Tags is funtioning on your site.When I click around the category pages, the titles don't change. As for how it figures out the url, it doesn't. The url has nothing to do with Header Tags (and vice versa). Jack Quote 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 More sharing options...
gregNwt Posted August 2, 2007 Share Posted August 2, 2007 It doesn't appear that Header Tags is funtioning on your site.When I click around the category pages, the titles don't change. As for how it figures out the url, it doesn't. The url has nothing to do with Header Tags (and vice versa). Jack Yes, I noticed that HTC was not working correctly :) So do you mean that HTC does not look at a calling URL, but just relies on the HTC additions to pages like index.php and product_info.php to determine if it should add tags..(based on the text control page)? Say for the product_info page we have .... // BOF: Header Tag Controller v2.6.0 updated to 2.63 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 And in the included header_tags.php the case of PRODUCT_INFO.PHP case ( strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCT_INFO) or strstr($PHP_SELF,FILENAME_PRODUCT_INFO) ): This line appears to be saying that if the Constant FILENAME_PRODUCT_INFO (in my case define('FILENAME_PRODUCT_INFO', 'product_info.php'); matches the $_SERVER['PHP_SELF'] variable then set the $tags_array Perhaps this is the cause of the problem... My $_SERVER['PHP_SELF'] looks more like a SEO url than the FILENAME_PRODUCT_INFO constant. Echoing the $_SERVER['PHP_SELF'] variable at the bottom of my product_info page, shows it for example is :- Page Name /catalog/voltage-reducer-p-759.html So according to the case of 'product_info.php' in header_tags.php the $_SERVER['PHP_SELF'] variable will NOT match the constant FILENAME_PRODUCT_INFO and so no tags_array is set for use in the product_info.php page ..... Perhaps a better test would make make things come good ...... say use a re-written url signiture like "-p-" for a product page and "-c-" index page .... Thanks for the help. Quote Link to comment Share on other sites More sharing options...
gregNwt Posted August 2, 2007 Share Posted August 2, 2007 A better test for SEO and HTC where a server $SERVER['PHP_SELF'] is the SEO url not the defined FILENAME_PRODUCT_INFO or FILENAME_DEFAULT constants. I have added the test for "-p-" and "-c-" for the product_info pages and the index pages into the existing test to allow HTC to work with both SEO on and off. // PRODUCT_INFO.PHP case ( strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCT_INFO) or strstr($PHP_SELF,FILENAME_PRODUCT_INFO) or strpos($_SERVER['PHP_SELF'],"-p-")): // INDEX.PHP case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT) or strpos($_SERVER['PHP_SELF'],"-c-")) : So much happier now I have got to the bottom of the problem. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 2, 2007 Share Posted August 2, 2007 Perhaps a better test would make make things come good ...... say use a re-written url signiture like "-p-" for a product page and "-c-" index page .... Thanks for the help. There's no need. It works fine. I suggest getting the contributions installed correctly first then you can worry over how they do it. Jack Quote 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 More sharing options...
adam_gardner Posted August 2, 2007 Share Posted August 2, 2007 Hi guys, After a bit of hacking and messing about I think I have this working. However, my main catalogue page is showing the title - 'Home Page - Oscommerce' - how can I change this? Also, each category has the custom title (working fine) but then it has '- osCommerce :' tagged on the end. How can I remove this or alter it to say my site name?? DoA Quote Link to comment Share on other sites More sharing options...
gregNwt Posted August 3, 2007 Share Posted August 3, 2007 There's no need. It works fine. I suggest getting the contributions installed correctly first then you can worry over how they do it. Jack Well there you are just plain wrong. The contribs are installed correctly and the test in includes/header_tags.php for which page to put header tags in is not good enough for some server environments. Both contribs worked fine untill the ISP changed the apache/php environment. As I stated if your server responds with a re-written URL to the $_SERVER['PHP_SELF'] the test is not good enough. Perhaps a more elegant way to test would be to use a substring of a different php $_SERVER variable that responds with the filename not the url, and matches the constants. My 30 second fix by testing for a SEO signature works, but could be better. On the INDEX.PHP and PRODUCT_INFO.PHP tests in that header_tags.php file, the test will fail when the server response does not match the defined constants, and I suggest trying to understand how things work is a good thing. Many thanks for your input, your suggestions that :- >my SEO urls were being re-written incorretly [you were right there!] >this was SEO problem, [not so] >that the 2 contribs just work together, [in a perfect world] >that I should just get them installed properly, [they are and were] >how [htc] figures out the url, it doesn't. The url has nothing to do with Header Tags (and vice versa). [wrong] has made me find the problem. It is as I suspected a hosted ISP apache/php server setup issue that I have little or no control over. HTC does figure out the URL by using the $_SERVER variable and tests it against the defined constants in includes/header_tags.php This test is inadequate on servers where $_SERVER['PHP_SELF'], or $PHP_SELF is a re-written URL. case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT) ): Thanks for you help, it is appreciated. Now HTC and SEO Urls work on my hosts server, once again. The combination of these 2 contribs is I believe critical to good site placement, as I have learnt the hard way in the 6 weeks or so that the server environment had changed. Cheers. Quote Link to comment Share on other sites More sharing options...
danielgDK Posted August 5, 2007 Share Posted August 5, 2007 Hi all, I am installing this contrib, and have an error at the moment. I am only at the catalog install option now. The step is: Find the following lines in index.php Around line 70: Find if ($category_depth == 'nested') { $category_query = tep_db_query("select cd.categories_name, c.categories_image 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 . "'"); and replace with if ($category_depth == 'nested') { $category_query = tep_db_query("select cd.categories_name, c.categories_image, 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 . "'"); When i am doing this, the text i showen on my page. See the picture here, as it is a little hard to explain: This is what you can see under my banner in the shop. Does someone have an ida of what to do here? Thank you very much. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 5, 2007 Share Posted August 5, 2007 You probably overwrote one of the php delimiters. Try replacing your index file with the original and then make the changes one at a time, testing the shop between each one. That will help isolate where the problem is at. Jack Quote 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 More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.