authors order

Started by mago78, 19 July 2011, 12:50:30

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

mago78

how at all again how can i set ascending order for the authors now it is in descending and i can't change it

thank at all

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 mago78,
are you talking about a view in the frontend or backend? Send me the link or a print screen.
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]

mago78

Hi i mean that in front hand authors are ordered in descending order and I need when I have a book schede authors have to  be ordered from a to z and i can't do it... Can you help me???

federica

#3
Ok, I understand!
Edit the file <your_site>/component/com_abook/models/category.php and change the row 65
from
$query = "SELECT a.*, GROUP_CONCAT(bb.name SEPARATOR ', ') AS author, "
to
$query = "SELECT a.*, GROUP_CONCAT(bb.name ORDER BY bb.name ASC SEPARATOR ', ') AS author, "

edit the file <your_site>/component/com_abook/models/book.php and change the row 136
from
' WHERE b.idbook = '. (int) $this->_id ;
to
' WHERE b.idbook = '. (int) $this->_id .
' ORDER BY author ASC ';


edit the file <your_site>/component/com_abook/models/search.php and change the row 129
from
$query = " SELECT a.*, a.title AS booktitle, cat.title AS cattitle, GROUP_CONCAT(bb.name SEPARATOR ', ') AS author,  "
to
$query = " SELECT a.*, a.title AS booktitle, cat.title AS cattitle, GROUP_CONCAT(bb.name ORDER BY bb.name ASC SEPARATOR ', ') AS author,  "

This fix will be included in next version.
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