';
}
/**
* 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 '
';
}
?>