Query type selection - Module Search

  • freddy
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 9 months ago #2161 by freddy
Query type selection - Module Search was created by freddy
How to change the default button in Query type selection under the search text box?

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

More
9 years 9 months ago #2163 by andrea_4g
Replied by andrea_4g on topic Query type selection - Module Search
The button has 3 CSS classes:
btn btn-primary btn-medium
as to make it similar to other Joomla's buttons.

Also, it's contained with the parent element:
Code:
<div class="cp-auto-submit"> <button .../> </div>
So, if your add a statement like:
Code:
div.cp-auto-submit button.btn{ some-property: some-value; }
you'll be able to style the button as you like.

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

  • freddy
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 9 months ago #2164 by freddy
Replied by freddy on topic Query type selection - Module Search
Sorry for my english. It's difficult for me to explain my question.

With Query type, i have 3 radio buttons to select mode search.
I would like change the actually selected radio button n°3 to the radio button n°1 on all pages.

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

More
9 years 9 months ago #2166 by andrea_4g
Replied by andrea_4g on topic Query type selection - Module Search
Two solutions:

== quick, but will be overwritten on Custom Properties update (not recommended) ==
Edit file modules/mod_cpsearch/mod_cpsearch.php and change line 82 from:
Code:
$searchphrase = $app->input->get('searchphrase', 'exact'); //any, all, exact
to:
Code:
$searchphrase = $app->input->get('searchphrase', 'all'); //any, all, exact

== by means of a template override, thus upgrade safe (recommended) ==
- create the directory <your-template>/html/mod_cpsearch
- copy file modules/mod_cpsearch/tmpl/default_querytype.php into directory <your-template>/html/mod_cpsearch
- edit file <your-template>/html/mod_cpsearch/default_querytype.php
- add the following lines so that lines 13-17 looks like:
Code:
defined('_JEXEC') or die('Restricted access'); $app = JFactory::getApplication(); $searchphrase = $app->input->get('searchphrase', 'all'); //any, all, exact ?>

Done
The following user(s) said Thank You: freddy

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

Time to create page: 0.164 seconds