Vox Populi(x) forum

Alexandria Book Library => Supporto (Support) => Topic started by: sidhashem on 23 September 2015, 12:24:38

Title: search in review, authors, tags,... by keywords
Post by: sidhashem on 23 September 2015, 12:24:38
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.
Title: Re: search in review, authors, tags,... by keywords
Post by: federica on 14 October 2015, 11:58:13
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.'%")');
                }