Customizing SMF > Modifications and Packages

Search Enhancement Mod

<< < (2/85) > >>

ioszilla:

--- Quote from: Eleglin on August 13, 2007, 08:59:30 AM ---it would be so cool if we can choose an engine (Google / Yahoo / or customised ) for the search on the entire site.

--- End quote ---

* /me despises all non-Google search engines ;)


Just kidding. It's a good idea actually.

For now you can edit Sources/Search.php after installation of this mod, just find:


--- Quote ---function QueryPreProcess ()
{
   global $scripturl;
   
   $Redirects = array(
      'members' => $scripturl . '?action=mlist;sa=search;fields=name,email;search=',
      // Google Site Search
      'entiresite' => 'http://www.google.com/search?domains=' . $_SERVER['HTTP_HOST']. '&sitesearch=' . $_SERVER['HTTP_HOST'] . '&q='
   );
   
   foreach ($Redirects as $redirect => $url)
      if (isset($_REQUEST['search_selection']) && $_REQUEST['search_selection'] == $redirect)
      {
         header('Location: ' . $url . urlencode($_REQUEST['search']));
         exit;   
      }
}
--- End quote ---


Change the search engine here:

--- Quote ---'entiresite' => 'http://www.google.com/search?domains=' . $_SERVER['HTTP_HOST']. '&sitesearch='
--- End quote ---

Eleglin:
I have a limited place on my server.
The size of my database (for messages) is 16272.43 Ko. (without index )

Does it make a very huger database ?

ioszilla:
It does not modify your smf database AT ALL and it will not write custom data to your server anywhere. :) It's works in 100% 'READ-ONLY mode'.

Eleglin:
oh ! There seems to be some javascript errors on the results pages of your forums ?
Especially when I click on hide/show result summary.
I use Firebug and Web developper :-)
These are mods for Firefox ;)

ioszilla:
Yup. There was a javascript bug in the template (undefined function). Fixed and uploaded. Please uninstall version 1.1.2 of this mod (which is what you have) and install latest version 1.1.3:  http://custom.simplemachines.org/mods/index.php?mod=887

Thanks!! :D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version