miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
News miniBB Support Forums / News /  
 

Time Ago add-on released

 
Author Paul
Lead Developer 
#1 | Posted: 18 Feb 2017 00:13 
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 
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 
UPDATE - I found the problem, I was missing this convert_date_back function in the bb_functions file, now it works... :)

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

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

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


  ⇑