Quote

We're also available for Custom Joomla Development

Hire us now
profound1 on Wednesday, April 27 2016, 11:22 PM

Sort by publish down date

Can either of your news extensions be sorted by publish down date?
       
  • Replied by admin on Thursday, April 28 2016, 05:30 AM · Hide· #1
    hi could you tell me what extension you're talking about?
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by profound1 on Thursday, April 28 2016, 02:21 PM · Hide· #2
    Sorry. I'm referring to Latest News Extended and Latest News +. I need to display the items by the publish down or publish expiration date.
  •  
  • Replied by admin on Friday, April 29 2016, 04:34 AM · Hide· #3
    Umm, So you are publishing articles with 'Finish Publishing' parameter are defined on every articles, and you want to display/filter them based on their finishing publishing date? Is it correct?
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by profound1 on Friday, April 29 2016, 12:41 PM · Hide· #4
    Yes, that is correct.
  •  
  •  
    Replied by admin on Friday, April 29 2016, 04:41 PM · Hide· #5
    Ok, open the file modules/mod_latestnewsxtd/helper.php

    arround lines 102 -109
    you will see this code :
    $order_map = array(
    			'm_dsc' => 'a.modified DESC, a.created',
    			'mc_dsc' => 'CASE WHEN (a.modified = '.$db->quote($db->getNullDate()).') THEN a.created ELSE a.modified END',
    			'c_dsc' => 'a.created',
    			'p_dsc' => 'a.publish_up',
    		);
    		$ordering = JArrayHelper::getValue($order_map, $params->get('ordering'), 'a.publish_up');
    		


    change them to

    $order_map = array(
    			'm_dsc' => 'a.modified DESC, a.created',
    			'mc_dsc' => 'CASE WHEN (a.modified = '.$db->quote($db->getNullDate()).') THEN a.created ELSE a.modified END',
    			'c_dsc' => 'a.created',
    			'p_dsc' => 'a.publish_down',
    		);
    		$ordering = JArrayHelper::getValue($order_map, $params->get('ordering'), 'a.publish_down');
    		


    then from the module backend choose the 'Order By' setting to Recently Published First
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
Your Response
Please login first in order for you to submit comments