By abc_def_123 on Saturday, 14 July 2012
Posted in General Issues
Replies 18
Likes 0
Views 1.6K
Votes 0
Hi!

I want to change the date format in the comments, but I can't find the piece of code, where to do it. I want to change it from the format Y-m-d to the format d. m. Y. I tried it in the file /components/com_komento/themes/kuro/comment/item/time.php - but a change in the format has no effect.

Look in the attached picture.
I have tried this (the second option) but the date doesn't change in my comment form. The tooltip says that it only works if something is turned off, but where do I find that option?
Thank you.
·
Wednesday, 08 January 2014 23:43
·
0 Likes
·
0 Votes
·
0 Comments
·
hey misspeebie,
the introduced date format in the backend is working quite nice actually but it's not used everywhere unfortunately. in the comment form that you want to change for example it has no effect. instead you need to edit the author.php file which is located at components/com_komento/themes/kuro/comment/form/

around line 22 you should see something like this:


<span class="kmt-author-time"><?php echo Komento::getDate()->toFormat('%A, %d. %B %Y') ?></span>


note that this is already a formatted file to show the german output but you can change it to any format you want by replacing the characters inside the brackets ('%A, %d. %B %Y')

hope that helps
·
Thursday, 09 January 2014 01:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Alex! That works!
·
Thursday, 09 January 2014 03:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok.... I try to make an override for this file but can't figger out what folder structure to use, any idear??

And what about the date and time under the comments? See attachment please.
·
Thursday, 09 January 2014 04:27
·
0 Likes
·
0 Votes
·
0 Comments
·
you're welcome.

for the date in your pic this can be controlled in the komento backend. go to integrations -> easyblog (or whatever system you integrate with) -> layout -> general and at the right side you can specify the date format.

for the override (very good you do it this way, unfortunately too many people don't care about that) this is how it should look for the author file:
yourtemplate/html/com_komento/comment/form/author.php

hope that helps
·
Thursday, 09 January 2014 06:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Thanks for sharing Alex!
·
Thursday, 09 January 2014 11:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks!! for the folder structure!

But the date and time don't change. I go to integrations > Joomla articles > Layout > General.

There I delete the time and put dots in the date... go to front, refresh and nothing happens....
·
Thursday, 09 January 2014 20:02
·
0 Likes
·
0 Votes
·
0 Comments
·
you're all welcome
·
Thursday, 09 January 2014 20:04
·
0 Likes
·
0 Votes
·
0 Comments
·
But the date and time don't change. I go to integrations > Joomla articles > Layout > General.

There I delete the time and put dots in the date... go to front, refresh and nothing happens....
·
Thursday, 09 January 2014 20:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Can you provide us your backend and FTP so we check this out for you? Please advise.
·
Friday, 10 January 2014 15:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you, details below.
·
Friday, 10 January 2014 17:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

I've tried to access your backend but I got this: http://screencast.com/t/ljnxxg4a6 .
·
Friday, 10 January 2014 17:37
·
0 Likes
·
0 Votes
·
0 Comments
·
I can't see what I've sent anymore :-( I'll give the credentials again.
·
Friday, 10 January 2014 17:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello

I've checked your backend and seems like you didn't turn off this option: http://screencast.com/t/8yj38VtZd . I've turned it off for you. Can you please check the date structure? Because I cannot access your frontend: http://screencast.com/t/mEZfoLiCu7 .
·
Friday, 10 January 2014 18:26
·
0 Likes
·
0 Votes
·
0 Comments
·
Just a follow up question. Can I remove the date instead of just changing its format? Thanks.
·
Saturday, 11 January 2014 06:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

You can remove the date by going to ..\components\com_komento\themes\yourtheme\comment\item.php and delete/comment this line: http://screencast.com/t/I6khnMC9AiV . Hope this helps.
·
Sunday, 12 January 2014 16:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you friend. That was exactly quee stava looking. It worked on the first try
·
Tuesday, 14 January 2014 00:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you friend. That was exactly what I was looking for. It worked on the first try
·
Tuesday, 14 January 2014 00:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Amanda,

You're welcome.
·
Tuesday, 14 January 2014 17:34
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post