';
if (!empty($context['search_errors']))
echo '
', implode('
', $context['search_errors']['messages']), '
';
if (!empty($context['search_ignored']))
echo '
', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), '
';
echo '
', $txt['set_parameters'], '
-
-
';
if (empty($modSettings['search_simple_fulltext']))
echo '
', $txt['search_example'], '';
echo '
-
-
-
-
-
-
- ',
$txt['search_options'], ':
-
- ',
$txt['search_post_age'], ':
-
', $txt['days_word'], '
';
// Require an image to be typed to save spamming?
if ($context['require_verification'])
echo '
', $txt['verification'], ':
', template_control_verification($context['visual_verification_id'], 'all'), '
';
// If $context['search_params']['topic'] is set, that means we're searching just one topic.
if (!empty($context['search_params']['topic']))
echo '
', $txt['search_specific_topic'], ' "', $context['search_topic']['link'], '".
';
echo '
';
if (empty($context['search_params']['topic']))
{
echo '
';
echo '
';
}
echo '
';
}
/**
* The search results page.
*/
function template_results()
{
global $context, $options, $txt, $scripturl, $message;
if (isset($context['did_you_mean']) || empty($context['topics']) || !empty($context['search_ignored']))
{
echo '
', $txt['search_adjust_query'], '
';
// Did they make any typos or mistakes, perhaps?
if (isset($context['did_you_mean']))
echo '
', $txt['search_did_you_mean'], ' ', $context['did_you_mean'], '.
';
if (!empty($context['search_ignored']))
echo '
', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), '
';
echo '
';
}
if ($context['compact'])
{
echo '
';
echo '
', $context['page_index'], '
';
}
else
{
echo '
', $txt['search_no_results'], '
';
}
// While we have results to show ...
while ($topic = $context['get_topics']())
{
echo '
';
foreach ($topic['matches'] as $message)
{
echo '
#', $message['counter'], '
', sprintf(str_replace('
', ' ', $txt['last_post_topic']), $message['time'], '' . $message['member']['link'] . ''), '
';
if ($message['body_highlighted'] != '')
echo '
', $message['body_highlighted'], '
';
}
echo '
';
}
}
else
{
echo '
', $context['page_index'], '
';
}
else
{
echo '
', $txt['search_no_results'], '
';
}
while ($topic = $context['get_topics']())
{
foreach ($topic['matches'] as $message)
{
echo '
#', $message['counter'], '
', sprintf(str_replace('
', ' ', $txt['last_post_topic']), $message['time'], '' . $message['member']['link'] . ''), '
', $message['body_highlighted'], '
';
echo '
';
}
}
}
echo '
';
if (!empty($context['topics']))
echo '
', $context['page_index'], '
';
// Show a jump to box for easy navigation.
echo '
';
}
?>