MyBB Support

[Help] Date On Forumdisplay

Submitted by Kreon, , Thread ID: 47368

Thread Closed
19-09-2017, 06:16 AM
#1
I want to date like this on forumdisplay, how to make this?

[Image: zeEmDu9-SbexXSD3FBQk8w.png]

RE: [Help] Date On Forumdisplay

#2
19-09-2017, 06:16 AM
Kreon Wrote:
I want to date like this on forumdisplay, how to make this?

[Image: zeEmDu9-SbexXSD3FBQk8w.png]

Open your forumdisplay.php
search for
Code:
eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";");

add above
Code:
$threaddate = my_date($mybb->settings['dateformat'], $thread['dateline']);
        $threadtime = my_date($mybb->settings['timeformat'], $thread['dateline']);

Go into your Template "forumdisplay_thread", search for
Code:
{$thread['profilelink']}

then it's up to you how you add these codes..
Code:
{$threaddate} {$threadtime}

RE: [Help] Date On Forumdisplay

OP
#3
21-09-2017, 12:21 PM
TuttiFrutti Wrote:
Open your forumdisplay.php
search for
Code:
eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";");

add above
Code:
$threaddate = my_date($mybb->settings['dateformat'], $thread['dateline']);
    $threadtime = my_date($mybb->settings['timeformat'], $thread['dateline']);

Go into your Template "forumdisplay_thread", search for
Code:
{$thread['profilelink']}

then it's up to you how you add these codes..
Code:
{$threaddate} {$threadtime}

if as you say i can do it, i want format 1 year, 1 mont, yesterday, and today. like the one in screenshoot, apologize in advance because my question is less detail.

RE: [Help] Date On Forumdisplay

#4
Try maybe this..
http://php.net/manual/en/function.date.php

I suck at PHP so sorry.

RE: [Help] Date On Forumdisplay

OP
#5
21-09-2017, 12:38 PM
TuttiFrutti Wrote:
Try maybe this..
http://php.net/manual/en/function.date.php

I suck at PHP so sorry.

it's alright at least you give me a solution, thanks. i also can not php and just learning.

Users browsing this thread: 2 Guest(s)