From 5da8f28726078e3dcc3bab427998f88d2e1fea56 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Mon, 9 Sep 2013 20:16:13 +1000 Subject: Improvements to ?/debug/antispam and ?/debug/recentc --- templates/mod/debug/antispam.html | 26 ++++++++++++++++----- templates/mod/debug/recent_posts.html | 43 +++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 8 deletions(-) (limited to 'templates/mod/debug') diff --git a/templates/mod/debug/antispam.html b/templates/mod/debug/antispam.html index 95aa61a6..9979a093 100644 --- a/templates/mod/debug/antispam.html +++ b/templates/mod/debug/antispam.html @@ -14,11 +14,14 @@ {{ config.board_abbreviation|sprintf(hash.board) }} - {% if hash.thread %} + {% if hash.thread > 0 %} {{ hash.thread }} + {% elseif hash.thread < 0 %} + Index (page {{ - hash.thread }}) {% else %} - - {% endif %} + {% endif %} + {{ hash.hash }} @@ -28,7 +31,11 @@ {% if hash.expires %} - {{ hash.expires|until }} + {% if hash.expires < time() %} + {{ hash.expires|ago }} ago + {% else %} + {{ hash.expires|until }} + {% endif %} {% else %} - @@ -55,11 +62,14 @@ {{ config.board_abbreviation|sprintf(hash.board) }} - {% if hash.thread %} + {% if hash.thread > 0 %} {{ hash.thread }} + {% elseif hash.thread < 0 %} + Index (page {{ - hash.thread }}) {% else %} - - {% endif %} + {% endif %} + {{ hash.hash }} @@ -69,7 +79,11 @@ {% if hash.expires %} - {{ hash.expires|until }} + {% if hash.expires < time() %} + {{ hash.expires|ago }} ago + {% else %} + {{ hash.expires|until }} + {% endif %} {% else %} - diff --git a/templates/mod/debug/recent_posts.html b/templates/mod/debug/recent_posts.html index b84d24ab..e4eb4f3a 100644 --- a/templates/mod/debug/recent_posts.html +++ b/templates/mod/debug/recent_posts.html @@ -1,3 +1,40 @@ +

+ Flood prevention cache: +

+ + + + + + + + + {% for post in flood_posts %} + + + + + + + + {% endfor %} +
#TimeBoardPost hashFile hash
{{ post.id }} + {{ post.time | ago }} ago + + + {{ config.board_abbreviation|sprintf(post.board) }} + + {{ post.posthash }} + {% if post.filehash %} + {{ post.filehash }} + {% else %} + No file + {% endif %} +
+ +

+ Most recent {{ posts|count }} posts: +

@@ -12,11 +49,13 @@ {% for post in posts %} -
Time
+ {{ post.time | ago }} ago - {{ config.board_abbreviation|sprintf(post.board) }} + + {{ config.board_abbreviation|sprintf(post.board) }} + {% if post.thread %} -- cgit v1.3