sefimor Posted June 1, 2007 Share Posted June 1, 2007 Hello, I'm trying to install site_search contribution,but I'm using STS and I didn't undestand what shoul I do about the 5th instalation step: Place the following wherever you want the search form to appear (you may not need the table fields). Note that the above may not work if you are using STS. In that case, a search box will need to be installed. <tr> <td> <form name="site search" action="<?php echo tep_href_link(FILENAME_SITE_SEARCH, '', 'SSL'); ?>" method="get"> Search <input type="hidden" name="osCsid" value="" /> <input type="text" name="keywords" value="Type word(s) and press enter" onFocus="form.keywords.value='';" size=" 27" maxlength="35" style="" > <input type="hidden" name="osCsid" value=""> </form> </td> </tr> http://www.oscommerce.com/community/contributions,2326/category,all/search,search+add Does it means this contribution and STS can't work together?? I'll appreciate any help Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 1, 2007 Share Posted June 1, 2007 There shouldn't be any reason why they won't work together. The problem it is referring to, as I recall, is getting it to display properly. But STS has changed significantly since that was written so you should just try 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...
sefimor Posted June 1, 2007 Author Share Posted June 1, 2007 (edited) There shouldn't be any reason why they won't work together. The problem it is referring to, as I recall, is getting it to display properly. But STS has changed significantly since that was written so you should just try it. Jack Thanks Jack, I tried it,it shown but not searching... when i'm doing a search it goes back to the index. What did i do wrong? you can see it here: www.switch-x.com Thank you... Edited June 1, 2007 by sefimor Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 1, 2007 Share Posted June 1, 2007 There's no way to tell what is wrong from looking at the site. But you might try turning STS off and testing it. If it works, then the problem is with how it is working with STS. 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...
seb1188 Posted December 30, 2008 Share Posted December 30, 2008 Hi Jack, I thought your Google position contribution looked useful for store optimisation etc, but it appears to be a little out of date... With reference to google_position.php I have a feeling google don't use the same HTML code that the function searches for (the if(eregi("<font color=#008000>(.*)</font><nobr>",$var,$out)) bit, line 85). I told your page to echo the filename, checked the website source that comes up when it uses it, and found that the URLs are surrounded by <cite> tags instead of a colour code, with styles in the header. But changing eregi term to <cite>(.*)</cite> didn't seem to help. I used a variable, moved it around etc to try and debug and found the exact point in the code where the (first of hopefully 1) problem occurs, but I don't know what to do past here. Do you have a working version of the contribution anywhere? From my debugging, I've concluded that it's either a problem with eregi (line 85) or $var (which would cause eregi not to work). Here are lines 78-96 of google_position.php, with a few of my debugging comments: // Now load the file into a variable line at a time while (!feof($file)) { $var = fgets($file, 1024); //WORKS TO HERE ($found123 returned at end of page as 1) // Try and find the font tag google uses to show the site URL //CHANGE NEEDED? - google no longer displays font tag in the previous format if(eregi("<font color=#008000>(.*)</font><nobr>",$var,$out)) { //ERROR OCCURS HERE - variable $found123 (set to 0 at start of page) is not returned as 1 at end of page if set to 1 here. // If we find it take out any <B> </B> tags - google does // highlight search terms within URLS // $out[1] = strtolower(strip_tags($out[1])); // Get the domain name by looking for the first / $x = strpos($out[1],"/"); Quote osCommerce is GREAT. When it works... Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 30, 2008 Share Posted December 30, 2008 Regarding the Site Search contribution, it has been replaced by the Site Search Plus contribution. Regardig the Google Position contribuiton, it has been replaced by the SEO Assistant contribution. See My Addons for links to both. 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...
seb1188 Posted December 30, 2008 Share Posted December 30, 2008 Regarding the Site Search contribution, it has been replaced by the Site Search Plus contribution. Regardig the Google Position contribuiton, it has been replaced by the SEO Assistant contribution. See My Addons for links to both. Jack Oh... now I feel foolish. Never mind, it helped me learn php! Thanks. Quote osCommerce is GREAT. When it works... 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.
Note: Your post will require moderator approval before it will be visible.