PDA

View Full Version : Boolean Search in Search Drop-Down Menu Option in Navbar


Neutral Singh
12 Nov 2005, 06:11
Boolean Search in Search Drop-Down Menu Option in Navbar
[Should work in all vB 3.5.x versions]


All Thanks To Jake Bunce, vBulletin Team

Context: I was wondering, how could we set up the boolean search as the default option for quick search from serach drop-down menu

Installation Instructions:



Admin CP -> Styles & Templates -> Style Manager -> -> Navigation / Breadcrumb Templates -> navbar



Find this code, add the red 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="search.php" method="post">

<input type="hidden" name="do" value="process" />

<input type="hidden" name="showposts" value="0" />

<input type="hidden" name="quicksearch" value="1" />

<input type="hidden" name="s" value="$session[sessionhash]" />

<input type="hidden" name="searchtype" value="1" />

<input type="text" class="bginput" name="query" size="20" />&nbsp;$gobutton<br />

</form>

</td>

</tr>

<tr>

<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>

</tr>

</table>

</div>

<!-- / header quick search form -->

</if>





That should do it.

Thats All folks, Enjoy!!

Demo: http://www.sikhphilosophy.net

Please click install to encourage me to release such cute pies for you all !! :nervous:

Boofo
12 Nov 2005, 09:31
2 things:

Can you please post a text file for this?

And, what is "Boolean Search?"

;)

Snake
12 Nov 2005, 13:20
That's what I'm wondering too. lol

AN-net
12 Nov 2005, 13:44
boolearn search is where you can specify that certain words are more important than others or to skip entries containing certain words. or if two words are to be consectutive. it goes with full text searching.

Boofo
12 Nov 2005, 15:04
boolearn search is where you can specify that certain words are more important than others or to skip entries containing certain words. or if two words are to be consectutive. it goes with full text searching.

I guess I've never played with that feature. How would you do it?

AN-net
12 Nov 2005, 15:46
www.mysql.com has a great documentation this. you would use a "+" sign in front of words you want to appear in a search and a "-" sign in front of words you do not want your results to include. example:
+vbulletin -.org
that would yield all results with vbulletin but no results containing .org

Tulsa
13 Nov 2005, 15:17
I like the idea of being able to search for phrases instead of just key words but for some reason I am not seeing the "red" code you're speaking of. I've looked at this thread with both "Firefox" on a Mac and IE on a PC and nothing is coming up red or any other color for that matter.

ShadowOne
19 Nov 2005, 00:05
yah i dont see the red code....

shovel
19 Nov 2005, 00:33
yah i dont see the red code....

Me either. But after comparison.

Add:
<input type="hidden" name="searchtype" value="1" />

After:
<input type="hidden" name="s" value="$session[sessionhash]" />

Under:
<!-- header quick search form -->

Hope that helps. Enjoy.

Ps.
It might make it a little better on you, Neutral Singh, if you add the definition of Boolean and Boolean Searching to your first post, that way you don't have to constantly explain. Good hack though, I didn't even know it existed in the form. Nice job.
(member.php?u=63573)

J0iN
03 Jul 2007, 21:58
Great Work :D