From 3471f7c6684b12b63626af33ae408fd13544cae9 Mon Sep 17 00:00:00 2001
From: Michael Foster
Date: Wed, 18 Sep 2013 08:47:34 +1000
Subject: Optionally show post user was banned for
---
templates/banned.html | 7 +++++++
1 file changed, 7 insertions(+)
(limited to 'templates')
diff --git a/templates/banned.html b/templates/banned.html
index 065d61e2..55dbffe0 100644
--- a/templates/banned.html
+++ b/templates/banned.html
@@ -77,6 +77,13 @@
{% trans %}Your IP address is{% endtrans %} {{ ban.ip }}.
+ {% if post %}
+
+ You were banned for the following post:
+ {{ post }}
+
+ {% endif %}
+
{% if config.ban_page_extra %}
{{ config.ban_page_extra }}
{% endif %}
--
cgit v1.3
From 57e4292e9de44682d128e96397397d72b7bd3ede Mon Sep 17 00:00:00 2001
From: Michael Foster
Date: Wed, 18 Sep 2013 08:56:04 +1000
Subject: Improvements to showing post in ban
---
inc/functions.php | 10 ++++++++--
templates/banned.html | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
(limited to 'templates')
diff --git a/inc/functions.php b/inc/functions.php
index bc159e88..cfde4640 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -634,7 +634,12 @@ function displayBan($ban) {
$ban['post']['file'] = 'deleted';
$ban['post']['thumb'] = false;
}
- $post = new Post($ban['post']);
+
+ if ($ban['post']['thread']) {
+ $post = new Post($ban['post']);
+ } else {
+ $post = new Thread($ban['post'], null, false, false);
+ }
}
// Show banned page and exit
die(
@@ -645,7 +650,8 @@ function displayBan($ban) {
'body' => Element('banned.html', array(
'config' => $config,
'ban' => $ban,
- 'post' => isset($post) ? $post->build() : false
+ 'board' => $board,
+ 'post' => isset($post) ? $post->build(true) : false
)
))
));
diff --git a/templates/banned.html b/templates/banned.html
index 55dbffe0..79648156 100644
--- a/templates/banned.html
+++ b/templates/banned.html
@@ -79,7 +79,7 @@
{% if post %}
- You were banned for the following post:
+ You were banned for the following post on {{ board.url }}:
{{ post }}
{% endif %}
--
cgit v1.3