1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-01 02:27:24 +01:00

Minimum OP text length in ?/settings

This commit is contained in:
Fredrick Brennan 2015-05-30 15:18:41 +08:00
parent 3f341c4173
commit 4eb29393fd
2 changed files with 14 additions and 1 deletions

View File

@ -671,7 +671,18 @@ FLAGS;
$max_newlines = $mn;
}
} else {
$max_newlines = $mn;
$max_newlines = 0;
}
if (isset($_POST['min_body'])) {
$mb = (int)$_POST['min_body'];
if ($mb < 0 || $mb > 1024) {
$min_body = 0;
} else {
$min_body = $mb;
}
} else {
$min_body = 0;
}
if (!(strlen($title) < 40))
@ -721,6 +732,7 @@ FLAGS;
\$config['max_pages'] = $max_pages;
\$config['max_newlines'] = $max_newlines;
\$config['oekaki'] = $oekaki;
\$config['min_body'] = $min_body;
\$config['mod']['view_bumplock'] = $view_bumplock;
$code_tags $katex $replace $multiimage $allow_flash $allow_pdf $user_flags
$assets

View File

@ -63,6 +63,7 @@
<tr><th>{% trans %}Max number of newlines per post{% endtrans %}</th><td><select name="max_newlines"><option value="0" {% if config.max_newlines == 0 %}selected{% endif %}>unlimited</option>{% for i in range(20, 300) %}<option value="{{ i }}" {% if config.max_newlines == i %}selected{% endif %}>{{ i }}</option>{% endfor %}</select></td></tr>
<tr><th>{% trans %}Page count{% endtrans %}</th><td><select name="max_pages">{% for i in range(1, 25) %}<option value="{{ i }}" {% if config.max_pages == i %}selected{% endif %}>{{ i }}</option>{% endfor %}</select></td></tr>
<tr><th>{% trans %}Bump limit{% endtrans %}</th><td><select name="reply_limit">{% for i in range(250, 750, 25) %}<option value="{{ i }}" {% if config.reply_limit == i %}selected{% endif %}>{{ i }}</option>{% endfor %}</select></td></tr>
<tr><th>{% trans %}Minimum OP text length{% endtrans %} <span class="unimportant">(integer between 0 and 1024)</span></th><td><input type="text" name="min_body" size="4" value={{ config.min_body }}></td></tr>
<tr><th>{% trans %}Language{% endtrans %}<br/><span class="unimportant">{% trans %}Read this page for more information about contributing translations:<br><a href="/translation.html">Translation tutorial</a> or use <a href="https://www.transifex.com/projects/p/infinity/">Transifex</a>{% endtrans %}</span></th><td>
<select name="locale">
<option value="en" {% if "en" == config.locale %}selected{% endif %}>en</option>