By Chris on Friday, 16 June 2017
Posted in Technical Issues
Likes 0
Views 443
Votes 0
Quick thanks to Raymond for addressing an item in my previous post regarding timelapse

After implementing the code provided to display a Timelapse (5 hours ago) instead of a Timestamp (June 15, 2017) I ran into a bit of an issue with one of the modules not displaying the correct post time.

With hopes of painting a clear picture of the problem, I have attached a screenshot with Figures A-C along with some notes.

Basically, the time shown for Latest Replies doesn't display its own time, instead, it appears to be showing the time the topic was started. So, if a topic was published 3 days ago and I replied to it 5 minutes ago today, the timelapse would show my my response in the latest response module as 3 days ago instead of 5 minutes ago. I hope this makes sense.

The original timestamp code in mod_easydiscuss_recentreplies is


<?php echo JText::sprintf('MOD_EASYDISCUSS_RECENT_REPLIES_POSTED_ON', ED::date($post->created)->format(ED::config()->get

('layout_dateformat'))); ?>


The timelapse code I was provided was:


<?php echo ED::date()->toLapsed($post->modified); ?>


Hopefully this info is enough and is helpful in a solution.

Thank you very much for your time and for your amazing support so far, you guys have an amazing team and an amazing product I will definitely continue supporting.

Kind Regards,
Chris
After playing around a bit more, I think I solved my own problem.

The solution I came up with was taking the code I received before


<?php echo ED::date()->toLapsed($post->modified); ?>


and changed it to


<?php echo ED::date()->toLapsed($post->replied); ?>


Seems to be displaying correctly.

Before, I was using reply and replies in the code which they both didn't work, guess I should have tried replied which seems to have been the solution.
·
Friday, 16 June 2017 01:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Chris,
Yes you are right. Using 'replied' will get the last replied time of the discussion post. It looks like there is a bug here because by right the date displayed should be the reply date. I will log this issue in our tracker so it can be addressed.
Glad to know that you managed to solve your issue.
Regards.
·
Friday, 16 June 2017 13:31
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post