This repository has been archived on 2018-09-07. You can view files and clone it, but cannot push or open issues or pull requests.
bbj.php/main.php

18 lines
644 B
PHP

<?php
$threads = $bbj->thread_index();
foreach($threads["data"] as $thread) {
$username = $threads["usermap"][$thread["author"]]["user_name"];
$time = round($thread['created']);
$time = new DateTime("@{$time}");
$time = date_format($time, "c");
$tt = $thread["title"];
$plural = $thread['reply_count']==1 ? "y" : "ies";
$tid = $thread["thread_id"];
echo "\t\t<div class='well'>".PHP_EOL;
echo "\t\t\t<p><a href='index.php?thread_id={$tid}'>{$tt}</a> by {$username} @ {$time}</p>".PHP_EOL;
echo "\t\t\t<p>{$thread['reply_count']} repl{$plural}, last post by {$last_author}";
echo "\t\t</div>".PHP_EOL;
}
?>
<p>RIP</p>