Jump to content

jmoll

Members
  • Content count

    24
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    James Moll
  1. jmoll

    Header Tags SEO

    Hi Jack, I went back and double checked my original header_tags.php file that came as part of your 3.2.8 package that I downloaded earlier this year, and the "old" code is indeed in there that Gary references in his post, and for which he relayed your recommended solution.... so I followed the instructions you all had there in that clubosc post, and it did indeed then allow my HT SEO 3.2.8 and USU5 configuration to begin working together just fine, other than when I started to use Page Control for pages like my about_us.php, which is when I realized the "!==" vs. "!==" issue.... but as I mentioned, I was able to at least seemingly "fix" that by changing the "!==" to "!=" in yours/Gary's posted code fix.... will be waiting for your further insights on that as mentioned above. Thanks!
  2. jmoll

    Header Tags SEO

    Hi Jack. Thanks for the response.... but I did quite a bit of debugging on this with echo statements and such, and at least on my server, which is IIS and PHP 5.3 I believe, and for me (having also USU5), I was able to see definitively that the problem was that when strripos would (validly) retrun zero (for example, when testing www.mydomain.com/index.php), the !== test will evaluate TRUE (i.e. zero is equivalent in value to FALSE but not of the same var type as boolean FALSE, so "!==" evaluates "true" in this case), but that then causes the true-part of the ternary if construct to execute, which is "basename(substr($_SERVER['PHP_SELF'], 0, $pos))", but in this case $pos is zero, and so your substring() would return a null string, i.e. starting at position 0 for 0 length.... so, $page as I said is an empty null string, so the subsequent switch evaluating $page fails to execute the desired functionality. After mulling over this and with numerous debug echo's and what not, I came to the belief that what your ternary if was meaning to do was to execute the "true part" of the ternary only if we had a valid, non-zero value for $pos from the prior strripos() - i.e. NOT 0 (meaning "/" found in first position of search string so strripos() returns 0) and NOT FALSE (meaning "/" not found at all so strripos() returns bool FALSE). So, the way to do that, and to therefore insure that the "false part" of the ternary IF is executed if $pos is either zero or FALSE, is to use the "!=", since that will leave out the identity test - i.e. type check - out of the test. In other words, not worrying about matching var type, zero and FALSE will be equivalent. So, now with the conditional check using "!=", $pos equal to zero causes the condition check of the ternary IF to evaluate as "false", and thus execute the correct "false part" code of the ternary, i.e. the "basename($_SERVER['PHP_SELF'])", which then correctly provides a page name value for $page, and then the following code in the switch statement works as expected. So, this change on my system makes HT SEO work as I expect it to, otherwise, the ternary IF statement never returns a page name and so none of the desired $page evaluation code in the switch statement ever gets executed. Maybe it has something to do with USU5 and that I have that in standard mode instead of re-write mode, but I don't think so, as I can re-create this from a page such as simply www.mydomain.com/about_us.php, but in any event, as I've described above, this is a real issue on my system and this "fix" appears to me to be valid, indeed the proof is in the pudding as the tag values for the about_us page etc. stored in the header tags db will never get loaded if $page never returns the current name of the current page, obviously.... if you have a better, more valid, more correct "fix", please let me know..... even though I've been a software developer for over 20 years, I am admittedly not an expert in PHP, so I may have stumbled onto something that on the surface seems to "fix" my problem, but are your saying that may be an illusion? Thanks for your further consideration on this.... the more I get into issues and discussions like this, the more it helps me learn about the PHP world. Thanks!
  3. jmoll

    Header Tags SEO

    Ok, so my real reason for visiting this forum this evening was to ask a question. As I've already stated, I'm on a windows platform, with both HT SEO and USU5 working together just fine on osC 2.3.1. What I would like to do is have one set of title/description/keywords meta tag values for the index.php when it's just accessed as the "home page", i.e. no category or sub-category page being displayed. But then when a category or sub-category page is being displayed via index.php, I want just the values I've typed in via the admin for that category to display for title/description/keywords meta tags - NOT both the values specified for index.php "proper" AND the category values. For the life of me I can't figure out a way to manipulate the various options/check boxes to do this. Is there a way that perhaps I'm just missing, or will I need to add a little code in application top or template top to test for when the current page is index.php but not with a category.... any help/ideas would be appreciated. Thanks!
  4. jmoll

    Header Tags SEO

    Ok, so I just remembered - I made the code fix for the above referenced issue in /includes/header_tags.php. Here's my snippet of code: // J. Moll 8/3/12 - changed !== below to != since strripos can return 0 if / is in first position, or FALSE if / is not found at all; !== would require $pos to be boolean to work, but we need it to work if 0 is returned as well, so use equaltiy test rather than identity/equality test $pos = strripos($_SERVER['PHP_SELF'], "/"); $page = ($pos != FALSE) ? basename(substr($_SERVER['PHP_SELF'], 0, $pos)) : basename($_SERVER['PHP_SELF']); I'm not a member at clubosc, so maybe someone here who is would be so kind as to help out "Gurdeep" and post my solution there as a help.
  5. jmoll

    Header Tags SEO

    I found some time ago this post at http://www.clubosc.com/seourls5-htcseo3.html which explains the fix Jack provided to make HT SEO and USU5 work. I use URI mode = standard (because I'm on a windoze server - long story) and it works great. If you scroll down to near the bottom of the comments on the above-referenced clubosc post, you'll see a question posted from Gurdeep dated May 2, 2012. I also ran into this problem as well, and after some debugging, discovered an issue HT SEO code that was the culprit. It was code that was testing for a boolean FALSE value in a ternary IF statement that was never evaluating properly the prior result of a string position search PHP function as I recall.... I can't remember off hand at the moment exactly which file this was in, and the exact name of the PHP string position search function also escapes me - PHP is not my first language.... if someone needs it, I can try to go back and search when I have some free time.... but I do recall that I fixed this issue by changing the !== to != so as to allow execution of the "true" part of the ternary if statment to execute when the string pos search function found the string it was searching for starting in position zero. A !== requires equality of value AND type, but zero is not the same as a Boolean 'FASLE' when testing for type. So deleting the extra "=", leaving !=, allows the test to work for zero (i.e. the string was found in position 0) as well as FALSE (i.e. the string was not found at all, resulting in a return value of boolean FALSE). I was going to eventually post this on this forum to let Jack know.... but a few weeks went by and I forgot until now....
  6. jmoll

    Ultimate Seo Urls 5 Pro

    Solved this by simply setting a session variable to store the correct cPath value then retrieving this if set in application top.
  7. jmoll

    Ultimate Seo Urls 5 Pro

    Good evening. I'm using osC 2.3.1 on a Windows IIS server (I know, I know...). Anyway, I have USU 5 Pro installed, and is working well from what I can tell. I installed another add-on that adds a next and previous button to each product page, so that you can navigate easily and quickly between products within a given category. Some of my products are in more than one categoary, e.g. a wicker chair is in category path "Outdoor Wicker -> Wicker Chairs", but also in "Outdoor Wicker -> Wicker Collections -> XYZ Collection". The next/prev. buttons from the add-on always default to the category path for Wicker Chairs. I.e., when viewing prod page for a chair in cat path 2_18, fine, but when in cat path 35_42, as soon as I click either the Prev or Next button (from the add-on), it goes back to thinking it's in cat path 2_18. Debugging through all the code, I've determined it's due to a variable $current_category not containing the current path value, e.g. "35_42", so it queries and gets first cat path returned from the db, which is always "2_18". So, tracing through all the code, I'm realizing that the cPath info is being lost somehow by USU 5 Pro somewhere in the bowels of all the object oriented code - i.e. the links on the product listing page for the current category have just the p-xxx data in them, i.e. just the product id values, but no cPath data. Now I can "fix" this by going to the admin for USU 5 Pro and enabling the setting to add in the cPath, and this will fix the problem in that my Next and Prev buttons navigate correctly through the current category, but the admin option does this by tacking it on as a URL query param, i.e. "?cPath=35_42", which I'm thinking then defeats the whole point of having an SEO friendly URL formatting add-on.... Does anyone have any ideas how I can fix this without having to resort to the non-SEO friendly cPath query param tack-on to the end of links? Remember that I'm on IIS and don't have an htaccess file to add re-write rules to, so I'm looking for ideas to implement via program code. Thanks in advance for any help/ideas/suggestions!
  8. jmoll

    Automatically send data feed to Froogle

    Looking at installing v3 of this contribution. Looking over the master settings in googlefeeder.php, I see the line: define('SEO_ENABLED','true'); //Change to 'false' to disable if Ultimate SEO URLs is not installed Due to the fact that I am on an IIS platform, I was unable to install the Jack_MCS Ultimate SEO URLs, so instead installed FWR's Ultimate SEO URLs Pro 5 (which actually then needed a little tweak worked up by Jack_MCS and the guy at Club osC to work quite nicely with Jack_MCS Header Tags SEO). So, just wanted to make sure I have my nomenclature - and my understanding - straight. Does the setting need to be set: 1.) 'true' if the Jack_MCS Ultimate SEO URLs is installed only, inferring then that the FWR contrib is not supported/compatible; or 2.) 'true' if either SEO URL contrib is installed, inferring that both/either is compatible; or 3.) 'false' if you have do not have the Jack_MCS SEO URl contrib installed, inferring that other contrib's may be compatible, or 4.) 'false' if you have do not have the Jack_MCS SEO URl contrib installed, inferring that any other SEO URL contrib's may NOT be compatible, or 5.) some other scenario that perhaps I'm not grasping? Thanks for any assistance! (ok, sometimes I over-analyze things! ...just need to know if this will work with the FWR seo urls, and if so, what should the SEO_Enabled setting be?)
  9. jmoll

    Sitemap SEO

    Ok, thanks for the advice. In the meantime, do you know of any other contrib's for 2.3.1 that would provide similar functionality to All Products SEO, or you think I should just wait if you think you might have a package in the near future? (Oops, probably should post this in the All Products SEO forum, but this will be the last of this thread, promise!)
  10. jmoll

    Sitemap SEO

    Ok, thanks. Yeah, I created my own box called "Colors, Patterns, and Finishes", but I did it all the "osCommerce way", and so all those links are showing up just fine in the site map, so I guess I'm cool for now! So, I've been moving down the list of your recommended SEO contributions as listed in your profile page, and next on the list is "All Products SEO". Are you recommending a store site to have both your Sitemap SEO contribution and the All Products SEO - do these complement each other, or are they more mutually exclusive? Thanks again!
  11. jmoll

    Sitemap SEO

    Thanks Jack for the quick response. You must have missed that part of my post where I stated that I had already added a line to print out the $path parameter, and it shows as "D:/home/mysitename.com/wwwroot/includes/modules/boxes/Array".... the interesting thing being the "Array" at the end of the path... the path itself is fine, but I'm guessing the function is getting the &path param passed to as an unintentional concatenation of "path plus some array" rather than "path plus a filename"? Thanks - exactly what that was. I was following the steps at the end of install.txt, but stopped when I encountered the above error issue. So, ignoring that for now, I went ahead and set up everything in the Settings Control page, and then in Page Control, and now all my sitemap displays just fine. So, it would seem that I can do everything I need to do with this Page Control page.... not sure to be honest exactly what all the Box Control page would give above and beyond the Page Control page.... just a way to manage within box "subsets" what I see listed on Page Control? If I'm getting what I want/need for now from Page Control, do you see it as a potential problem if we don't figure out the issue with the Box Control page? Thanks again for your help, and also thanks for the contribution!
  12. jmoll

    Sitemap SEO

    Good evening! Just downloaded the new version and installed today on 2.3.1 on Windows/IIS platform. Encountered the explode() error in admin, and got Jack's fix from post # 682 above to fix that. But I am now left with the following error whenever I click on a list entry in the "Boxes Group Control" and click update on the admin Box Control page: Warning: file(D:/home/mysite.com/wwwroot/includes/modules/boxes/Array): failed to open stream: No such file or directory in D:\home\mysite.com\wwwroot\admin\includes\functions\sitemap.php on line 203 Line 203 is in the GetFilesArray() function, so I put a "print($path);" line as the first line in the function and retried got the same error, with my print statement showing the contents of the passed $path parameter being: D:/home/mysite.com/wwwroot/includes/modules/boxes/Array On my actual site, if I click the sitemap link, the sitemap page displays a listing of links to all my site categories, but nothing else - no produts, no about page, no contatct us page, etc. The related products and related category links however at the bottom of product pages and category pages are working fine.... any ideas as to what I might have wrong? I read in the install.txt that "This will only work for boxes with hard coded links, like the information box. If you don't use such a box, skip this step." I don't know exactly what is meant by that... I do use the info box, but have added some of my own additonal links/pages such as "about us".... not sure if this statement applies to me or not... Thanks for any assistance offered!!! (Also FYI, the 2.3.1 install.txt for the new version needs to have the step added to it to add the define('MODULE_BOXES_INFORMATION_SITEMAP_SEO', 'Site Map'); to the bm_information.php file in /includes/languages/english/modules/boxes. The file is included in the package with the definition, but for those of us doing an install to a modified site, we'll miss that the first time around since the step's missing in the install.txt.... no biggie, since as soon as you see the link on your site's info box, you know what you need to do.... but just wanted to point that out.)
  13. Also, sorry, I just went back and checked the facts behind some of my statements for my post above - I did mix up my remembrance of where I had read about the various versions for "Enable/Disable" - it was not Jack_MCS notes, it was actually in the history notes for this "Google XML Sitemap SEO compatible with FWR etc." contribution. A contributor named "alman" added a contribution to spoofy's original contribution to include support for the "Enable/Disable" contribution. This is probably what messed up a lot us, where we just dowloaded the most recent package, not realizing that it was expecting the "Enable/Disable" contribution to already be installed on your site. My solution explanations remain correct - I just wanted to clarify my mistake made while rambling on with parenthetical background info.....
  14. Note on my post above - the editor in my browser substitued a silly smiley face icon where I originally typed "B)." as in indication point b or option b in a list of points or options.... sorry about that.... just read "option b" wherever you see the stupid smiley face. Thanks!
  15. Ok, I see that a number of us have gotten this dreaded c.ategories error, with a couple of posters adding the solution to it, but in a somewhat cryptic manner that leaves something to the imagination if you are not a programmer.... so, I thought I would try to help. I installed this contribution today, following all the instructions, and then of course received the 1054 - Unknown column 'c.categories_status' in 'where clause' error after running /googlesitemap/index.php for the first time. What's going on here is (and I've pieced this together from some version history notes from Jack_MCS on his current add-on package version which this contribution is based on, plus some of the "solution" posts here on this forum) there is apparently another add-on contribution called "Enable/Disable Categories" (what it does exactly I don't know - I've never used the contribution) which, when installed to your store site, apparently adds (among other things I would suppose) this column named "categories_status" to the table in your database. The person (Spoofy) who put this current "Google Sitemap SEO compatible with FWR etc." contribution together seems to have based it on the Jack_MCS version that assumes/requires a current installation of the "Enable/Disable Categories" contribution. (There appears to be another version Jack provides that assumes the "Enable/Disable Categories" contribution is not installed.) So, if you have the "Enable/Disiable Categories" contribution installed, you won't get the "Unknown column" error because the "Enable/Disable Categories" contribution would have created this column as part of its installation. But, if like me you don't have the "Enable/Disable Categories" contribution installed, you are left with two alternatives to resolve the problem: a) install the "Enable/Disable Categories" contribution - a rather drastic solution IMHO, as one assumes that if one had wanted/needed the contribution, one would have already done so; B) the actually rather quick and easy solution: edit the file /catalog/googlesitemap/sitemap.class.php and remove any and all references to column name categories_status from the SQL code. Unfortunately, I don't recall off hand how many places I needed to delete the categories_status column name, but I believe it was somewhere in the neighborhood of 3 to 5 edits I needed to make. Be sure when deleting the portion of SQL statement code in sitemap.class.php that refers to column name categories_status that what you leave behind still creates valid SQL statements. For example, if the code says "...where c.categories_status='1' and p.products_id = p2c.products_id and ....(etc.)", you want to end up with "...where p.products_id = p2c.products_id and ...." etc. Just be careful because there were a couple different SQL statement variations, so pay attention when deleting the c.categories_status portion of the code. And so one final clarification: pdcelec in post# 36 above was on the right track in offering a solution corresponding to my option B), but only hinted at the complete solution from the standpoint that a) he failed to mention that the code changes are to be made in the file /catatlog/googlesitemap.class.php, and B) failed to indicate that there is more than one place in the googlesitemap.class.php where similar changes need to be made. Also, his SQL statement used in the find/replace boxes is the fully rendered SQL statement as produced by the php code at run time, i.e. when you go to edit googlesitemap.class.php, the first portion of this statement in the program code consists of variable names and concatenation code, so search on "categories_status" rather than on his complete SQL statement or you may not find a match. So in conclusion, after I edited out all references to categories_status column in the SQL code in googlesitemap.class.php, I re-ran /googlesitemap/index.php, and everything worked like a charm! I'm running 2.3.1 on a Windows/IIS platform, with FWR Ultimate SEO URL 5 and Jack_MCS's Header Tags SEO contributions, and it all works together nicely now! No need to switch over to the "Alternate" option in the admin.
×