Hey Guys,
I am not sure if this is the right area to post this, but it is the closest i could think off.
I want to include a search menu bar in the header of a theme, how do i do that?? I have never done this before and what i have tried has failed.
I have included the search part, but when i search something, it goes to the search.php page, when i want it to show the results.
Thanks,
Cohen
It's just a matter of inserting a form into a properly positioned division.
Well, i did. The code inserted is:
<form method="post" action="search.php">
<strong>Search</strong>: <input type="text" class="textbox" name="keywords" size="35" maxlength="250" /><input type="submit" class="button" name="submit" value="GO!" />
<script type="text/javascript" src="jscripts/autocomplete.js?ver=1400"></script>
<script type="text/javascript">
<!--
if(use_xmlhttprequest == "1")
{
new autoComplete("author", "xmlhttp.php?action=get_users", {valueSpan: "username"});
}
// -->
</script>
</form>
That might be the wrong code that i have inserted
.
I have no idea how to do this, but I know how you can find out. Find a theme with the search box in it, and look at the code.
What exactly do you mean, I'm lost.
He wants to know how you can search the forums from a simple text field and a submit button in the header.
Earch the tutorials, thread is by atomicj.
(2010-08-24, 02:10 PM)Tierney Wrote: [ -> ]He wants to know how you can search the forums from a simple text field and a submit button in the header.
oh! ok.
I use:
<form method="post" action="{$mybb->settings['bburl']}/search.php">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="threads" />
<input type="text" name="keywords" value="" />
<input type="submit" value="" />
</form>
Hope this helps.
(2010-08-24, 02:42 PM)Damion Wrote: [ -> ] (2010-08-24, 02:10 PM)Tierney Wrote: [ -> ]He wants to know how you can search the forums from a simple text field and a submit button in the header.
oh! ok.
I use:
<form method="post" action="{$mybb->settings['bburl']}/search.php">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="threads" />
<input type="text" name="keywords" value="" />
<input type="submit" value="" />
</form>
Hope this helps.
Yeah, that is what i ended up using. I got it from the search template on the portal page.
Im glad you figured it out