Ability to disable certain superfluous fields. ("Forced anonymous")
This commit is contained in:
parent
cc8d465297
commit
a83d584255
@ -321,6 +321,16 @@
|
|||||||
// Optional spoiler images
|
// Optional spoiler images
|
||||||
$config['spoiler_images'] = false;
|
$config['spoiler_images'] = false;
|
||||||
|
|
||||||
|
|
||||||
|
// With the following, you can disable certain superfluous fields or enable "forced anonymous".
|
||||||
|
|
||||||
|
// When true, all names will be set to $config['anonymous'].
|
||||||
|
$config['field_disable_name'] = false;
|
||||||
|
// When true, no email will be able to be set.
|
||||||
|
$config['field_disable_email'] = false;
|
||||||
|
// When true, a blank password will be used for files (not usable for deletion).
|
||||||
|
$config['field_disable_password'] = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ====================
|
* ====================
|
||||||
* Image settings
|
* Image settings
|
||||||
|
10
post.php
10
post.php
@ -131,6 +131,16 @@
|
|||||||
|
|
||||||
header('Location: ' . $root . $board['dir'] . $config['file_index'], true, $config['redirect_http']);
|
header('Location: ' . $root . $board['dir'] . $config['file_index'], true, $config['redirect_http']);
|
||||||
} elseif(isset($_POST['post'])) {
|
} elseif(isset($_POST['post'])) {
|
||||||
|
|
||||||
|
if($config['field_disable_name'])
|
||||||
|
$_POST['name'] = $config['anonymous']; // "forced anonymous"
|
||||||
|
|
||||||
|
if($config['field_disable_email'])
|
||||||
|
$_POST['email'] = '';
|
||||||
|
|
||||||
|
if($config['field_disable_password'])
|
||||||
|
$_POST['password'] = '';
|
||||||
|
|
||||||
if( !isset($_POST['name']) ||
|
if( !isset($_POST['name']) ||
|
||||||
!isset($_POST['email']) ||
|
!isset($_POST['email']) ||
|
||||||
!isset($_POST['subject']) ||
|
!isset($_POST['subject']) ||
|
||||||
|
@ -4,22 +4,22 @@
|
|||||||
<input type="hidden" name="board" value="{{ board.uri }}" />
|
<input type="hidden" name="board" value="{{ board.uri }}" />
|
||||||
{% if mod %}<input type="hidden" name="mod" value="1" />{% endif %}
|
{% if mod %}<input type="hidden" name="mod" value="1" />{% endif %}
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
{% if not config.field_disable_name %}<tr>
|
||||||
<th>
|
<th>
|
||||||
{% trans %}Name{% endtrans %}
|
{% trans %}Name{% endtrans %}
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="name" size="25" maxlength="50" autocomplete="off" />
|
<input type="text" name="name" size="25" maxlength="50" autocomplete="off" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>{% endif %}
|
||||||
<tr>
|
{% if not config.field_disable_email %}<tr>
|
||||||
<th>
|
<th>
|
||||||
{% trans %}Email{% endtrans %}
|
{% trans %}Email{% endtrans %}
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="email" size="25" maxlength="40" autocomplete="off" />
|
<input type="text" name="email" size="25" maxlength="40" autocomplete="off" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
{% trans %}Subject{% endtrans %}
|
{% trans %}Subject{% endtrans %}
|
||||||
@ -86,7 +86,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<tr>
|
{% if not config.field_disable_password %}<tr>
|
||||||
<th>
|
<th>
|
||||||
{% trans %}Password{% endtrans %}
|
{% trans %}Password{% endtrans %}
|
||||||
</th>
|
</th>
|
||||||
@ -94,7 +94,7 @@
|
|||||||
<input type="password" name="password" size="12" maxlength="18" autocomplete="off" />
|
<input type="password" name="password" size="12" maxlength="18" autocomplete="off" />
|
||||||
<span class="unimportant">{% trans %}(For file deletion.){% endtrans %}</span>
|
<span class="unimportant">{% trans %}(For file deletion.){% endtrans %}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>{% endif %}
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user