smf 2.1 arama kutusu 2 (searchbox)

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

« önceki - sonraki »

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

snrj



index.template.php de bul
Kod [Seç]
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

Kod [Seç]
echo '
<form class="form-wrapper" 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" name="search2" value="', $txt['search'], '" class="button_submit">
<input type="hidden" name="advanced" value="0">
</form>'; 

index.css de en alta ekle
Kod [Seç]
.form-wrapper {
float: right;
        padding: 6px;
        overflow: hidden;
        border-width: 1px;
        border-style: solid;
        border-color: #dedede #bababa #aaa #bababa;
        -moz-box-shadow: 0 1px 1px rgba(255,255,255,.1), 0 2px 0 #bbb, 0 3px 0 #aaa, 0 4px 4px #444;
        -webkit-box-shadow: 0 1px 1px rgba(255,255,255,.1), 0 2px 0 #bbb, 0 3px 0 #aaa, 0 4px 4px #444;
        box-shadow: 0 1px 1px rgba(255,255,255,.1), 0 2px 0 #bbb, 0 3px 0 #aaa, 0 4px 4px #444;
        -moz-border-radius: 10px;
        -webkit-border-radius: 10px;
        border-radius: 10px;   
        background-color: #f6f6f6;
        background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#eae8e8));
        background-image: -webkit-linear-gradient(top, #f6f6f6, #eae8e8);
        background-image: -moz-linear-gradient(top, #f6f6f6, #eae8e8);
        background-image: -ms-linear-gradient(top, #f6f6f6, #eae8e8);
        background-image: -o-linear-gradient(top, #f6f6f6, #eae8e8);
        background-image: linear-gradient(top, #f6f6f6, #eae8e8);
    }
    .form-wrapper #search {
        border: 1px solid #ccc;
        -moz-box-shadow: 0 1px 1px #ddd inset, 0 1px 0 #fff;
        -webkit-box-shadow: 0 1px 1px #ddd inset, 0 1px 0 #fff;
        box-shadow: 0 1px 1px #ddd inset, 0 1px 0 #fff;
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
        border-radius: 3px;     
    }
    .form-wrapper #search::-webkit-input-placeholder {
       color: #999;
       font-weight: normal;
    }
    .form-wrapper #search:-moz-placeholder {
        color: #999;
        font-weight: normal;
    }
    .form-wrapper #search:-ms-input-placeholder {
        color: #999;
        font-weight: normal;
    }   
    .form-wrapper #submit {
        float: right;   
        border: 1px solid #00748f;
        height: 25px;
        width: 50px;
        padding: 0;
        cursor: pointer;
        font: bold 10px Arial, Helvetica;
        color: #fafafa;
        text-transform: uppercase;   
        background-color: #0483a0;
        background-image: -webkit-gradient(linear, left top, left bottom, from(#31b2c3), to(#0483a0));
        background-image: -webkit-linear-gradient(top, #31b2c3, #0483a0);
        background-image: -moz-linear-gradient(top, #31b2c3, #0483a0);
        background-image: -ms-linear-gradient(top, #31b2c3, #0483a0);
        background-image: -o-linear-gradient(top, #31b2c3, #0483a0);
        background-image: linear-gradient(top, #31b2c3, #0483a0);
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
        border-radius: 3px;     
        text-shadow: 0 1px 0 rgba(0, 0 ,0, .3);
        -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 0 #fff;
        -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 0 #fff;
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 0 #fff;
    }
    .form-wrapper #submit:hover,
    .form-wrapper #submit:focus {
        background-color: #31b2c3;
        background-image: -webkit-gradient(linear, left top, left bottom, from(#0483a0), to(#31b2c3));
        background-image: -webkit-linear-gradient(top, #0483a0, #31b2c3);
        background-image: -moz-linear-gradient(top, #0483a0, #31b2c3);
        background-image: -ms-linear-gradient(top, #0483a0, #31b2c3);
        background-image: -o-linear-gradient(top, #0483a0, #31b2c3);
        background-image: linear-gradient(top, #0483a0, #31b2c3);
    }
    .form-wrapper #submit:active {
        outline: 0;   
        -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;
        -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;   
    }
    .form-wrapper #submit::-moz-focus-inner {
        border: 0;
    }

Hisoka

Üstat şu şekilde görünüyor. http://prntscr.com/6m0ex8

hata nerede, neyi düzeltmem gerekiyor?

snrj

bu konu smf 2.1 için smf 2.0.9 için alttaki linkteki konuya bakın lütfen
http://smf.konusal.com/index.php?topic=26.0

Hisoka

Alıntı yapılan: snrj - 28 Mar 2015 01:18bu konu smf 2.1 için smf 2.0.9 için alttaki linkteki konuya bakın lütfen
http://smf.konusal.com/index.php?topic=26.0
teşekkürler.