Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • isabelgica Friend
    #813055

    Hi,

    I would like to change the date format, so it says dd-mm-YY – instead of so many months/weeks/days ago .. where can I do that?

    thx in advance!
    rgds,
    isabel

    Saguaros Moderator
    #814009

    Hi isabel,

    May I know the date in which part you’re referring to? some screenshots maybe helpful here.

    isabelgica Friend
    #814368

    Hi Saguaros,

    sure,.. attached (dates in yellow)… I would like to change those dates to dd-mm-YY..

    thx in advance,
    regards,
    Isabel


    1. date-format
    Saguaros Moderator
    #816507

    Hi Isabel,

    Due to the concept of this template, we provide customisation for the DATE display like that. If you want to use default display for date, you can try with this tweak:

    • Go to file: /root/templates/ja_magz/html/mod_articles_latest/focus.php

    • Look for snippet of code that render created date:

      <?php if ($params->get('show_create_date')) : ?>
      <dd class="create">
          <span><?php echo MagzHelper::relTime($item->created); ?></span>
      </dd>
      <?php endif; ?>
    • Then replace this line of code:
      <span><?php echo MagzHelper::relTime($item->created); ?></span>

    by:

    <span><?php echo JLayoutHelper::render('joomla.content.info_block.create_date', $displayData); ?></span>

    Hope this helps.

    isabelgica Friend
    #816612

    hi Saguaros,

    I tried this, but no change to see at the frontend.. (see attached) dit I do something wrong?

    rgds, Isabel

    p.s. I also want to change the date format for the entire site (publish date, create date) – not only for the latest articles…


    1. dates-code
    2. dates-frontend
    Saguaros Moderator
    #817951

    You can send me URL, admin and FTP account of your site via your reply and SET IT AS PRIVATE reply (so that only Moderators and Staff can see)

    isabelgica Friend
    #818381
    This reply has been marked as private.
    Saguaros Moderator
    #825325

    Hi Isabel,

    I don’t see the change I suggested above on your site, did you even add it?

    And if you want to show the publish date instead of created date, you can change above line of code to:

    <span><?php echo JLayoutHelper::render('joomla.content.info_block.publish_date', $displayData); ?></span>

    I just applied for the Articles Latest module via file: /root/templates/ja_magz/html/mod_articles_latest/focus.php

    You can apply the same for other modules displaying on the homepage.

    isabelgica Friend
    #848892
    This reply has been marked as private.
    Saguaros Moderator
    #851197

    Hi

    As I mentioned above, in Articles Latest module, you’re setting to show Published Date, not Created Date so you will need to find the line of code for publish date and replace with:

    <span><?php echo JLayoutHelper::render('joomla.content.info_block.publish_date', $displayData); ?></span>

    I changed in ‘focus.php’ file on your site and you can see it’s showing now.

    For other parts on your site, they are different modules but you can apply the same change as this Articles Latest module: just find the line of code for date and replace as above

    I hope this makes senses.

    isabelgica Friend
    #852741
    This reply has been marked as private.
    Saguaros Moderator
    #863716

    I changed that part for you in previous post, did you change it again?

    Btw, I can’t log into backend of your site now.

    isabelgica Friend
    #864137
    This reply has been marked as private.
    guap Friend
    #867543
    This reply has been marked as private.
    Saguaros Moderator
    #868412

    @guap,

    Which file did you change?

    In this JA Magz template, it uses several content type so check this directory: ROOT/templates/ja_magz/html/com_content/article/ and edit associated PHP file of content type for article you want to change.

Viewing 15 posts - 1 through 15 (of 24 total)

This topic contains 23 replies, has 4 voices, and was last updated by  Gruponea.com 7 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum