The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

searchbox codes

View previous topic View next topic Go down

Solved searchbox codes

Post by DeathDunk98* on 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

DeathDunk98*
Forumember

Posts : 479
Reputation : 3
Language : Shqip

Back to top Go down

Solved Re: searchbox codes

Post by levy on 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);
});
}
});
});

levy
Hyperactive

Male Posts : 2582
Reputation : 345
Language : Romanian, English
Location : criticize artwork, not people!

http://help.forumotion.com/

Back to top Go down

Solved Re: searchbox codes

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

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

DeathDunk98*
Forumember

Posts : 479
Reputation : 3
Language : Shqip

Back to top Go down

Solved Re: searchbox codes

Post by levy on 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.

levy
Hyperactive

Male Posts : 2582
Reputation : 345
Language : Romanian, English
Location : criticize artwork, not people!

http://help.forumotion.com/

Back to top Go down

Solved Re: searchbox codes

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

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

DeathDunk98*
Forumember

Posts : 479
Reputation : 3
Language : Shqip

Back to top Go down

Solved Re: searchbox codes

Post by levy on 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.

levy
Hyperactive

Male Posts : 2582
Reputation : 345
Language : Romanian, English
Location : criticize artwork, not people!

http://help.forumotion.com/

Back to top Go down

Solved Re: searchbox codes

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

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

DeathDunk98*
Forumember

Posts : 479
Reputation : 3
Language : Shqip

Back to top Go down

Solved Re: searchbox codes

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

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

DeathDunk98*
Forumember

Posts : 479
Reputation : 3
Language : Shqip

Back to top Go down

Solved Re: searchbox codes

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

Topic Solved & Locked


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


SLGray
Administrator
Administrator

Male Posts : 36641
Reputation : 2441
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum