<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Search box (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Search box
#960
timopp (User)
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Search box 2 Years, 7 Months ago Karma: 0  
Dewed ,

First off, let me say this is a great script and I am having a lot of fun with it. So thank you for all the hard work!

Second, I am trying to tweak the look and trying to just display the search box and the button and drop the boolean choices. ow can I do that and still have it function?

Thanks

Tim
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/06/28 14:23 By timopp.
  The administrator has disabled public write access.
#961
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Search box 2 Years, 7 Months ago Karma: 9  
Ok, so first, start by making a backup of the header.php file, in whichever
theme directory you are editing..

Then you can safely edit the header.php file, and restore it if things go horribly wrong.

Since you want to remove the and/or/phrase options, you can start by commenting the
line that starts with $radio_array = array( ...

Comment it by adding 2 forward slashes to the left of the line

//$radio_array = array( ...

No point in creating the array if it wont be used, right?

Next, remove the options from the form.. Easiest to use a block comment for that
At about line # 45.. which starts


while(list($key, $value) = each($radio_array)){

Add an opening comment block, which is forward slash, followed by an asterisk

/* while(list($key, $value) = each($radio_array)){

Then a few lines down, about line 52, you'll see

$html .= " /> " . $value . "&nbsp;";
}

Add the closing comment block, which is an asterisk followed by a forward slash after the closing curly bracket

$html .= " /> " . $value . "&nbsp;";
}
*/

That is essentially the same as adding the 2 forward slashes in front of every line in that code block..

Still, the search function needs to know what logic you plan to use, so you can hard code it into the form. I'd suggest using "and" because it should return the best results for multi word searches. For single word searches, it really doesn't matter which you use.

So, just after the */ you just added, you can add a hidden input to convey the search logic to use to the search function.

$html .= '<input type=hidden name=logic value=and>';

And that should do it.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#962
timopp (User)
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Search box 2 Years, 7 Months ago Karma: 0  
Dewed,

Umm. Just awesomeness.

Please accept my tiny donation. I embarrassed that I can offer so little, an insult almost.

Thanks for the great scripts and fantastic support

Tim
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#963
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Search box 2 Years, 7 Months ago Karma: 9  
Your welcome, and really no need to be embarrassed. Every bit helps.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008