smf 2.1 arama kutusu 3 (searchbox)

Başlatan snrj, 16 Şub 2015 12:46

« önceki - sonraki »

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

*

  1. 3,078

  2. 584

  3. 964


index.template.php de bul
echo '
<form id="search_form" class="floatright" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="search" name="search" value="" class="input_text">&nbsp;';

// Using the quick search dropdown?
$selected = !empty($context['current_topic']) ? 'current_topic' : (!empty($context['current_board']) ? 'current_board' : 'all');

echo '
<select name="search_selection">
<option value="all"', ($selected == 'all' ? ' selected' : ''), '>', $txt['search_entireforum'], ' </option>';

// Can't limit it to a specific topic if we are not in one
if (!empty($context['current_topic']))
echo '
<option value="topic"', ($selected == 'current_topic' ? ' selected' : ''), '>', $txt['search_thistopic'], '</option>';

// Can't limit it to a specific board if we are not in one
if (!empty($context['current_board']))
echo '
<option value="board"', ($selected == 'current_board' ? ' selected' : ''), '>', $txt['search_thisbrd'], '</option>';
echo '
<option value="members"', ($selected == 'members' ? ' selected' : ''), '>', $txt['search_members'], ' </option>
</select>';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="sd_topic" value="', $context['current_topic'], '">';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="sd_brd[', $context['current_board'], ']" value="', $context['current_board'], '">';

echo '
<input type="submit" name="search2" value="', $txt['search'], '" class="button_submit">
<input type="hidden" name="advanced" value="0">
</form>';

değiştir
echo '<div id="main">
<form  class="floatright" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input id="search" type="search" name="search" value="" class="input_text" placeholder="Search...">&nbsp;';
$selected = !empty($context['current_topic']) ? 'current_topic' : (!empty($context['current_board']) ? 'current_board' : 'all');
echo '
<select name="search_selection">
<option value="all"', ($selected == 'all' ? ' selected' : ''), '>', $txt['search_entireforum'], ' </option>';
if (!empty($context['current_topic']))
echo '
<option value="topic"', ($selected == 'current_topic' ? ' selected' : ''), '>', $txt['search_thistopic'], '</option>';
if (!empty($context['current_board']))
echo '
<option value="board"', ($selected == 'current_board' ? ' selected' : ''), '>', $txt['search_thisbrd'], '</option>';
echo '
<option value="members"', ($selected == 'members' ? ' selected' : ''), '>', $txt['search_members'], ' </option>
</select>';
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="sd_topic" value="', $context['current_topic'], '">';
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="sd_brd[', $context['current_board'], ']" value="', $context['current_board'], '">';
echo '
<input id="submit" type="submit" class="solid" name="search2" value="', $txt['search'], '" class="button_submit">
<input type="hidden" name="advanced" value="0">
</form></div>';

index.css de en alta ekle
#main {
float: right;
height: 25px;
background: #f2f2f2;
padding: 3px 7px;
border: 1px solid #b5b5b5;

-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;

-moz-box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(255, 255, 255, 1), 0 3px 0 #ccc, 0 4px 0 #989898, 0 6px 0 #dfdede;
-webkit-box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(255, 255, 255, 1), 0 3px 0 #ccc, 0 4px 0 #989898, 0 6px 0 #dfdede;
box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(255, 255, 255, 1), 0 3px 0 #ccc, 0 4px 0 #989898, 0 6px 0 #dfdede;
}

#main input[type="search"] {
padding:2px;
border: 1px solid #999999;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: inset 0 5px 0 #ccc, inset 0 6px 0 #989898, inset 0 13px 0 #dfdede;
-webkit-box-shadow: inset 0 5px 0 #ccc, inset 0 6px 0 #989898, inset 0 13px 0 #dfdede;
box-shadow: inset 0 5px 0 #ccc, inset 0 6px 0 #989898, inset 0 13px 0 #dfdede;
}

#main input[type="submit"].solid {
float: right;
cursor: pointer;
width: 80px;
padding: 0px;
background-color: #f8b838;
color: rgba(134, 79, 11, 0.8);
text-transform: uppercase;
font-weight: bold;
border: 1px solid #99631d;
margin-left: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;

text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7), 0 -1px 0 rgba(64, 38, 5, 0.9);

-moz-box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 3px 0 #b8882a;
-webkit-box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 3px 0 #b8882a;
box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 3px 0 #b8882a;

-webkit-transition: background 0.2s ease-out;
}

#main input[type="submit"].solid:hover, input[type="submit"].solid:focus {
background: #ffd842;

-moz-box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.9), inset 0 2px 1px rgba(255, 250, 76, 0.8), 0 2px 0 #d8a031, 0 3px 0 #593a11, 0 4px 0 #ccc;
-webkit-box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.9), inset 0 2px 1px rgba(255, 250, 76, 0.8), 0 2px 0 #d8a031, 0 3px 0 #593a11, 0 4px 0 #ccc;
box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.9), inset 0 2px 1px rgba(255, 250, 76, 0.8), 0 2px 0 #d8a031, 0 3px 0 #593a11, 0 4px 0 #ccc;
}


MENU ×