MyBB-Plugins Forums

Full Version: How to? Post date change
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

When posting it will give a date.
Example when somebody posted a week ago it will appear as '8-06-2014'.

Is there a way I can turn this date into 'A week ago' ?
I'm not a PHP Developer so I'm wondering how hard this is to make.

Been browsing through the docs and came across this.
http://php.net/manual/en/function.strtotime.php
Is that related?

Anyhow, if somebody could tell me how to do this it would be appreciated.
Would also not mind paying a small fee for it.

Thanks!
(06-15-2014, 07:29 PM)Pirata Nervo Wrote: [ -> ]You will need to use relative time. MyBB 1.8 comes with it.
http://www.php.net//manual/en/datetime.f...lative.php
http://stackoverflow.com/questions/26905...timestamps
http://gilbert.pellegrom.me/php-relative-time-function/

Thank you for your quick reply.
I'll wait it out then, thanks! Big Grin
No problem Smile
(06-15-2014, 09:03 PM)Pirata Nervo Wrote: [ -> ]No problem Smile

and if i would to come back to a previous way, linke instead "6 hours ago" i would have "9.55.00"

is it still possibile with 1.8?
Yes, you need to set the my_date parameter related to date format to the format you want.
(01-08-2015, 01:10 AM)Pirata Nervo Wrote: [ -> ]Yes, you need to set the my_date parameter related to date format to the format you want.

and where i found this parameter and how i change it?

(right now i've installed a plugin who solve the problem.  http://doylecc.altervista.org/en/time.html ) but if i may not use a plugin is even better. Big Grin

thank you again for your help
Oh I'm sorry but this is not for support related to MyBB features but actually coding help. If you want support for general stuff, you need to subscribe.
(01-08-2015, 03:01 AM)Pirata Nervo Wrote: [ -> ]Oh I'm sorry but this is not for support related to MyBB features but actually coding help. If you want support for general stuff, you need to subscribe.

Thank for the previous help and for this information.