Album order

0
Hi, great component but have one problem that I am not sure how to solve.
I have a menu linked directly to the all album picture view page, how can I put them in order by year and month created. I am thinking it is to do with this line but do not want to mess anything up as I am still new to code.

ORDER BY f.order_num,f.id,year,month ';

Many thanks
Responses (8)
  • Accepted Answer

    Monday, October 26 2015, 08:40 PM - #Permalink
    0
    Forgot to say in need newest album at the top
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, October 27 2015, 01:56 PM - #Permalink
    0
    what you mean the "all album picture page"...? which page is that?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, October 29 2015, 03:43 AM - #Permalink
    0
    Sorry for the bad explanation, probably easier to just give you the link. At the moment the albums are showing in order of upload, is it possible to change the order to that of the album date created with latest album in first position…..many thanks

    http://markhandley.rocks/index.php?option=com_muscol&view=artists&layout=detailed&Itemid=319
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, October 29 2015, 02:14 PM - #Permalink
    0
    oh ok. well you would need to open file /components/com_muscol/models/artist.php and, about line 118, you would need to add your own ORDER BY clause.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, October 29 2015, 08:07 PM - #Permalink
    0
    Can I please get a little help sorting this out as I am still very new to code, I am building the site for a friend and we are trying to get it finished by the weekend.

    If you are too busy to help could you please at least show us how to get the latest album uploaded into first position and oldest uploaded into last position. At least that way we can re-upload in correct order.

    Many thanks

    Just in case you can help... line 118

    function getRelated(){

    if (empty( $this->_related )) {
    //busquem primer els related creuats
    $query = ' SELECT id '.
    ' FROM #__muscol_artists '.
    ' WHERE related LIKE "%,'.$this->_data->id.',%"'.
    ' OR related LIKE "'.$this->_data->id.',%"'.
    ' OR related LIKE "%,'.$this->_data->id.'"'.
    ' OR related LIKE "'.$this->_data->id.'"'
    ;
    $this->_db->setQuery( $query );
    $cross_related = $this->_db->loadResultArray();

    $related = explode(",",$this->_data->related);
    if($related[0] == "") $related = array();

    for($i = 0; $i < count($cross_related); $i++){
    $related[] = $cross_related[$i];
    }
    $related = array_unique($related);
    //print_r($related);die();
    $array_related = array();
    foreach($related as $index => $valor){
    $query = ' SELECT id,artist_name '.
    ' FROM #__muscol_artists '.
    ' WHERE id = '.$valor.
    ' LIMIT 1 ';
    $this->_db->setQuery( $query );
    $array_related[] = $this->_db->loadObject();
    }
    $this->_related = $array_related;
    $this->_related_ids = $related;
    }
    return $this->_related;
    The reply is currently minimized Show
  • Accepted Answer

    Friday, October 30 2015, 01:49 PM - #Permalink
    0
    sorry I misspelled the file you need to edit, it's:

    /components/com_muscol/models/artists.php

    (notice it's ARTISTS, with an S at the end, not ARTIST)

    that's the one, in line 118.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, October 30 2015, 06:46 PM - #Permalink
    0
    Ok i found it and changed it to 'ORDER BY al.year DESC' this has done what was required, but is this the correct way?
    Many thanks
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 14 2015, 03:48 PM - #Permalink
    0
    mark handley, which plugin you are using to view youtube videos in articles?
    • mark handley
      more than a month ago
      Hi, I use the Joomlathat module to view my whole channel and JCE editor media plugin for videos in articles.
    The reply is currently minimized Show
Your Reply