vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Boolean Search in Search Drop-Down Menu Option in Navbar (https://vborg.vbsupport.ru/showthread.php?t=100642)

Neutral Singh 11-11-2005 10:00 PM

Boolean Search in Search Drop-Down Menu Option in Navbar
 
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:

Quote:

Originally Posted by Jake Bunce

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



Find this code, add the red code:



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 11-12-2005 07:31 AM

2 things:

Can you please post a text file for this?

And, what is "Boolean Search?"

;)

Snake 11-12-2005 11:20 AM

That's what I'm wondering too. lol

AN-net 11-12-2005 11:44 AM

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 11-12-2005 01:04 PM

Quote:

Originally Posted by AN-net
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 11-12-2005 01:46 PM

<a href="http://www.mysql.com" target="_blank">www.mysql.com</a> 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 11-13-2005 01:17 PM

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 11-18-2005 10:05 PM

yah i dont see the red code....

shovel 11-18-2005 10:33 PM

Quote:

Originally Posted by ShadowOne
yah i dont see the red code....

Me either. But after comparison.

Add:
Code:

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

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

<!-- 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.

J0iN 07-03-2007 07:58 PM

Great Work :D


All times are GMT. The time now is 04:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01070 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete