Article Blog layout date string

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Aug 19, 2015 6:29 pm
Reply with quote
Report this post
Dear Support!

Could you tell me how can I modify the date format in Category Blog layout?
https://demo.gavick.com/joomla25/instyl ... egory-blog
As you can see there the date is "december 5"
However if you inspect the element: <time datetime="2013-12-05T13:25:21+00:00">December 5</time>

I have tried to modify it with the constants: DATE_FORMAT_LC2/LC3/LC4
(in language manager - overrides)

Nothing happened. I'm just wondering if the template using an other date string? Am I wrong?

Thank you in advance,

Oliver
User avatar
Fresh Boarder

GK User
Wed Aug 19, 2015 8:00 pm
Reply with quote
Report this post
What exact format would you like to have?
User avatar
Moderator

GK User
Wed Aug 19, 2015 9:18 pm
Reply with quote
Report this post
It's a multi language site so I would like to use at least two format:
Day - Month - Year
Year - Month - Day
I know the second is weird because it's hungarian.. :)

Thank you in advance!
User avatar
Fresh Boarder

GK User
Fri Aug 21, 2015 7:35 am
Reply with quote
Report this post
Could you please verify if default Beeze/Protostar displays the date correctly?
User avatar
Moderator

GK User
Mon Aug 24, 2015 11:47 am
Reply with quote
Report this post
Yes both of them displays those dates correctly.
User avatar
Fresh Boarder

GK User
Fri Aug 28, 2015 6:31 am
Reply with quote
Report this post
Please edit file:
templates/gk_instyle/html/com_content/article/default.php
and find this block of code:
Code: Select all
                              <?php if ($params->get('show_modify_date')) : ?>
                              <li class="modified"><time datetime="<?php echo JHtml::_('date', $this->item->modified, JText::_(DATE_W3C)); ?>" itemprop="dateModified"><?php echo JHtml::_('date', $this->item->modified, JText::_('F j, Y')); ?></time>
                              </li>
                              <?php elseif ($params->get('show_create_date')) : ?>
                              <li class="created"><time datetime="<?php echo JHtml::_('date', $this->item->created, JText::_(DATE_W3C)); ?>"  itemprop="dateCreated"><?php echo JHtml::_('date', $this->item->created, JText::_('F j, Y')); ?></time>
                              </li>
                              <?php endif; ?>
                             
                              <?php if ($params->get('show_publish_date')) : ?>
                              <li><time datetime="<?php echo JHtml::_('date', $this->item->publish_up, JText::_(DATE_W3C)); ?>"  itemprop="datePublished"><?php echo JHtml::_('date', $this->item->publish_up, JText::_('F j, Y')); ?></time></li>
                              <?php endif; ?>

and replace each:
Code: Select all
JHtml::_('date', $this->item->created, JText::_(DATE_W3C));

with:
Code: Select all
JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')));

and write back if this helped.
User avatar
Moderator

GK User
Fri Aug 28, 2015 11:36 am
Reply with quote
Report this post
Thank you so much for your help! Appreciate that!
I will do that!
Have a nice day!
User avatar
Fresh Boarder

GK User
Wed Sep 02, 2015 2:10 pm
Reply with quote
Report this post
Is there anything else I can help you with regarding this topic?
User avatar
Moderator

GK User
Sat Oct 24, 2015 9:44 am
Reply with quote
Report this post
Ps. Next release of the template will already have correct fix done.
User avatar
Moderator


cron