miniBB Support Forums | 15 years on The Web
miniBB ®

miniBB

®
 
 | Forums | Register | Reply | Search | Statistics | Manual |
News & Announcements miniBB Support Forums / News & Announcements /   
 

Time Ago add-on released

 
Author Paul
Lead Developer
#1 | Posted: 18 Feb 2017 00:13 | Edited by: Paul 
The Time Ago add-on will force to display all dates in so called "Time Ago" format, which is widely used by social networks and blog software. Instead of the regular straight formatted timestamp, forum dates will be displayed as for example, "3 minutes ago", "5 hours ago", "1 day ago" or "2 days ago". If this format is exhausted for certain records (for example, made years or months ago), then the generic default forum's format will be switched back.

There are additional calculations involved in this process, and after installing the add-on you may need to watch your forums, making sure there is not significant loss in speed.

Download now and install at your convenience! :)
Available also in miniBB Compiler.

On miniBB demo, it's possible to check this add-on in live action.

Author Paul
Lead Developer
#2 | Posted: 21 Feb 2017 21:18 | Edited by: Paul 
It wasn't intentional :) but a curious fact is, this add-on came prior to the Anniversary of miniBB... the first miniBB version has been released TIME AGO, i.e. 15 years passed since 2002... yay :)

Author tom322
Active Member
#3 | Posted: 21 Feb 2017 21:44 
I wonder how much more % it takes for this addon to load a page (vs. without this addon). It seems like a useful feature for users, so the only concern is a possible speed loss. Maybe it would be even faster if it was done directly as a function (replacing the current default one) rather than an addon. I may test it even though I don't know how to test the loading time comparison ;). Congratulations on the first 1.5 decade, at least 2 more lapses to go ;).

Author Paul
Lead Developer
#4 | Posted: 21 Feb 2017 21:58 
tom322:
I wonder how much more % it takes for this addon to load a page

Possibly you would need some benchmarking for this, I actually didn't make tests.

But it's purely just about more maths. Considering the current date conversion function already implements some re-calculations and maths for any date, I would expect the calculations increase is very small, specially for powerful processors.

tom322:
Maybe it would be even faster if it was done directly as a function

It's already done as a function.

tom322:
replacing the current default one

You could not replace the default one. "Time-ago" function will stop at some range, for some older dates. It only substitutes seconds/minutes/hours and a couple of days for the most recent dates. Older dates are displayed in default format.

tom322:
Congratulations on the first 1.5 decade, at least 2 more lapses to go ;).

Thanks, I didn't even notice how these years passed actually...

Author tom322
Active Member
#5 | Posted: 21 Feb 2017 23:00 
I tried to check in on a small forum, but there is confusion on my part. When I pasted the code from bb_plugins it didn't change anything, ie. I did:

Open bb_plugins.code.txt file in a text editor.
Copy the code and paste it into your forum's bb_plugins.php (found in /forums).


I see there is no call/reference to this new convert_date_back function - maybe that's the reason; I guess this new convert_date_back function MUST be called from somewhere? Unless it should be named the same as the default function, ie. convert_date()..

Author tom322
Active Member
#6 | Posted: 21 Feb 2017 23:06 | Edited by: tom322 
UPDATE - I found the problem, I was missing this convert_date_back function in the bb_functions file, now it works... :)

News & Announcements miniBB Support Forums / News & Announcements /
 Time Ago add-on released
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
↑ TOP