Error With Isearch Script

liunx

Guest
If you are using isearch, then please make sure that results that yield more than one page are working properly.<br /><br />Example, I installed on a client's webste and found that a search for a common term turned up two pages of results. But it jumped right to the last page. I couldn't get it to show me the first page no matter what I did. <br /><br />If the search turned up just a couple of results that could display on one page, no problem.<br /><br />So after debugging the son of a gun for hours here's what I came up with:<br /><br />In isearch/index.php (the heart of the script)<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->    if(!IsSet($page))<br />    {<br />        $page = 1;<br />    }<!--QuoteEnd--></div><!--QuoteEEnd-->Must be changed to<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->$x = $_GET['page'];<br />$page = $x;<br /><br />    if(!IsSet($page))<br />    {<br />        $page = 1;<br />    }<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Hope this helps somebody.<!--content-->
Thanks for the tip, I am planning on installing that script on a friend's website, so it will save me some time <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />But why the $x?<br /><br />Why don't you just do<br /><br />$page = $_GET['page']; ?<br /><br />Am I missing something? <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /><br /><br /><br />By the way, have you mentioned this to the script authors?<!--content-->
You are absolutely right... this is what was left over after debugging. Just lazy and didn't rewrite it.<br /><br />No, I haven't mentioned it to the authors. I'll check out their website and see if I can email them. It looked like I had to sign up for a mailing list... which I really don't wanna do.<!--content-->
 
Back
Top