diff options
| author | Matthieu <matthieu@localhost.localdomain> | 2016-01-14 21:05:24 +0100 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-01-26 00:50:55 +0100 |
| commit | d2de4419bddbb7b0e09ced1f01d3ccb45aecc50f (patch) | |
| tree | 61c257644e7341a99d8b29795bcdd54f8e5f1aa0 | |
| parent | 844b26216614d953ee8521838f1030ad59d735ec (diff) | |
Added: config option to hide email in post. (prevent emailfag but let the possibility to sage and noko)
| -rw-r--r-- | inc/config.php | 3 | ||||
| -rw-r--r-- | 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 #} <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 %} |
