isa
isa
Offline
0
Here is link of one of the album pages:
http://mojakozmetika.mk/isa/audio-archives-by-category/integrative-medicine,
I want recently added songs to be on the top of the page.

How to do this please?

Thank you in advance.

Accepted Answer

isa
isa
Offline
Sunday, February 08 2015, 11:32 PM - #Permalink
0
Thanks, I found it by myself.

into album.php under the function getSongs()
I changed ' ORDER BY s.disc_num,s.num ' to ' ORDER BY ID DESC ';


Regards,
The reply is currently minimized Show
Responses (23)
  • Accepted Answer

    Tuesday, February 03 2015, 12:16 PM - #Permalink
    0
    do you have a module position there? that's what you should use...
    The reply is currently minimized Show
  • Accepted Answer

    isa
    isa
    Offline
    Tuesday, February 03 2015, 03:53 PM - #Permalink
    0
    No, I don't have module positions there. I have used it as menu item type "Standard Album Layout".

    There are many audio pages (one of these pages as an example: http://mojakozmetika.mk/isa/audio-archives-by-category/integrative-medicine ).

    I want the latest audio files to be displayed on the top of each page, first (older audio files) added to be displayed at the bottom of each page (newest audio files ascending ordered-older audio files descending ordered of each page). Currently, the order is descending.

    Thank you in advance,
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 03 2015, 04:56 PM - #Permalink
    0
    well you can use the module positions available on the album page (see here http://www.joomlathat.com/documentation/music-collection/album-profile-in-music-collection-21 ) but this page does not have a module position "at the top". No music collection pages have that position..
    The reply is currently minimized Show
  • Accepted Answer

    isa
    isa
    Offline
    Tuesday, February 03 2015, 09:24 PM - #Permalink
    0
    It seems that we don't understand each other. Sorry, i might have not explained well.
    My question was, how to order the newest audio files so that they will be displayed at the top of the list? For example, on this page http://mojakozmetika.mk/isa/audio-archives-by-category/integrative-medicine. This page is created through the main menu as menu item type "Standard Layout Album" page (I haven't used any module for this purpose).

    So, I'm not asking about any modules and module positions, but I'm asking how to make the audio files to "fall down" in order starting from the latest (the newest added, the file with the latest date) at the top and ending with the oldest added (the file with the earliest date).

    Thanks
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, February 04 2015, 11:52 AM - #Permalink
    0
    ohhh!!! :) ok I understand you now!

    well, for this you just need to modify the MySQL query that retrieves the song list. do you know MySQL?

    the file to modify is /components/com_muscol/models/album.php
    The reply is currently minimized Show
  • Accepted Answer

    isa
    isa
    Offline
    Thursday, February 05 2015, 12:22 AM - #Permalink
    0
    I 'm not an expert in MySQL, I have some basic knowledge.
    Exactly which line should be changed in that file? or would you like send me that part of the code, modified by you, just to replace it, please?

    Thank you,
    The reply is currently minimized Show
  • Accepted Answer

    Friday, February 06 2015, 10:34 AM - #Permalink
    0
    you need to change the ORDER BY clause on the function bulidQuery(), that's all.
    The reply is currently minimized Show
  • Accepted Answer

    isa
    isa
    Offline
    Friday, February 06 2015, 08:34 PM - #Permalink
    0
    I can't find function bulidQuery() in /components/com_muscol/models/album.php (album.php) or I don't understand something? Can you help me please?

    Thank you.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, February 08 2015, 12:05 PM - #Permalink
    0
    it's misspelled. it's buildQuery
    The reply is currently minimized Show
  • Accepted Answer

    isa
    isa
    Offline
    Sunday, February 08 2015, 10:00 PM - #Permalink
    0
    There is not function buildQuery, you can check by your self (in the attachment).
    Regards,
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, February 08 2015, 10:52 PM - #Permalink
    0
    try function getSongs()
    The reply is currently minimized Show
  • Accepted Answer

    amelcher
    amelcher
    Offline
    Tuesday, September 29 2015, 05:46 PM - #Permalink
    0
    I am having the same issue. My daughter is drilling me on why her oldest songs are displaying first and her newest ones are at the bottom. "The newest songs should be at the top like itunes dad" (This is what I get to deal with) Anyways, I made the change in the getSongs() function to ' ORDER BY ID DESC '; but it still displays the same way. I am wondering if I need to do anything else to complete this step? I disabled cache so I know it's displaying in real time. Any guidance with this would be most helpful. Thanks,

    Adam
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 29 2015, 05:58 PM - #Permalink
    0
    Hello Adam,

    you did this change on the models/album.php page?
    The reply is currently minimized Show
  • Accepted Answer

    amelcher
    amelcher
    Offline
    Tuesday, September 29 2015, 06:02 PM - #Permalink
    0
    Germinal.

    Thanks for such a fast reply! Yes I did it on the album.php file around line 380 under function getSongs (
    LEFT JOIN #__muscol_artists as ar ON ar.id = s.artist_id ' .
    ' WHERE s.album_id = '.$this->_id.
    ' ORDER BY id DESC ';
    )
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 29 2015, 06:09 PM - #Permalink
    0
    try:

    ORDER BY s.id DESC

    (notice the s.id instead of just "id")
    The reply is currently minimized Show
  • Accepted Answer

    amelcher
    amelcher
    Offline
    Tuesday, September 29 2015, 06:27 PM - #Permalink
    0
    changed it and still no difference.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 29 2015, 06:28 PM - #Permalink
    0
    that sounds weird.. it should really be as simple as that. you're for sure in the album page, right?

    do you want to send me a link to the page so I can check?
    The reply is currently minimized Show
  • Accepted Answer

    amelcher
    amelcher
    Offline
    Tuesday, September 29 2015, 07:01 PM - #Permalink
    0
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 29 2015, 07:03 PM - #Permalink
    0
    thanks. are you able to send me FTP access at support@ joomlathat.com so I can take a look at the code?
    The reply is currently minimized Show
  • Accepted Answer

    amelcher
    amelcher
    Offline
    Tuesday, September 29 2015, 07:44 PM - #Permalink
    0
    yessir sending in 5
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 29 2015, 08:05 PM - #Permalink
    0
    Hello Adam,

    nevermind the acces, I figured it out.

    You're not on the album page...! this is the ARTIST page. specifically, the songs list page.

    the file you need to modify is /models/songs.php, line 70.

    you need to ORDER BY s.id DESC.

    that's it.
    The reply is currently minimized Show
  • Accepted Answer

    amelcher
    amelcher
    Offline
    Tuesday, September 29 2015, 08:46 PM - #Permalink
    0
    awesome. thanks for your help on this :)
    The reply is currently minimized Show
  • Accepted Answer

    amelcher
    amelcher
    Offline
    Tuesday, September 29 2015, 09:14 PM - #Permalink
    0
    changed and works like a charm! :) thanks again :)
    The reply is currently minimized Show
Your Reply