Changing default radio selected in cp_search field

  • mparada
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 6 months ago #709 by mparada
Hi, I ´m having several troubles with search field in cp_search, because "EXACT FRASE" is the default radio selected, and is the least inclusive option (least than all words OR any words).

Any Ideas ?

Thanks

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago #710 by andrea_4g
We chose 'exact' as default because it's the fastest and poses less burdern on DB (which is a concern for many users).
To choose a different default, you can make a very small modification in file :
modules/mod_cpsearch/mod_cpsearch.php at line 442:
From
Code:
$checked = JRequest::getCmd('searchphrase', 'exact');
to
Code:
$checked = JRequest::getCmd('searchphrase', 'all');
or
Code:
$checked = JRequest::getCmd('searchphrase', 'any');

Please Log in or Create an account to join the conversation.

Time to create page: 0.149 seconds