PDA

View Full Version : Search box on search page


VBCoder
07-19-2005, 04:23 AM
Request:

Show the user the search box, along with what he typed in, on the search results page.

(This is trickier than it sounds!)

Marco van Herwaarden
07-19-2005, 05:43 AM
Are you talking about the advanced or the simple search?

VBCoder
07-19-2005, 08:10 PM
Simple search results - but the same would be useful for advanced search results

amykhar
07-19-2005, 08:11 PM
Sort of like a search again?

VBCoder
07-19-2005, 08:12 PM
Yep

.......

Marco van Herwaarden
07-19-2005, 08:20 PM
Don't sound too much difficult to me, i think any real VBCoder should be able to do it. ;)

amykhar
07-19-2005, 08:21 PM
This one's cake. It's a template mod.

I have the search box in my navbar. I set the value of the textbox to $search[query]

Try putting the form in your Search Results template and see if that doesn't do it.

amykhar
07-19-2005, 08:22 PM
Back with more detail. This is what I have in my navbar template. Try it in your search results template

<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="text" class="bginput" name="query" size="31" value="$search[query]"/> <input type="submit" value="Search EA" />
</form><br><span align="right" class="smallfont"><a href="/forums/search.php?">Advanced Search</a>&nbsp;&nbsp;</span>

VBCoder
07-19-2005, 10:07 PM
Back with more detail. This is what I have in my navbar template. Try it in your search results template

<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="text" class="bginput" name="query" size="31" value="$search[query]"/> <input type="submit" value="Search EA" />
</form><br><span align="right" class="smallfont"><a href="/forums/search.php?">Advanced Search</a>&nbsp;&nbsp;</span>


What about when the user chose options, like search this forum only?

amykhar
07-19-2005, 10:34 PM
It's working fine for me as long as results are returned.