search in review, authors, tags,... by keywords

Started by sidhashem, 23 September 2015, 12:24:38

Previous topic - Next topic
A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

sidhashem

Hi, Thanks to your excellent Component. But I have a problem and I need when a user search by keyword, all of the parameters specially reviews being searched.

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

federica

Hi sidhashem,
modify the file components/com_abook/models/search.php line 156
from:
if ($this->getState('filter.search') !='') {
$filtersearch=$db->escape($this->getState('filter.search'));
$query->where('(LOWER( a.title ) LIKE "%'.$filtersearch.'%" OR (LOWER( a.subtitle) LIKE "%'.$filtersearch.'%") OR (a.catalogo LIKE"%'.$filtersearch.'%") OR (a.isbn LIKE "%'.$filtersearch.'%"))');

}

to:
if ($this->getState('filter.search') !='') {
                        $filtersearch=$db->escape($this->getState('filter.search'));
                        $query->where('(LOWER( a.title ) LIKE "%'.$filtersearch.'%" OR LOWER( a.subtitle) LIKE "%'.$filtersearch.'%" OR a.catalogo LIKE "%'.$filtersearch.'%" OR a.isbn LIKE "%'.$filtersearch.'%" OR LOWER( a.description ) LIKE "%'.$filtersearch.'%")');
                }
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]