The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
3 posters

    searchbox codes

    DeathDunk98*
    DeathDunk98*
    Forumember


    Posts : 473
    Reputation : 3
    Language : Shqip

    Solved searchbox codes

    Post by DeathDunk98* October 6th 2013, 1:04 pm

    hello, I have some searchbox codes, but I dont know how to position them under my navigation bar here's my forum :
    http://www.islamishendrit.halofight.com
    and download the codes here:
    http://www.mediafire.com/download/0b4059txvu3cbcw/seachbox.rar

    Please post the codes here and tell me where to put them !


    Last edited by andiikadriu on October 6th 2013, 2:06 pm; edited 1 time in total
    levy
    levy
    Hyperactive


    Male Posts : 2631
    Reputation : 350
    Language : English, Romanian
    Location : Romania

    Solved Re: searchbox codes

    Post by levy October 6th 2013, 1:09 pm

    1)
    Administration Panel -> Display -> Colors -> CSS Stylesheet and add that
    Code:
    span#box{
      float:right;
    }

    span#box input {
     padding:5px;
     border:0px;
     font-family:tahoma;
     font-size:12px;
     color:#333;
     background:#fff;
     box-shadow:0 0 5px rgba(210, 210, 210, 210);
     }
     
    span#box button {
     padding:5px;
     border:0px;
     font-family:tahoma;
     font-size:12px;
     color:#fff;
     background:#4aaee7;
     }
     
    span#box button:hover {
     background:#fff;
     color:#333;
     box-shadow:0 0 5px rgba(210, 210, 210, 210);
     cursor:pointer;
     }
     
    span#box search_result {
     padding:5px;
     box-shadow:0 0 5px rgba(210, 210, 210, 210);
     background:#fff;
     color:#333;
     position:absolute;
     }
    2) Administration Panel -> Display -> Templates -> General -> Overall_header , find that

    Code:
       <table cellspacing="0" cellpadding="0" border="0" align="{MENU_POSITION}" class="menu_mbajtesi">
                   <tr>
                      <td align="{MENU_POSITION}"{MENU_NOWRAP}>{GENERATED_NAV_BAR}</td>
                   </tr>
                </table>
    and replace with this
    Code:
       <table cellspacing="0" cellpadding="0" border="0" align="{MENU_POSITION}" class="menu_mbajtesi">
                   <tr>
                      <td align="{MENU_POSITION}"{MENU_NOWRAP}>{GENERATED_NAV_BAR}</td>
                   </tr>
                                     
    <span id='box'>
    <input type='text' id='search_box' /> <button id='search_button'>Search</button>
    </span>

    <div id='search_result'>

    </div>
                </table>
    3) Administration Panel -> Modules -> JavaScript Management -> Create a new javascript -> tick in all pages , name what you want
    Code:
    $(document).ready(function(){
    var right = $('#box').position().right;
    var top = $('#box').position().top;
    var width = $('#box').width();

    $('search_result').css('right', right).css('top', top+32).css('width', width);

    $('#search_box').keyup(function(){
    var value = $(this).val();

    if(value != ''){
    $.post('search.php', {value: value}, function(data){
    $('#search_result').html(data);
    });
    }
    });
    });
    DeathDunk98*
    DeathDunk98*
    Forumember


    Posts : 473
    Reputation : 3
    Language : Shqip

    Solved Re: searchbox codes

    Post by DeathDunk98* October 6th 2013, 1:14 pm

    its not searching ? the position its okay but its not searching SadSad
    levy
    levy
    Hyperactive


    Male Posts : 2631
    Reputation : 350
    Language : English, Romanian
    Location : Romania

    Solved Re: searchbox codes

    Post by levy October 6th 2013, 1:21 pm

    Replace this :
    Code:
     
                <table cellspacing="0" cellpadding="0" border="0" align="{MENU_POSITION}" class="menu_mbajtesi">
                   <tr>
                      <td align="{MENU_POSITION}"{MENU_NOWRAP}>{GENERATED_NAV_BAR}</td>
                   </tr>
      </table>
    And replace with this :

    Code:
    <div id="search" class="right"><form method="get" action="/search" id="search-box"><fieldset><a href="/search" accesskey="4" rel="search" id="adv_search" class="right" original-title="Cautare avansata">Advanced</a><span id="search_wrap" class="right"><input type="text" name="search_keywords" id="main_search" maxlength="128" size="17" class="inputbox search" value="Search..." onclick="if (this.value == 'Search...') this.value = '';" onblur="if (this.value == '') this.value = 'Search...';"><input type="submit" class="submit_input clickable" value="Search"></span></fieldset></form></div></tr>
          
                <table cellspacing="0" cellpadding="0" border="0" align="{MENU_POSITION}" class="menu_mbajtesi">
                   <tr>
                      <td align="{MENU_POSITION}"{MENU_NOWRAP}>{GENERATED_NAV_BAR}</td>
                   </tr>
      </table>
    Remove old codes from CSS and put that :

    Code:
    #adv_search{display:none!important;
    }

    fieldset{
    border: none;
    }

    #search_wrap input {
     padding:5px;
     border:0px;
     font-family:tahoma;
     font-size:12px;
     color:#333;
     background:#fff;
     box-shadow:0 0 5px rgba(210, 210, 210, 210);
     }

    #search_wrap .submit_input.clickable{
     padding:5px;
     border:0px;
     font-family:tahoma;
     font-size:12px;
     color:#fff;
     background:#4aaee7;
    }

    #search_wrap .submit_input.clickable:hover{background:#fff;
     color:#333;
     box-shadow:0 0 5px rgba(210, 210, 210, 210);
     cursor:pointer;
     }
    Your searchbox contain php and forumotion don't allow php , this is my old searchBox only with CSS edits to look like yours.
    DeathDunk98*
    DeathDunk98*
    Forumember


    Posts : 473
    Reputation : 3
    Language : Shqip

    Solved Re: searchbox codes

    Post by DeathDunk98* October 6th 2013, 1:26 pm

    somethings wrong with the structure of forum when I added the searchbox using your codes ? help
    searchbox codes Untitl14
    levy
    levy
    Hyperactive


    Male Posts : 2631
    Reputation : 350
    Language : English, Romanian
    Location : Romania

    Solved Re: searchbox codes

    Post by levy October 6th 2013, 1:30 pm

    Code:
                <table cellspacing="0" cellpadding="0" border="0" align="{MENU_POSITION}" class="menu_mbajtesi">
                  <tr>
                      <td align="{MENU_POSITION}"{MENU_NOWRAP}>{GENERATED_NAV_BAR}</td>
    <div id="search" class="right"><form method="get" action="/search" id="search-box"><fieldset><a href="/search" accesskey="4" rel="search" id="adv_search" class="right" original-title="Cautare avansata">Advanced</a><span id="search_wrap" class="right"><input type="text" name="search_keywords" id="main_search" maxlength="128" size="17" class="inputbox search" value="Search..." onclick="if (this.value == 'Search...') this.value = '';" onblur="if (this.value == '') this.value = 'Search...';"><input type="submit" class="submit_input clickable" value="Search"></span></fieldset></form></div>
                  </tr>
      </table>
    Try this code.
    DeathDunk98*
    DeathDunk98*
    Forumember


    Posts : 473
    Reputation : 3
    Language : Shqip

    Solved Re: searchbox codes

    Post by DeathDunk98* October 6th 2013, 2:03 pm

    it says the tag its wrong ? hasnt been opened or hasnt been closed ?
    DeathDunk98*
    DeathDunk98*
    Forumember


    Posts : 473
    Reputation : 3
    Language : Shqip

    Solved Re: searchbox codes

    Post by DeathDunk98* October 6th 2013, 2:05 pm

    actualy I solved it :)thank you very much , this helped a lot
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: searchbox codes

    Post by SLGray October 6th 2013, 5:02 pm

    Topic Solved & Locked



    searchbox codes Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.

      Current date/time is November 11th 2024, 10:43 pm