changing searchtools-pull-down menu options

Started by hymeno, 28 April 2019, 12:02:07

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

hymeno

hi,

does anyone have any idea/hint how I can change the order of the pull-down menu options?
where are the relevant queries? In models or view.html I wasn't lucky yet ...

I want to change the year: latest on top
I would like to structure the tags according to their "groups" (like categories)

thx,
hym
protostar & com_abook&view=search-override

( hoping, that searchtools will be visible once under android too ...   :-\ )

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

hymeno

well: now you get the options more sorted:
.../components/com_abook/models/fields/
tags.php
line 56$query->leftjoin('#__abtag_groups AS btg ON btg.id=t.id_taggroup');
line 75$query->order('btg.name DESC');

year.php
line 71: $query->order('b.year DESC');
:-(( Unfortunately as core-hack. I haven't found an override yet.


but there are still some list problems left:

abbook unfortunately still inserts page breaks for the hit list. But I would like to have everything on one page, i.e. "All" as default display number.

And I also can't access the sorting of the list via backend-options.
I can't find the competent location of the query ...
I would like to sort the titles according to the entries in "Catalog" and "# page index" ...

best

hymeno

via the backend options nothing desired of the searchtools could be changed.
After some long research I found an approach here
...components/com_abook/models/search.php, line 250:
// $query->order($db->escape($this->getState('list.ordering', 'a.ordering')).' '.$db->escape($this->getState('list.direction', 'ASC')).', a.title');
// commented out and for instance new:
$query->order($db->escape('a.year DESC'));
$query->order($db->escape('a.pag_index'));
This works, but is determined and of course not in the sense of J!

regards

federica

Hi hymeno,
which abook version are you using?
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]

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