News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

jD 3.2.39 Content Plugin BUG2 Date Format

Started by ColinM, 16.10.2015 09:51:29

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ColinM

This post was  started by Nyx It had 2 fault reports so it has been split into two separate topcs
The original report is at
jD 3.2.39 Content Plugin BUG1 - {sum_jcomments} bad
Query 2.  How to specify long or short date format

Quotethe date of the jDownloads Content Plugin is in the wrong format?
It's only show the "long date" but i use in the JD config the short date.

May be here is a error?


in the /plugins/content/jdownloads/jdownloads.php LINE 65

Code:     global $date_format;
    $date_format = JDHelper::getDateFormat();   

or in line 1113 ?

Code: // date_added
if ($files->date_added != '0000-00-00 00:00:00') {
if ($files->params->get('show_date') == 0){
// use 'normal' date-time format field
$date_data = $jdpic_date.JHtml::_('date',$files->date_added, $date_format['long']);
} else {
// use 'short' date-time format field
$date_data = $jdpic_date.JHtml::_('date',$files->date_added, $date_format['short']);
}
} else {
$date_data = '';
}

wenn I change the

Code: 
       // date_added
        if ($files->date_added != '0000-00-00 00:00:00') {
            if ($files->params->get('show_date') == 0){
                // use 'normal' date-time format field
                $date_data = $jdpic_date.JHtml::_('date',$files->date_added, $date_format['long']);
            } else {
                // use 'short' date-time format field
                $date_data = $jdpic_date.JHtml::_('date',$files->date_added, $date_format['short']);
            }   
        } else {
             $date_data = '';
        }
to
Code:   
       // date_added
        if ($files->date_added != '0000-00-00 00:00:00') {
            if ($files->params->get('show_date') == 0){
                // use 'normal' date-time format field
                $date_data = $jdpic_date.JHtml::_('date',$files->date_added, $date_format['short']);
            } else {
                // use 'short' date-time format field
                $date_data = $jdpic_date.JHtml::_('date',$files->date_added, $date_format['short']);
            }   
        } else {
             $date_data = '';
        }

I have the short date show. So where the option to change from"normal" to "short" in the JD or Jomma config GUI? Or is the code wrong?
End of original query from Nyx

Hi Nyx
Hmm! not sure myself how to specify which format should be used when.  It may be a missing Config parameter.  One of the modules has a specific set up choice but I missed finding elsewhere.

Colin
PS will be splitting this topic into two separate streams.
C
Colin M
  •