Browse Source

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

pull/40/head
Matthieu 8 years ago
committed by czaks
parent
commit
d2de4419bd
  1. 3
      inc/config.php
  2. 4
      templates/post/name.html

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

4
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 %}

Loading…
Cancel
Save