Added: config option to hide email in post. (prevent emailfag but let the possibility to sage and noko)

This commit is contained in:
Matthieu 2016-01-14 21:05:24 +01:00 committed by czaks
parent 844b262166
commit d2de4419bd
2 changed files with 5 additions and 2 deletions

View File

@ -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;

View File

@ -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 #}
<a class="email" href="mailto:{{ post.email }}">
{% endif %}
@ -7,7 +7,7 @@
{% if post.trip|length > 0 %}
<span {% if capcode.trip %}style="{{ capcode.trip }}" {% endif %}class="trip">{{ post.trip }}</span>
{% 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 #}
</a>
{% endif %}