You know...the best way to understand if something is what people really want is give them the tool and let figure it out by them selves.
That should just strip out from the search the "single-char words" and give a notice about the letters removed.
Search.php
// Trim everything and make sure there are no words that are the same.
$context['search_ignored'] = array();
// Don't allow very, very short words.
elseif ($smcFunc['strlen']($value) < 2)
{
$context['search_errors']['search_string_small_words'] = true;
unset($searchArray[$index]);
}
// Don't allow very, very short words.
elseif ($smcFunc['strlen']($value) < 2)
{
$context['search_ignored'][] = $value;
unset($searchArray[$index]);
}
Search.template.php
The css will not work for sure because it comes from 2.1, the markup...no idea
function template_results()
{
global $context, $settings, $options, $txt, $scripturl, $message;
if (!empty($context['search_ignored']))
echo '
<div id="search_results">
<div class="cat_bar">
<h3 class="catbg">
', $txt['generic_warning'], '
</h3>
</div>
<span class="upperframe"><span></span></span>
<div class="roundframe">
<p class="noticebox">', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), '</p>
</div>
<span class="lowerframe"><span></span></span>
</div><br />';
if (!empty($context['search_errors']))
echo '
<p class="errorbox">', implode('<br />', $context['search_errors']['messages']), '</p>';
if (!empty($context['search_ignored']))
echo '
<p class="noticebox">', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), '</p>';
Search.english.php
$txt['search_adjust_query'] = 'Adjust Search Parameters';
$txt['search_warning_ignored_word'] = 'This term has been ignored in your search';
$txt['search_warning_ignored_words'] = 'These terms have been ignored in your search';