';
if (!empty($context['search_errors']))
echo '
', implode(' ', $context['search_errors']['messages']), '
';
// Simple Search?
if ($context['simple_search'])
{
echo '
';
echo '
', $txt['search_advanced'], '
';
}
// Advanced search!
else
{
echo '
', $txt['search_for'], ':
';
if (empty($modSettings['search_simple_fulltext']))
echo '
', $txt['search_example'], ' ';
echo '
',
$txt['search_match'], ':
', $txt['all_words'], '
', $txt['any_words'], '
',
$txt['by_user'], ':
',
$txt['search_order'], ':
', $txt['search_orderby_relevant_first'], '
', $txt['search_orderby_large_first'], '
', $txt['search_orderby_small_first'], '
', $txt['search_orderby_recent_first'], '
', $txt['search_orderby_old_first'], '
',
$txt['search_options'], ':
', $txt['search_show_complete_messages'], '
', $txt['search_subject_only'], '
',
$txt['search_post_age'], ':
',
$txt['search_between'], ' ', $txt['search_and'], ' ', $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 '
';
}
function template_results()
{
global $context, $settings, $options, $txt, $scripturl, $message;
if (isset($context['did_you_mean']) || empty($context['topics']))
{
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'], ' .
';
echo '
';
}
if ($context['compact'])
{
// Quick moderation set to checkboxes? Oh, how fun :/.
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
';
}
else
{
echo '
', $txt['pages'], ': ', $context['page_index'], '
';
if (empty($context['topics']))
echo '
(', $txt['search_no_results'], ')
';
while ($topic = $context['get_topics']())
{
foreach ($topic['matches'] as $message)
{
echo '
', $message['counter'], '
« ', $txt['message'], ' ', $txt['by'], ' ', $message['member']['link'], ' ', $txt['on'], ' ', $message['time'], ' »
', $message['body_highlighted'], '
';
if ($topic['can_reply'] || $topic['can_mark_notify'])
echo '
';
echo '
';
}
}
echo '
', $txt['pages'], ': ', $context['page_index'], '
';
}
// Show a jump to box for easy navigation.
echo '
';
}
?>