diff --git a/boards.php b/boards.php index ce6ac945..f1d6656e 100644 --- a/boards.php +++ b/boards.php @@ -21,8 +21,10 @@ foreach ($boards as $i => $board) { $query = prepare(sprintf(" SELECT MAX(id) max, (SELECT COUNT(*) FROM ``posts_%s`` WHERE FROM_UNIXTIME(time) > DATE_SUB(NOW(), INTERVAL 1 DAY)) ppd, (SELECT COUNT(*) FROM ``posts_%s`` WHERE FROM_UNIXTIME(time) > DATE_SUB(NOW(), INTERVAL 1 HOUR)) pph, -(SELECT count(id) FROM ``posts_%s``) count FROM ``posts_%s`` -", $board['uri'], $board['uri'], $board['uri'], $board['uri'])); +(SELECT count(id) FROM ``posts_%s``) count, +(SELECT COUNT(DISTINCT ip) FROM ``posts_%s``) uniq_ip + FROM ``posts_%s`` +", $board['uri'], $board['uri'], $board['uri'], $board['uri'], $board['uri'])); $query->execute() or error(db_error($query)); $r = $query->fetch(PDO::FETCH_ASSOC); @@ -35,6 +37,7 @@ SELECT MAX(id) max, (SELECT COUNT(*) FROM ``posts_%s`` WHERE FROM_UNIXTIME(time) $boards[$i]['pph'] = $pph; $boards[$i]['ppd'] = $ppd; $boards[$i]['max'] = $r['max']; + $boards[$i]['uniq_ip'] = $r['uniq_ip']; } usort($boards, diff --git a/create.php b/create.php index 88f3952e..e4b28215 100644 --- a/create.php +++ b/create.php @@ -12,7 +12,7 @@ include "inc/lib/recaptcha/recaptchalib.php"; checkBan('*'); -$bannedWords = array('/^cake$/', '8ch', '/^cp$/', 'child', '/^inc$/', '/^static$/', '/^templates$/', '/^js$/', '/^stylesheets$/', '/^tools$/', '/^pedo$/'); +$bannedWords = array('/^cake$/', '8ch', '/^cp$/', 'child', '/^inc$/', '/^static$/', '/^templates$/', '/^js$/', '/^stylesheets$/', '/^tools$/', '/^pedo$/', '/^reports$/'); $ayah = (($config['ayah_enabled']) ? new AYAH() : false); diff --git a/templates/8chan/boards.html b/templates/8chan/boards.html index 3e7c402d..34d9bb7e 100644 --- a/templates/8chan/boards.html +++ b/templates/8chan/boards.html @@ -23,7 +23,16 @@ th.headerSortDown {
{% trans %}There are currently {{n_boards}} boards + {{hidden_boards_total}} unindexed boards = {{t_boards}} total boards. Site-wide, {{total_posts_hour}} posts have been made in the last hour, with {{total_posts}} being made on all active boards since October 23, 2013.{% endtrans %}
-L | {% trans %}Board{% endtrans %} | {% trans %}Board title{% endtrans %} | {% trans %}Posts in last hour{% endtrans %} | {% trans %}Total posts{% endtrans %} | {% trans %}Created{% endtrans %} |
---|
L | +{% trans %}Board{% endtrans %} | +{% trans %}Board title{% endtrans %} | +{% trans %}Posts in last hour{% endtrans %} | +{% trans %}Total posts{% endtrans %} | +{% trans %}Unique IPs{% endtrans %} | +{% trans %}Created{% endtrans %} | +
---|---|---|---|---|---|---|
{{ board.img|raw }} | @@ -31,6 +40,7 @@ th.headerSortDown {{{ board['title'] }} | {{board['pph']}} | {{board['max']}} | +{{board['uniq_ip']}} | {{board['time']}} ({{board['ago']}} ago) |