Skip to content

dart-creations.com

Advertisement
Home arrow Forums
Print E-mail

#14 - Optimize the default search options

By default the Joomla search searches for any word. That is if you look for "Joomla components", you will find any page which contains either Joomla or components. People require AND search. The following hack to the core code will enable all words searching by default.

In /components/com_search/search.html.php:

Find:               $searchphrase     = strtolower( strval( mosGetParam( $_REQUEST, 'searchphrase', 'any' ) ) );
Change to:      $searchphrase     = strtolower( strval( mosGetParam( $_REQUEST, 'searchphrase', 'all' ) ) );
This occurs twice in approximaletely lines 126 and 215

Also, in /components/com_search/search.php: 

Find:            $searchphrase = mosGetParam( $_REQUEST, 'searchphrase', 'any' );

Change to:   $searchphrase = mosGetParam( $_REQUEST, 'searchphrase', 'all' );
This occurs in approximately line 103

Rememer to make a backup of each files in case something goes wrong. 

Comments
Search RSS
voinsvetii     |89.185.88.xxx |2009-06-01 20:21:56
?????? ???? ?????? ????????? ?? ???-?? ????? ???????? ...
MishkOO     |89.185.88.xxx |2009-06-06 01:00:15
????????? ).. ???? ???-?? ???????? ?? ???? ????????? ?????? ...
Only registered users can write comments!

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 

Buy us a beer!

If we've helped you, consider buying a beer €3. It will inspire us to keep on giving! Cheers!

Sponsors

Login Form






Lost Password?
No account yet? Register

Pagerank
Generated in 0.52999 Seconds