Relative Time 1.1 is now available for
Premium Gecko ID holders only. This is a beta test that is available exclusively for them, but will be released as a free feature at a later date once testing is complete.
Version 1.1 is a big upgrade from the previous version. Not only are there 112 less lines of code in the plugin for the newer version, the way it works has fundamentally changed. Timings are not converted on the server any more, but instead are converted by the browser with javascript - meaning less load and overhead for your forum as all the work happens on the user's local computer. 1.1 also converts more timings to their relative time equivalents - forum subscriptions, thread subscriptions and other areas if the User CP are all converted too.
If these new areas weren't converted, 1.1 would also contain 9 less plugin hooks. However, it still has 4 less plugin hooks than 1.0 does - further decreasing the load effects of the feature. The new version also automatically updates the relative time as the time goes by. For example, if a post was made 3 minutes ago, it will update to 4 minutes ago, 5 minutes ago, 6 minutes ago etc. automatically inline without reloading the page.
So really, Relative Time 1.1 not only does more and updates inline, it reduces load from the server in less code and less hooks. Awesome.
Although I've wanted to do inline relative time for a while, a
thread by Kier (from Xenforo) highlighted caching issues with search engines that I didn't think of. With this in mind, only users with javascript enabled sees relative time - users that don't have javascript enabled, and search engines, will see MyBB's default timings.
Upgrading
First,
remove Relative Time by going to the MyNetwork Overview, selecting Core, then select Remove/Disable from the feature's Options menu. You can remove the files too, however they'll be overwritten in the next step.
Once removed,
download the new version and upload to the root folder of your forum (or keeping the folder's structure intact). Then head back to the MyNetwork Overview and install the feature.
There is no 'upgrade path' to this feature. The changes occur automatically.
Using Relative Time outside MyNetwork
Relative Time can be used anywhere outside of MyNetwork - but a post on this will be made at a later time once testing has been completed. If you're using other plugins which alter pages with the javascript already pre-loaded, for example, showthread.php and xThread's firstpost feature, just through a span tag around the time and date with the raw thread dateline as a class and it should be converted. For example:
Code:
{$post['postdate']}, {$post['posttime']}
... in the postbit template can be changed to the following for relative time:
Code:
<span class="rt_inline {$post['dateline']}">{$post['postdate']}, {$post['posttime']}</span>
{$post['dateline']} is the raw Unix timestamp that is used to start the clock for the relative time, and is required in the class field. It's not particularly perfect, but as Kier put it perfectly, you never grow tired watching the times update.
Changes
Version 1.1 introduces a new "Cap Relative Time" setting that allows you to control how far the relative time goes. You can check this out by heading to the
Relative Time Support area, but essentially it helps control whether hours, days, weeks or months appear. You can alter this setting in the Date & Time settings.
Although this release has passed internal testing, and is active here on Xekko, please treat this as a beta version. If you come across any issues, please post them here to let us know, and we'll get to them as fast as we can. If you're don't already have a Premium Gecko ID -
remember to upgrade (it buys me a beer!

).