Vox Populi(x) forum

Alexandria Book Library => Supporto (Support) => Topic started by: miguelcorreia on 23 February 2016, 23:17:54

Title: Search by Author
Post by: miguelcorreia on 23 February 2016, 23:17:54
Hello
Again, congrats on this amazing component. I wasn't sure if I should post all my questions on a single topic or create as many as I go.
I've decided to open multiple topics, maybe others have the same issues and will look them at the topics.

So here it goes my first question:
Is there a way to do a search by an author's name?
Title: Re: Search by Author
Post by: miguelcorreia on 23 February 2016, 23:42:36
(better said)... using an expression in the search box.
Title: Re: Search by Author
Post by: federica on 26 February 2016, 11:49:28
Open several topics is the best way, thanks

To enable the search by author name:
go to menu search->list layouts then set "filters" and "Authors" = show
Title: Re: Search by Author
Post by: miguelcorreia on 26 February 2016, 11:56:03
Hi Federica,
Thanks for your reply. Maybe I didn't explained myself well.
I don't want to create an author's filter search.

I am asking how can the search box look up for author's, like it does for the title.

Thanks
Title: Re: Search by Author
Post by: federica on 26 February 2016, 12:19:21
You have to modify the author input from selectbox to text, then modify the query to search authors by text (lastname or firstname) instead by author ID.
The search query is located in model/search.php
Title: Re: Search by Author
Post by: miguelcorreia on 26 February 2016, 17:38:34
Sorry, I'm struggling a lot with this. I can't find where I change the selectbox to text.

Just to make sure my question was understood, I'm not talking about the filters comboboxes, but on the general search that only gets the tite, subtitle, isbn and catalog... I've also notice it searches inside the review field (fig. attch).

Can you please specify what code should I change, please?
Thanks.
Title: Re: Search by Author
Post by: federica on 27 February 2016, 17:33:09
Quote from: miguelcorreiaJust to make sure my question was understood, I'm not talking about the filters comboboxes, but on the general search that only gets the tite, subtitle, isbn and catalog... I've also notice it searches inside the review field (fig. attch).
I will change the description

Quote from: miguelcorreia
Can you please specify what code should I change, please?
Is not possible to obtain your wish through a single line edit
You have to modify the getListQuery function (components/com_abook/search.php)