I need to correct the date format.

Feel free to talk about everything related to our Joomla Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sun Jan 20, 2013 7:26 pm
Intead of:
Image

I need "Sábado 6 de Agosto del 2011 a las 13:17"

How can I edit that.

Thanks
User avatar
Senior Boarder

Konrad M
Tue Jan 22, 2013 5:01 pm
Hi,
where you want to change it. In joomla article or k2 ? Or both ?
User avatar

GK User
Tue Jan 22, 2013 6:25 pm
Konrad M wrote:Hi,
where you want to change it. In joomla article or k2 ? Or both ?


Both. Also, in modules, etc.
User avatar
Senior Boarder

Konrad M
Thu Jan 24, 2013 9:46 am
To change it in joomla article , you have to edit html/com_content/article/default.php . Here you have 3 type of date, creation, publish and modification. This is sample for published date. Find this:
Code: Select all
<?php echo  JHTML::_('date',$this->item->publish_up, JText::_('DATE_FORMAT_LC2')); ?>

and change to this:
Code: Select all
JHTML::_('date',$this->item->publish_up, JText::_('l,w F Y')).' a las '.JHTML::_('date',$this->item->publish_up, JText::_('H:i'));

To change this in category view you need to edit html/com_content/category/blog_item.php
Files for k2 you will find in html/com_k2/templates/default/ Here you need to edit category_item.php, latest_item.php, item.php and if you would like to change it in tag view or user view you need edit tag.php nad user.php too.
User avatar

GK User
Thu Jan 24, 2013 5:22 pm
Konrad M wrote:To change it in joomla article , you have to edit html/com_content/article/default.php . Here you have 3 type of date, creation, publish and modification. This is sample for published date. Find this:
Code: Select all
<?php echo  JHTML::_('date',$this->item->publish_up, JText::_('DATE_FORMAT_LC2')); ?>

and change to this:
Code: Select all
JHTML::_('date',$this->item->publish_up, JText::_('l,w F Y')).' a las '.JHTML::_('date',$this->item->publish_up, JText::_('H:i'));

To change this in category view you need to edit html/com_content/category/blog_item.php
Files for k2 you will find in html/com_k2/templates/default/ Here you need to edit category_item.php, latest_item.php, item.php and if you would like to change it in tag view or user view you need edit tag.php nad user.php too.


I didn't understand how to do the same in K2...
User avatar
Senior Boarder

Konrad M
Fri Jan 25, 2013 11:43 am
I n this files I mentioned you have to find same code, for example in item.php
Code: Select all
 <?php echo JHTML::_('date', $this->item->created , JText::_('DATE_FORMAT_LC2')); ?>

and change it to this one:
Code: Select all
JHTML::_('date',$this->item->created, JText::_('l w F Y')).' a las '.JHTML::_('date',$this->item->publish_up, JText::_('H:i'));
User avatar

GK User
Fri Jan 25, 2013 6:15 pm
Konrad M wrote:I n this files I mentioned you have to find same code, for example in item.php
Code: Select all
 <?php echo JHTML::_('date', $this->item->created , JText::_('DATE_FORMAT_LC2')); ?>

and change it to this one:
Code: Select all
JHTML::_('date',$this->item->created, JText::_('l w F Y')).' a las '.JHTML::_('date',$this->item->publish_up, JText::_('H:i'));


Same with the K2 files?
User avatar
Senior Boarder

GK User
Sat Jan 26, 2013 12:50 am
Konrad M wrote:I n this files I mentioned you have to find same code, for example in item.php
Code: Select all
 <?php echo JHTML::_('date', $this->item->created , JText::_('DATE_FORMAT_LC2')); ?>

and change it to this one:
Code: Select all
JHTML::_('date',$this->item->created, JText::_('l w F Y')).' a las '.JHTML::_('date',$this->item->publish_up, JText::_('H:i'));


Didn't work. It just deleted the displayed date on my articles.
Something wrong in the codes I guess...

Can you help me?
User avatar
Senior Boarder

Konrad M
Sat Jan 26, 2013 8:01 pm
Where it didn't work ? In k2 or joomla ?
User avatar

GK User
Sat Jan 26, 2013 11:05 pm
Konrad M wrote:Where it didn't work ? In k2 or joomla ?


Both. I didn't worked.
User avatar
Senior Boarder

Konrad M
Sun Jan 27, 2013 9:27 pm
Can you send me Private Message with ftp access ? Remember add lin kto this topic too.
User avatar

GK User
Sun Jan 27, 2013 9:49 pm
Konrad M wrote:Can you send me Private Message with ftp access ? Remember add lin kto this topic too.


Sent you PM. Don't know how to send you ftp access.
User avatar
Senior Boarder

Konrad M
Mon Jan 28, 2013 2:46 pm
I made one example for you. I changed it in templates/gk_twn2/html/com_content/article/default.php
Here you have result http://naciondelaguila.com.mx/index.php ... 55-chinese
User avatar

GK User
Mon Jan 28, 2013 4:58 pm
Konrad M wrote:I made one example for you. I changed it in templates/gk_twn2/html/com_content/article/default.php
Here you have result http://naciondelaguila.com.mx/index.php ... 55-chinese


Very beautiful! Thanks. Are this now the default date layout? How about K2 articles, tags and user view? Is the change already made to this sections? Can you confirm this?
User avatar
Senior Boarder

Konrad M
Mon Jan 28, 2013 6:32 pm
No, this is only in joomla article. This is extra customization and we don't support it. I gave you example and inf owhere you need to make changes. Rest you have to do by yourself.
User avatar

GK User
Tue Jan 29, 2013 1:19 am
Konrad M wrote:No, this is only in joomla article. This is extra customization and we don't support it. I gave you example and inf owhere you need to make changes. Rest you have to do by yourself.


Ok, thanks. Can you tell me which code did you use for this and do you know if it will work on K2?
User avatar
Senior Boarder

Konrad M
Tue Jan 29, 2013 9:44 am
It is same code I gave you in this topic.
User avatar

GK User
Tue Jan 29, 2013 5:25 pm
Konrad M wrote:It is same code I gave you in this topic.


Ok, I'll try it again. Thanks.
User avatar
Senior Boarder


cron