test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • kristinnjon Friend
    #191821

    I am curious if there is a way to change when the article was created – either with the language like as “years, months, days” to another language – or in a date format like as September 9, 2011, etc. ?

    Thanks!

    Ninja Lead Moderator
    #510757

    We customize the way that date(create and publish) displays on article details page(com_content) . If you want to show in this format “September 9, 2011“, this way will help you to do that

    Open templates/ja_magz/html/com_content/article/default.php file

    from


    <?php if ($params->get('show_publish_date')) : ?>
    <dd class="published">
    <span><?php echo MagzHelper::relTime($this->item->publish_up); ?></span>
    </dd>
    <?php endif; ?>

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

    Change to

    <?php if ($params->get('show_publish_date')) : ?>
    <dd class="published">
    <span><?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC3'))); ?></span>
    </dd>
    <?php endif; ?>

    <?php if ($params->get('show_create_date')) : ?>
    <dd class="create">
    <span><?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC3'))); ?></span>
    </dd>
    <?php endif; ?>

    and you can see format date in language/en-GB/en-GB.ini file

    Line 228:

    DATE_FORMAT_LC3="d F Y"

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  Ninja Lead 11 years, 1 month ago.

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