MyBB Support

[Help] Date On Forumdisplay

Submitted by Kreon, , Thread ID: 47368

Thread Closed
Kreon
Novice
Level:
0
Reputation:
0
Posts:
48
Likes:
3
Credits:
9
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

Tutti Frutti
•̀_•́
Prime
Level:
6
Reputation:
50
Posts:
695
Likes:
97
Credits:
700
21-09-2017, 12:21 PM
#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

Kreon
Novice
Level:
0
Reputation:
0
Posts:
48
Likes:
3
Credits:
9
OP
21-09-2017, 12:36 PM
#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

Kreon
Novice
Level:
0
Reputation:
0
Posts:
48
Likes:
3
Credits:
9
OP
21-09-2017, 12:51 PM
#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: 1 Guest(s)