From a1d485444840c98526c2b2cc1c33a805c38fd798 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Fri, 10 Mar 2017 11:34:46 +0900 Subject: [PATCH] Initial implementation of Thread stats for mods #33, Implemented using Twig without persistent storage, and display at end of thread. --- templates/post_thread.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/post_thread.html b/templates/post_thread.html index 125d5f78..4ad08862 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -87,9 +87,16 @@ {% if not index %} {% endif %} {% endfilter %} +{% set iparray = [post.ip] %} {% set hr = post.hr %} {% for post in post.posts %} + {% if post.ip not in iparray %} + {% set iparray = iparray|merge([post.ip]) %} + {% endif %} {% include 'post_reply.html' %} {% endfor %} +{% if mod and not index %} +

Unique IPs: {{ iparray|length }}

+{% endif %}
{% if hr %}
{% endif %}