MyBB Community Forums

Full Version: Search Not Working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When my users utilize the quick search form on the homepage it returns no results, but searching for the same thing through the advanced search does the trick.

How can I fix this problem, as most would rather use the quick search.

Thanks
You probably haven't any thing in the "action". Could you please paste the entire code of your search box?
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->search}</title>
{$headerinclude}
</head>
<body>
{$header}
<form method="post" action="search.php">
<input type="hidden" name="action" value="do_search" />
<table border="0" cellspacing="0" cellpadding="0" class="tborder2">
<tr>
<td colspan="2" class="thead">
<div class="theadleft"></div>
<div class="theadright"></div>
<div class="theadmain"><strong>{$mybb->settings['bbname']} - {$lang->search}</strong></div>
</td>
</tr>
</table>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="tcat" width="50%"><strong>{$lang->search_keyword}</strong></td>
<td class="tcat" width="50%"><strong>{$lang->search_username}</strong></td>
</tr>
<tr>
<td class="trow1">
<table><tr>
<td valign="top"><input type="text" class="textbox" name="keywords" size="35" maxlength="250" /></td>
</tr>
<tr>
<td>
<span class="smalltext"><input type="radio" class="radio" name="postthread" value="1" checked="checked" />{$lang->search_entire_post}<br /><input type="radio" class="radio" name="postthread" value="2" />{$lang->search_titles_only}</span></td>
</tr></table>
</td>
<td class="trow1">
<table><tr>
<td class="trow1"><input type="text" class="textbox" id="author" name="author" size="35" maxlength="{$mybb->settings['maxnamelength']}" /><br /><span class="smalltext"><input type="checkbox" class="checkbox" name="matchusername" value="1" checked="checked" />&nbsp; {$lang->match_username}</span></td>
<td class="trow1">&nbsp;</td>
</tr></table>
</td>
</tr>
<tr>
<td class="tcat"><strong>{$lang->search_forums}</strong></td>
<td class="tcat"><strong>{$lang->search_options}</strong></td>
</tr>
<tr>
<td class="trow1" rowspan="5">{$srchlist}</td>
<td class="trow1">
<select name="findthreadst">
<option value="1">{$lang->threads_at_least}</option>
<option value="2">{$lang->threads_at_most}</option>
</select> <input type="text" class="textbox" name="numreplies" size="2" maxlength="4" />&nbsp;{$lang->replies2}<br />
<br />
<select name="postdate">
<option value="0">{$lang->find_anydate}</option>
<option value="1">{$lang->find_yesterday}</option>
<option value="7">{$lang->find_lastweek}</option>
<option value="14">{$lang->find_2weeks}</option>
<option value="30">{$lang->find_month}</option>
<option value="90">{$lang->find_3months}</option>
<option value="180">{$lang->find_6months}</option>
<option value="365">{$lang->find_year}</option>
</select>&nbsp;&nbsp; <input type="radio" class="radio" name="pddir" value="1" checked="checked" />{$lang->and_newer}  <input type="radio" class="radio" name="pddir" value="0" />{$lang->and_older}
</td>
</tr>
<tr>
<td class="tcat"><strong>{$lang->sorting_options}</strong></td>
</tr>
<tr>
<td class="trow1">
<select name="sortby">
<option value="lastpost">{$lang->sort_lastpost}</option>
<option value="starter">{$lang->sort_author}</option>
<option value="forum">{$lang->sort_forum}</option>
</select> {$lang->sort_in} <input type="radio" class="radio" name="sortordr" value="asc" />{$lang->sort_asc} <input type="radio" class="radio" name="sortordr" value="desc" checked="checked" />{$lang->sort_desc} {$lang->sort_order}
</td>
</tr>
<tr>
<td class="tcat"><strong>{$lang->display_options}</strong></td>
</tr>
<tr>
<td class="trow1">{$lang->show_results_as} <input type="radio" class="radio" name="showresults" value="threads" checked="checked" />{$lang->show_results_threads} <input type="radio" class="radio" name="showresults" value="posts" />{$lang->show_results_posts}</td>
</tr>
</table>
<div align="center"><br /><input type="submit" class="button" name="submit" value="{$lang->search}" /></div>
</form>
{$footer}
<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>
</body>
</html>
No, I meant the code of your Quick search box.
I was able to fix it on my own. Thanks anyway, Yaldaram.
Could you please explain how you fixed it for those of us who are searching the same question?

Thank you