By Chris on Friday, 16 June 2017
Posted in Technical Issues
Replies 1
Likes 0
Views 527
Votes 0
I was wondering if there is a way I can convert EasyBlog modules, perhaps even the components timestamp to timelapse as it was referred to in response to another one of my posts.

Basically, I would like my Blog posts to show up as

Published 5 Hours ago

instead of

June 15, 2017

I was hoping there would have been a way to tap into EasyDiscuss and how timestamps are able to be converted as shown in this post https://stackideas.com/forums/time-ago-format-show-post-time-as-5-minutes-hours-days-ago

I was hoping to be able to either convert the code from ED to EB that would look something like this


<?php echo JText::sprintf('COM_EASYBLOG_LAST_ACTIVITY_TIMELAPSE', EB::date()->toLapsed($post->modified)); ?>


That, or if there's a way to include a file from EasyDiscuss (similar to retrieving ES user info and displaying on third-party components) that would allow some type of manipulation of the EasyBlog timestamp code.

Hopefully this makes sense.

Simple and on point though, I'm just hoping to be able to display EasyBlog timestamps in this format 5 Hours Ago rather than the actual date June 15, 2017.

Thanks for your time and support.

Regards,
Chris
Hi Chris,
Perhaps you can try this php code to get the time lapsed for creation date:

EB::date()->getLapsedTime($post->created);
·
Friday, 16 June 2017 13:13
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post