How i can do this on mybb 18?
https://community.mybb.com/thread-42850.html
This post is old and i don't find code exemple:
$lastpost_date = my_date($mybb->settings['dateformat'], $lastpost_data['lastpost']);
$lastpost_time = my_date($mybb->settings['timeformat'], $lastpost_data['lastpost']);
I hope someone can help me.
Thanks
$variable = my_date('relative', $another_variable);
?
(2016-09-20, 09:31 PM)Sazze Wrote: [ -> ]$variable = my_date('relative', $another_variable);
?
What i can do with this code?
(2016-09-21, 08:04 AM)shihrem Wrote: [ -> ] (2016-09-20, 09:31 PM)Sazze Wrote: [ -> ]$variable = my_date('relative', $another_variable);
?
What i can do with this code?
Any code that uses the relative format in the my_date function will display as x time ago within a specific timeframe.
You can find the function within inc/functions.php on line 332 or
here
So i need to change code from line 332 to this code?
I don't understand very well is my first time when i use mybb i'm a noob.
Thanks for replyes.
As I said above, but here:
$lastpost_date = my_date('relative', $lastpost_data['lastpost']);
$lastpost_time = my_date('relative', $lastpost_data['lastpost']);
But I'm pretty sure MyBB already does this...
(2016-09-21, 08:27 PM)Sazze Wrote: [ -> ]As I said above, but here:
$lastpost_date = my_date('relative', $lastpost_data['lastpost']);
$lastpost_time = my_date('relative', $lastpost_data['lastpost']);
But I'm pretty sure MyBB already does this...
Yes but i want to change time, my database is old and i want to change time from yar 2011 to 2016
last post 01.10.2011 to 01.10.2016 or somethng like this..
Hope now understand my request...
(2016-09-21, 09:48 PM)shihrem Wrote: [ -> ] (2016-09-21, 08:27 PM)Sazze Wrote: [ -> ]As I said above, but here:
$lastpost_date = my_date('relative', $lastpost_data['lastpost']);
$lastpost_time = my_date('relative', $lastpost_data['lastpost']);
But I'm pretty sure MyBB already does this...
Yes but i want to change time, my database is old and i want to change time from yar 2011 to 2016
last post 01.10.2011 to 01.10.2016 or somethng like this..
Hope now understand my request...
You want to update all posts/threads timestamp to a more current date?
(2016-09-22, 10:11 AM)Paradigm Wrote: [ -> ] (2016-09-21, 09:48 PM)shihrem Wrote: [ -> ] (2016-09-21, 08:27 PM)Sazze Wrote: [ -> ]As I said above, but here:
$lastpost_date = my_date('relative', $lastpost_data['lastpost']);
$lastpost_time = my_date('relative', $lastpost_data['lastpost']);
But I'm pretty sure MyBB already does this...
Yes but i want to change time, my database is old and i want to change time from yar 2011 to 2016
last post 01.10.2011 to 01.10.2016 or somethng like this..
Hope now understand my request...
You want to update all posts/threads timestamp to a more current date?
Yes this is what i want to do.