Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Replacing vanilla search with Google search

Hello,
can someone tell me how i can replace vanilla default search with Google search?

Answers

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2013

    Instead of replacing why not just add a google search bar on top or below the forum search?
    Just make the custom google search bar and paste the code into your theme's default .master.

  • I prefer to have just one search field, as a user I will never search twice in a website. Moreover, vanilla's default search is not useful.

  • Yes, there is a plugin called Vanoogle. It will use Google's custom search bar instead.

  • edited April 2013

    Please tell me where to insert google search code "Code from adsense" inside default.master.php file

    <form class="form-search js-search-form" action="http://forum.site.com/search" id="global-nav-search"
    style="display:block" name="Search" method="GET">

              `<span class="search-icon js-search-action"> <i class="nav-search"></i> </span>`
              `<input class="search-input" type="text" id="search-query" placeholder="Search Questions and Discussions" name="Search">`
    
    
    
              `<div class="dropdown-menu dropdown-menu-dark typeahead"> </div>`
             `<!--  <input type="hidden" name="cx" value="partner-pub-xxxxxxxxxxxxxxxxxxxxxx" />`
                 `<input type="hidden" name="cof" value="FORID:10" />`
                 `<input type="hidden" name="ie" value="UTF-8" /> -->`
            `</form>`
          `</div>`
            `<?php`
    

    `

    vanoogle plugin is not what I am looking for :(

  • SrggamerSrggamer HardCore Gamer ✭✭✭

    Replace the previous search with your search.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @ahmedaladdin said:
    Please tell me where to insert google search code "Code from adsense" inside default.master.php file

    Look for < div id="Panel"> if that is where you want the search bar. And paste the code there. Then find the code for the search

    <?php
                        $Form = Gdn::Factory('Form');
                        $Form->InputPrefix = '';
                        echo 
                            $Form->Open(array('action' => Url('/search'), 'method' => 'get')),
                            $Form->TextBox('Search'),
                            $Form->Button('Go', array('Name' => '')),
                            $Form->Close();
                    ?>
    

    And either paste the new bar in this section instead of the above, or remove it.

  • @ahmedaladdin said:
    can someone tell me how i can replace vanilla default search with Google search?

    following link:
    http://vanillaforums.org/discussion/21676/penetrating-google-into-built-in-search-box

Sign In or Register to comment.