My members requested me to add google and some other search engine search support to the navbar under search menu. Here is the code I write. I am not a coder and I can say that I am just doing this to improve my site. Also I have a problem with the code. Members using firefox can use the search form and see go button (see attached pic 1) but explorer users cannot see go button or choose search engine. If someone can correct the code he can take all the credit to himself. I just want my members to be happy
Find in Navbar :
PHP Code:
<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
</div>
<!-- / header quick search form -->
</if>
Replace With :
PHP Code:
<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="http://forum.ayyas.com/search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="text" class="bginput" name="query" size="20" />$gobutton</br><br />
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]" accesskey="4">$vbphrase[advanced_search]</a></td>
</tr>
<tr><td class="thead" title="nohilite">Internet'te Ara</td>
</tr>
<tr>
<script type="text/javascript">
function startSearch(){
searchString = document.searchForm.searchText.value;
switch (document.searchForm.whichEngine.value) {
case "eksisozluk":
finalSearchString = "http://sozluk.sourtimes.org/show.asp?t=" + searchString;
break
case "google":
finalSearchString = "http://www.google.com/search?q=" + searchString;
break
case "tdk":
finalSearchString = "http://www.tdk.gov.tr/TDKSOZLUK/SOZBUL.ASP?kelime=" + searchString;
break
case "vb":
finalSearchString = "";
document.searchForm.action = "http://forum.ayyas.com/search.php";
document.searchForm.method = "post";
document.searchForm.query.value = document.searchForm.searchText.value;
document.searchForm.submit();
return true;
break
default:
finalSearchString = "";
}
window.open(finalSearchString);
return true;
}
</script><td class="vbmenu_option" title="nohilite">
<form name="searchForm" method="post" action="">
<input name="searchText" type="text" />
<input type="button" value="Git" onclick="startSearch();" />
<br/><b>Arama Motoru</b>
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="query" />
<select name="whichEngine">
<option value="google">Google</option>
<option value="eksisozluk">Eksi Sözlük</option>
<option value="tdk">Türk Dil Kurumu</option>
</select>
</form>
</td>
</tr>
</table>
</div>
<!-- / header quick search form -->
</if>