Fix problems with threads and messages not showing up.

Now to fix the dates. Oh boy.
This commit is contained in:
Robert Miles 2018-07-07 03:00:53 -04:00
parent 27c7594f9d
commit 2d1236bb74
2 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,8 @@
$threads = $bbj->thread_index();
foreach($threads["data"] as $thread) {
$username = $threads["usermap"][$thread["author"]]["user_name"];
$time = new DateTime("@{$thread['created']}");
$time = round($thread['created']);
$time = new DateTime("@{$time}");
$time = date_format($time, "c");
$tt = $thread["title"];
$plural = $thread['reply_count']==1 ? "y" : "ies";

View File

@ -1,7 +1,8 @@
<?php
foreach($thread["data"]["messages"] as $message) {
$username = $thread["usermap"][$message["author"]]["user_name"];
$time = new DateTime("@{$message['created']}");
$time = round($message['created']);
$time = new DateTime("@{$time}");
$time = date_format($time, "c");
echo "\t\t<div class='well' id='post{$message["post_id"]}'>".PHP_EOL;
echo "\t\t\t<p>&gt;{$message['post_id']} {$username} @ {$time}</p>".PHP_EOL;