2019-09-20, 03:16 AM
Hello!
I am trying to display thread creation date and time next to author's name in the thread list. I followed another question/answer thread from a few years ago and it almost works...it's show the author's name and time of creation, but not the date.
This is the edited code in forumdisplay.php:
{
eval("\$threads .= \"".$templates->get("forumdisplay_sticky_sep")."\";");
$shownormalsep = true;
$donestickysep = true;
}
else if($thread['sticky'] == 0 && !empty($shownormalsep))
$threaddate = my_date($mybb->settings['dateformat'], $thread['dateline']);
$threadtime = my_date($mybb->settings['timeformat'], $thread['dateline']);
{
eval("\$threads .= \"".$templates->get("forumdisplay_threads_sep")."\";");
$shownormalsep = false;
}
And the edited code in forumdisplay_thread template:
<div><if $thread['privatethread'] then><img src="/images/incognito3.png" /></if><if $thread['closed'] then><img src="/images/lockfinale.png" /></if>
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<span class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}"><a href="{$thread['threadlink']}">{$thread['subject']}</a></span>{$thread['multipage']}</span>
<div class="smalltext"> Created on: {$threaddate} at {$threadtime} by <em>{$thread['profilelink']}</em> </div>
</div>
Any suggestion on what to look at to make the date display also?
Thank you!
I am trying to display thread creation date and time next to author's name in the thread list. I followed another question/answer thread from a few years ago and it almost works...it's show the author's name and time of creation, but not the date.
This is the edited code in forumdisplay.php:
{
eval("\$threads .= \"".$templates->get("forumdisplay_sticky_sep")."\";");
$shownormalsep = true;
$donestickysep = true;
}
else if($thread['sticky'] == 0 && !empty($shownormalsep))
$threaddate = my_date($mybb->settings['dateformat'], $thread['dateline']);
$threadtime = my_date($mybb->settings['timeformat'], $thread['dateline']);
{
eval("\$threads .= \"".$templates->get("forumdisplay_threads_sep")."\";");
$shownormalsep = false;
}
And the edited code in forumdisplay_thread template:
<div><if $thread['privatethread'] then><img src="/images/incognito3.png" /></if><if $thread['closed'] then><img src="/images/lockfinale.png" /></if>
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<span class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}"><a href="{$thread['threadlink']}">{$thread['subject']}</a></span>{$thread['multipage']}</span>
<div class="smalltext"> Created on: {$threaddate} at {$threadtime} by <em>{$thread['profilelink']}</em> </div>
</div>
Any suggestion on what to look at to make the date display also?
Thank you!