I am hoping somone can help me (or just post the solution) with a custom search I want to use on my site. I keeping running into walls.
Here's the deal: My site is customized WSN where teachers can submit teaching ideas for different subjects and grade levels. References to "links' have been changed to "tips" I am using WSN more of a database than a links directory. Anyway, I have created a custom field called {LINKLEVEL} where teachers can select (or multiselect) the grade level that their teaching idea is most appropriate for using the checkbox option. Their grade level options are:
All PreK-K 1st-2nd 3rd-4th 5th-6th
I want the main search tool on each page to be where the teacher selects the grade level desired from a drop down list (with "All" being the default) and then enter in a text field the keywords they are looking for. The search results will of course show links (teaching tips) with those key words at that level.
I have tried modifying the advanced search from that template but I keep screwing up when it comes to my custom field.
ANY help is greatly appreciated.
If you want to look at the site you may do so at http://www.teachertipsheaven.com but understand that it is still heavily under construction.
<br>the title <select name="titlecondition"> <option value="like">contains</option> <option value="=">is exactly</option> <option value="!=">is not</option> <option value="or">has any of the words</option> <option value="and">has all of the words</option> <option value="bool">boolean</option> </select> <input type="text" size="{STANDARDSIZE}" name="titlesearch">
To make that a selector for the field level, change it to
Hi Paul, Thanks. I was able to finally work most of it out before I saw your post. I still have one small problem, the code below works fine except that it only searches the grade level and the description. (Of course because of the descriptioncondition, and descriptionsearch in the code below.) Is there a way to have the same text box that searches the description ALSO search the link title? Is there a "x_condition" and "x_search" that will cover both these fields (or all) ?
Comments on Custom Search needed
Usergroup: Customer
Joined: Dec 07, 2005
Total Topics: 5
Total Comments: 10
Hi all,
I am hoping somone can help me (or just post the solution) with a custom search I want to use on my site. I keeping running into walls.
Here's the deal: My site is customized WSN where teachers can submit teaching ideas for different subjects and grade levels. References to "links' have been changed to "tips" I am using WSN more of a database than a links directory. Anyway, I have created a custom field called {LINKLEVEL} where teachers can select (or multiselect) the grade level that their teaching idea is most appropriate for using the checkbox option. Their grade level options are:
All
PreK-K
1st-2nd
3rd-4th
5th-6th
I want the main search tool on each page to be where the teacher selects the grade level desired from a drop down list (with "All" being the default) and then enter in a text field the keywords they are looking for. The search results will of course show links (teaching tips) with those key words at that level.
I have tried modifying the advanced search from that template but I keep screwing up when it comes to my custom field.
ANY help is greatly appreciated.
If you want to look at the site you may do so at http://www.teachertipsheaven.com but understand that it is still heavily under construction.
TIA!!!
Fairago
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
The default advanced search form has
To make that a selector for the field level, change it to
Usergroup: Customer
Joined: Dec 07, 2005
Total Topics: 5
Total Comments: 10
Hi Paul,
Thanks. I was able to finally work most of it out before I saw your post. I still have one small problem, the code below works fine except that it only searches the grade level and the description. (Of course because of the descriptioncondition, and descriptionsearch in the code below.) Is there a way to have the same text box that searches the description ALSO search the link title? Is there a "x_condition" and "x_search" that will cover both these fields (or all) ?
<form action="search.php?action=filter&filled=1" method="post">
<input type="hidden" name="whichtype" value="links">
<input type="hidden" name="levelcondition" value="like">
<input type="hidden" name="descriptioncondition" value="like">
<select name="levelsearch">
<option value="">Select Grade Level</option>
<option value="">------</option>
<option value="">Any</option>
<option value="PreK-K">PreK-K</option>
<option value="1st-2nd">1st-2nd</option>
<option value="3rd-4th">3rd-4th</option>
</select>
<input type="text" name="descriptionsearch" size="15">
<input type="submit" value="Search"></form>
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Only the simple search allows one box to search more than one field.