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);
});
}
});
});