By Chris on Thursday, 15 June 2017
Posted in Technical Issues
Likes 0
Views 843
Votes 0
The similar topics module for EasyDiscuss displays the post time in Time Ago Format, so 5 Minutes Ago or 5 Days Ago.

I've been noticing variations in time formats between the forum component, some areas show a Time Ago Format while other areas display an actual Timestamp with full date (Day, Month and Year) which I believe is customizable in the back-end. I personally feel that it would be nice to maintain a single format throughout rather than having both Timestamp and Time Ago formats.

I've looked into this and from what I've discovered, there are no settings in the back-end to set how the time is displayed, Timestamp vs Time Ago Format.

I was hoping to acquire the code in the similar topics module that displays the Time Ago Format and implement it in other parts of EasyDiscuss, however, it seems like the formats are specific to each module and part of the component as the code either returns an error or shows up blank. I looked at the helper.php file in the module and I believe that contributes to how the time is displayed, but I'm not 100% sure on this.

Getting to the point, is there a patch available that will allow me display post time in Time Ago Format? Or, preferably, is this something easy enough to consider for an upcoming release? Kunena operates on a "Time Ago Format" and if I remember correctly, I believe this was an optional format, a setting in the back-end.

I really hope that this becomes an option in the back-end, not just for EasyDiscuss but perhaps EasyBlog as well as it is a nicer format and people can connect a little easier and faster to seeing "posted 5 days ago" rather than processing the time between the current date and posted date.

Hope this all makes sense.

Thanks for your time
Hi Chris,
You are right. There is no setting in the backend to change between timestamp and timelapse. However, you can still display it by modifying the necessary files. Generally, the code you can use a php code like the following example to display the last modified time lapsed date:

echo JText::sprintf('COM_EASYDISCUSS_LAST_ACTIVITY_TIMELAPSE', ED::date()->toLapsed($post->modified));

Or, preferably, is this something easy enough to consider for an upcoming release?
We do not have any plans for this. But you are free to start a feature request for this in EasyDiscuss's feature request category on the forums to expose other users to the idea. If this is widely demanded by many users, we will definitely consider it.
·
Thursday, 15 June 2017 16:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you very much Raymond, I was able to get the timelapse working with the code you provided.

I did encounter an issue with one of the modules though which I have addressed in a new and separate topic found here >>> https://stackideas.com/forums/timelapse-issue-latest-replies-module-shows-the-same-time-as-topic-created-module

Thanks again
·
Friday, 16 June 2017 01:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Chris,
You're most welcome. Glad to know the code works for you.
Thanks for starting a new thread for the other issue.
We will assist you in the other thread.
Regards.
·
Friday, 16 June 2017 10:26
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post