From d2de4419bddbb7b0e09ced1f01d3ccb45aecc50f Mon Sep 17 00:00:00 2001 From: Matthieu Date: Thu, 14 Jan 2016 21:05:24 +0100 Subject: [PATCH] Added: config option to hide email in post. (prevent emailfag but let the possibility to sage and noko) --- inc/config.php | 3 +++ templates/post/name.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/config.php b/inc/config.php index 69b4bd3a..d5bdbfe5 100644 --- a/inc/config.php +++ b/inc/config.php @@ -550,6 +550,9 @@ // When true, the sage won't be displayed $config['hide_sage'] = false; + // Don't display user's email when it's not "sage" + $config['hide_email'] = false; + // Attach country flags to posts. $config['country_flags'] = false; diff --git a/templates/post/name.html b/templates/post/name.html index 13c676c7..e7f85f8b 100644 --- a/templates/post/name.html +++ b/templates/post/name.html @@ -1,5 +1,5 @@ {% set capcode = post.capcode|capcode %} -{% if post.email|length > 0 and (config.hide_sage!=true or post.email!='sage') %} +{% if post.email|length > 0 and (config.hide_sage!=true or post.email!='sage') and config.hide_email!=true %} {# start email #} {% endif %} @@ -7,7 +7,7 @@ {% if post.trip|length > 0 %} {{ post.trip }} {% endif %} -{% if post.email|length > 0 %} +{% if post.email|length > 0 and (config.hide_sage!=true or post.email!='sage') and config.hide_email!=true %} {# end email #} {% endif %}