Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

How to? Post date change
#1

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!
Reply
#2

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/
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#3

(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
Reply
#4

No problem Smile
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#5

(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?
Reply
#6

Yes, you need to set the my_date parameter related to date format to the format you want.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#7

(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
Reply
#8

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.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#9

(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.
Reply




Users browsing this thread: 1 Guest(s)