Support Online: Mon - Fri / 08:00am - 05:00pm (GMT +7)
Your Time: Our Time:

lock How to change date format to get showed the year

More
9 years 9 months ago #3236 by Monika
Hi there, I want to have displayed the year in blog layout, standard in Delphinus is only day and month. Where can I change this?

Best regards,
Monika
The topic has been locked.
More
9 years 9 months ago #3256 by Tinh Nguyen
Hi,

You add the following code in 2 file: item.php, category_item.php

<span class="create-year"><?php echo JHTML::_('date', $this->item->created , JText::_('Y')); ?></span>

The path of 2 file.
{yoursite}\templates\jux_delphinus\html\com_k2\templates\delphinus\item.php
{yoursite}\templates\jux_delphinus\html\com_k2\templates\delphinus\category_item.php

Please check again and feed back for me.

****************
Best Regards,
T
Attachments:
The topic has been locked.
More
9 years 9 months ago #3263 by Monika
Thank you for quick awnser. :) the problem is, that I don´t use K2-Component but the Joomla blog. I think I have to add any code in blog_item.php and blog.php? There is following code:
<?php echo '<span class="day-cat">'.JHtml::_('date', $this->item->created, JText::_('TPL_JUX_DESIGNER_DAY_DATE_FORMAT_LC2')).'</span>'; ?>
<?php echo '<span class="month-cat">'.JHtml::_('date', $this->item->created, JText::_('TPL_JUX_DESIGNER_MONTH_DATE_FORMAT_LC2')).'</span>'; ?>

I guess I have to add another code here?

Best regards,
Monika
The topic has been locked.
More
9 years 9 months ago #3267 by Tinh Nguyen
Hi Monika,

You add the following code in 2 file: default.php, blog_item.php

<?php echo '<span class="create-year">'.JHtml::_('date', $this->item->created, JText::_('TPL_JUX_DESIGNER_YEAR_DATE_FORMAT_LC2')).'</span>'; ?>

The path of 2 file.
{yoursite}\templates\jux_delphinus\html\com_content\article\default.php
{yoursite}\templates\jux_delphinus\html\com_content\category\blog_item.php


And you need to add the following code in the en-GB.tpl_jux_delphinus.ini file.

TPL_JUX_DESIGNER_YEAR_DATE_FORMAT_LC2="Y"

The path of the en-GB.tpl_jux_delphinus.ini file.
{yoursite}\language\en-GB\en-GB.tpl_jux_delphinus.ini


Please check again and feed back for me.

****************
Best Regards,
T
Attachments:
The following user(s) said Thank You: Monika
The topic has been locked.
More
9 years 9 months ago #3273 by Monika
Thank you Tinh, it works now perfectly! :)
The topic has been locked.
More
9 years 9 months ago #3274 by Tinh Nguyen
Hi,

That’s great.
Thanks for getting back.

You can go back if you have other question.

***************
Best Regards,
T
The topic has been locked.
Moderators: Jackie
Time to create page: 0.068 seconds
Powered by Kunena Forum