Geamalinga
Geamalinga
Offline
0
Hi Germi,
i want to the Artist page the Albums be order by Date Added Descendant.
Latest added album to be firs in to the list. Now, latest added it is last in to the list.
Example:
http://www.geamalinga.eu/index.php/component/muscol/h/2-hrista-lupci
Can you help me ?
Best Regards,
VG
Responses (15)
  • Accepted Answer

    Friday, October 26 2012, 10:32 AM - #Permalink
    0
    do you know some MySQL?
    if you do, then it's easy: onthe /models/artist.php page you just need to change the ORDER BY clause to be date_added DESC
    The reply is currently minimized Show
  • Accepted Answer

    Geamalinga
    Geamalinga
    Offline
    Friday, October 26 2012, 10:56 AM - #Permalink
    0
    hi Germi,
    i tried to fix it but i cant.
    can you help me to edit the file ?
    Best regards,
    VG
    The reply is currently minimized Show
  • Accepted Answer

    Friday, October 26 2012, 10:58 AM - #Permalink
    0
    what did you do? what did you change, on which line?
    The reply is currently minimized Show
  • Accepted Answer

    Geamalinga
    Geamalinga
    Offline
    Friday, October 26 2012, 11:02 AM - #Permalink
    0
    in geamalinga.eu/components/com_muscol/models/artist.php ,i edit the file artist.php and o change ORDER BY date_added DESC to all ORDER BY .... but nothing happned.
    it is corect ?
    The reply is currently minimized Show
  • Accepted Answer

    Friday, October 26 2012, 11:06 AM - #Permalink
    0
    it's in line 228:

    ' ORDER BY year,month ';

    change for

    ' ORDER BY date_added ';
    The reply is currently minimized Show
  • Accepted Answer

    Geamalinga
    Geamalinga
    Offline
    Friday, October 26 2012, 11:40 AM - #Permalink
    0
    I tried but i dont solve the problem.
    please tell me exactly where i must change.
    Thank you.


    $query = ' SELECT al.id,al.name,al.image '. ' FROM #__muscol_albums as al '. ' LEFT JOIN #__muscol_format as f ON f.id = al.format_id '. ' WHERE al.artist_id = '.$this->_data[$i]->id . ' ORDER BY f.order_num, al.year, al.month'

    or

    for($i=0, $n = count($this->pdf_data); $i pdf_data[$i]->id;
    $query = ' SELECT f.format_name,al.name,al.year,ar.artist_name,ar.letter '.
    ' FROM #__muscol_albums as al '.
    ' LEFT JOIN #__muscol_artists as ar ON ar.id = al.artist_id '.
    ' LEFT JOIN #__muscol_format as f ON f.id = al.format_id '.
    ' WHERE (al.format_id = '.$format_id.' OR f.display_group = '.$format_id.')'.
    $and_letter .
    ' ORDER BY ar.letter,ar.class_name,al.year,al.month ';

    If you can send me a file artist.php which is edited, it will be perfect :P
    The reply is currently minimized Show
  • Accepted Answer

    Friday, October 26 2012, 11:52 AM - #Permalink
    0
    I don't know where you're looking at. this is not the file or the line I told you.

    what I told you: models/artist.php line 89.

    you should see what I wrote on the last post!
    The reply is currently minimized Show
  • Accepted Answer

    Geamalinga
    Geamalinga
    Offline
    Tuesday, October 30 2012, 05:44 PM - #Permalink
    0
    with witch program you open the file ?
    i cant see: ' ORDER BY year,month ';
    i cant see line number. i use Wordpad and Notepad
    Best Regards.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, October 30 2012, 05:49 PM - #Permalink
    0
    are you sure you are opening the same file?
    I use Dreamweaver.
    The reply is currently minimized Show
  • Accepted Answer

    greengeek
    greengeek
    Offline
    Wednesday, October 31 2012, 02:26 AM - #Permalink
    0
    Dreamweaver is nice if you need a wysiwyg program. But you have to be really careful on it's settings. It has been known for "fixing" and rewriting code so that it breaks the pages.

    A free alternative I like to use for editing code and as a replacement for notepad in general on windows is notepad++ You can find it at http://notepad-plus-plus.org/
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 31 2012, 10:49 AM - #Permalink
    0
    yes. I actually only use dreamweaver in the non-wysiwyg mode...
    notepad++ is absolutely great. I used it on my old (oooold) windows computer.
    on the Mac I would recommend Coda. it's a commercial one.
    The reply is currently minimized Show
  • Accepted Answer

    Geamalinga
    Geamalinga
    Offline
    Wednesday, October 31 2012, 11:22 PM - #Permalink
    0
    Hi Germi,
    i modified artist.php, line 214 like you told me but after that when i try to acces the page, the albums doesn`t appear.
    Tell me what can i do to fix this problem.
    Thank you.
    http://www.joomlamusicsolutions.com/images/fbfiles/images/214_resize.JPG

    http://www.joomlamusicsolutions.com/images/fbfiles/images/215_resize.JPG
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, November 01 2012, 02:20 PM - #Permalink
    0
    oh.. my bad!! sorry, I misspelled the field name...

    it's:

    ORDER BY al.added

    (not date_added, just "added")
    The reply is currently minimized Show
  • Accepted Answer

    Geamalinga
    Geamalinga
    Offline
    Thursday, November 01 2012, 08:18 PM - #Permalink
    0
    please tell me in which line/file i must change the words
    it is corect : models/artist.php / line 214 or 324 / ' ORDER BY al.added ';
    i made the changes but nothing happen. Please check if i do corect.

    Best Regards,
    VG

    http://www.joomlamusicsolutions.com/images/fbfiles/images/217_resize-20121101-3.JPG
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 02 2012, 05:51 PM - #Permalink
    0
    it's there. please try

    ORDER BY al.added DESC

    can't tell you nothing more, because this is all it takes. you just have to do that line
    The reply is currently minimized Show
Your Reply