Search in support tickets

#382 – Search only description Field?

Posted in ‘Support’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Wednesday, 19 September 2018 10:35 CEST
cmstyles
What can i do to use the Search Module only with an Input Field (Search Field) and searching for all Fields and not just the description field?

Everytime i want to Search one of my Ads the Module just find something when it stands in the description Field? Words like an Postalcode, City or other things i have Fields for the Search dont find?

I dont want to put the Fields in the Module, there are many Fields and i just want to use one Input Field where i can put a Free Text or just a Word i want to search for, what can i do here?
Custom Fields
Joomla Version
3.8.12
PHP Version
7.1.19
Product
AdsManager
Product Version
3.1.11
Wednesday, 19 September 2018 18:33 CEST
loic
Hello,

You need to custom the code to do that.

Open the file administrator/components/com_adsmanager/models/content.php and find the line 359:

$search .= $temp. "$idsearch MATCH (a.ad_headline,a.ad_text) AGAINST (".$this->_db->Quote($filter)." IN BOOLEAN MODE)) ";


Add the field you want between the () with ad_headline and ad_text. For example, if you have a field called ad_myfield add it like this :
$search .= $temp. "$idsearch MATCH (a.ad_headline,a.ad_text,ad_myfield) AGAINST (".$this->_db->Quote($filter)." IN BOOLEAN MODE)) ";


Please be aware that this method is very fast but doesn't work for word or number than have less than a certain number of characters.

That limit is set by the server configuration and is set as 3 by default.

Best regards.
 

Please rate this ticket

Help us improve our support services by rating this ticket from one to five stars, according to how much you are satisfied from the handling of this ticket, one being not satisfied and five being very satisfied.