Post by Aaron on Mar 28, 2013 15:16:18 GMT -8
Requested by Stinky666 with this concept.
Replace the entire Search Page template file with:
$[form.header]
<div class="container search">
<div class="title-bar">
<h1>
Search
<div id="how" class="input float-right" style="padding: 0;">
Display results as $[form.display_as.input]
</div>
</h1>
</div>
<div class="content cap-bottom clear">
<div class="content-box" style="height: 27px;">
Search for either <input type="radio" name="search-for" id="one-word" checked="true" /> <label for="one-word"><strong>one</strong> word</label> <input type="radio" name="search-for" id="all-words" /> <label for="all-words"><strong>all</strong> words</label> <input type="radio" name="search-for" id="exact-phrase" /> <label for="exact-phrase"><strong>exact phrase</strong></label>
<div class="float-right" style="padding-top: -5px;">
$[form.what_at_least_one.input]
$[form.what_all.input]
$[form.what_exact_phrase.input]
</div>
</div>
<div id="where" class="content-box clear">
Where thread title contains $[form.where_thread_title.input]
in $[form.where_board_subboard_placeholder.input]
$[form.where_category_placeholder.input]
without searching these $[form.where_without_placeholder.input]
</div>
<div id="when" class="content-box float-left">
Posted in the last $[form.when_days.input] and $[form.when_hours.input]
</div>
<div class="content-box float-left">
between $[form.when_between_start.input] to $[form.when_between_end.input]
</div>
<div class="content-box float-left">
exact date $[form.when_exact_date.input]
</div>
<div class="content-box float-left">
before $[form.when_before_date.input]
</div>
<span class="clear"></span>
<div class="content-box float-left">
$[form.who_at_least_one_placeholder.input] or by $[form.who_only_made_by.input] or $[form.who_member_group_placeholder.input] but not $[form.who_except_placeholder.input]
</div>
<div class="content-box float-left">
$[form.who_threads_created_by_placeholder.input]
</div>
$[captcha]
<div class="cap-bottom clear" style="text-align: center; margin-bottom: 10px;">
<div id="$[transcription.id]" style="margin: 10px 0;"></div>
$[form.search.button]
</div>
</div>
</div>
$[form.footer]
<script type="text/javascript">
$(document).ready(function() {
$('div#how input[name=display_as]:last').prop('checked', true);
$('div#transcription strong:last').html('threads');
$('input[name="what_all"], input[name="what_exact_phrase"]').hide();
$('input#one-word, input#all-words, input#exact-phrase').click(function() {
var id = $(this).attr('id'),
name = '';
if (id == 'one-word') name = 'what_at_least_one';
if (id == 'all-words') name = 'what_all';
if (id == 'exact-phrase') name = 'what_exact_phrase';
$('input[name="' + name + '"]').show().siblings().hide();
});
$('.container.search *').css('font-size', '12px');
$('.content-box').css('padding', '8px').css('margin', '0 10px 10px 0');
$('label:contains("display results as posts")').text('posts');
$('label:contains("display results as threads")').text('threads');
$('label').mouseover(function() {
$(this).css('cursor', 'pointer');
});
$('div#when input:eq(0), div#when input:eq(1)').css('width', '34');
$('div#when input:eq(0)').attr('placeholder', 'days');
$('div#when input:eq(1)').attr('placeholder', 'hours');
$('div#when input, input.date').css('text-align', 'center');
$('input[name=where_thread_title]').attr('placeholder', '').css('width', 120);
$('input[name=where_board_subboard_placeholder]').attr('placeholder', 'board').css('width', 120);
$('input[name=where_category_placeholder]').attr('placeholder', 'category').css('width', 120);
$('input[name=where_without_placeholder]').attr('placeholder', 'boards').css('width', 120);
$('input[name=who_at_least_one_placeholder]').attr('placeholder', 'search posts made by members').css('width', 180);
$('input[name=who_member_group_placeholder]').attr('placeholder', 'member group').css('width', 90);
$('input[name=who_except_placeholder]').attr('placeholder', 'posts by members').css('width', 130);
$('input[name=who_threads_created_by_placeholder]').attr('placeholder', 'search in threads created by').css('width', 160);
});
</script>