By Li Song on Thursday, 24 January 2019
Posted in General
Likes 0
Views 687
Votes 0
Hi team,

When there is a comment posted a few months ago, it will show 'more than a month ago' or 'two months ago' ....

I would like them to show the exact date, like 24 Jannary 2019 ...
Is that possible?

Thanks,
Song
Hey there,

Unfortunately, It is impossible to do that at this point of time currently.
·
Thursday, 24 January 2019 18:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Irwin,

Is there a way that I can manage the code to change it?

Thanks,
Song
·
Friday, 25 January 2019 10:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

You can add the following PHP code into JoomlaFolder/administrator/components/com_easydiscuss/includes/post/post.php:

public function getDate()
{
$date = $this->post->created;

return $date;
}


You need to replace the getDuration() which is at JoomlaFolder/components/com_easydiscuss/themes/wireframe/post/default.reply.item.php with getDate().

Can you have a try and see how it goes?
·
Friday, 25 January 2019 16:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Irwin,

What about Komento, is it the same way?

Thanks,
Song
·
Saturday, 26 January 2019 13:25
·
0 Likes
·
0 Votes
·
0 Comments
·
In Komento, you can configure it in the settings as you can see here, http://take.ms/XpFwg
·
Saturday, 26 January 2019 13:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

Can you try to apply attached code at this path template/yourcurrenttemplate/html/com_komento/comments/item.php and see how it goes. This file wont get overwritten on your next update as those path suggested are using template override path.
·
Saturday, 26 January 2019 13:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

what about the comment part in ED?


Thanks,
Song
·
Tuesday, 29 January 2019 12:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

You can look for the following PHP code which is at function formatComments($comments) from JoomlaFolder/administrator/components/com_easydiscuss/includes/easydiscuss.php:

ED::date()->toLapsed($comment->modified);

replace it with the following PHP code:

$comment->modified;


Can you have a try and see how it goes?
·
Tuesday, 29 January 2019 12:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

can they be displayed like attached pic?

Thanks,
Song
·
Tuesday, 29 January 2019 14:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

If that's the case, you need to replace the following PHP code which I mentioned from what function and from what file earlier:

$comment->duration = $comment->modified;


replace with the following PHP code:

$date = ED::date($comment->modified);
$dateFormat = $date->getDateFormat(JText::_('DATE_FORMAT_LC1'));
$comment->duration = JHtml::date($comment->modified, $dateFormat);


Can you have a try and see how it goes?
·
Tuesday, 29 January 2019 16:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you, Irwin. It works.
·
Tuesday, 12 February 2019 16:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome.

Just for your information, I have locked and marked this thread as resolved to avoid confusions in the future. Please start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiries.

Thanks for understanding.
·
Tuesday, 12 February 2019 17:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating, glad that your issue is resolved now.
·
Tuesday, 12 February 2019 17:02
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post