mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-25 22:48:00 +01:00
fileboard/8chan: anal filenames, webms for op
This commit is contained in:
parent
e4ed7434f4
commit
7241d6e65b
@ -452,6 +452,11 @@ FLAGS;
|
||||
|
||||
if (isset ($_POST['allowed_ext_op'])) {
|
||||
$file_board .= "\$config['allowed_ext_op'] = \$config['allowed_ext_files'];\n";
|
||||
|
||||
if (isset ($_POST['allowed_ext_op_video'])) {
|
||||
$file_board .= "\$config['allowed_ext_op'][] = 'webm';
|
||||
\$config['allowed_ext_op'][] = 'mp4';\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (isset ($_POST['tag_id'])) {
|
||||
@ -470,6 +475,8 @@ FLAGS;
|
||||
}
|
||||
}
|
||||
|
||||
$anal_filenames = ($imgboard || $fileboard) && isset($_POST['anal_filenames']) ? "\$config['filename_func'] = 'filename_func';\n" : '';
|
||||
|
||||
$anonymous = base64_encode($_POST['anonymous']);
|
||||
$blotter = base64_encode(purify_html(html_entity_decode($_POST['blotter'])));
|
||||
$add_to_config = @file_get_contents($b.'/extra_config.php');
|
||||
@ -586,6 +593,7 @@ if (\$config['disable_images'])
|
||||
\$config['max_pages'] = 10000;
|
||||
|
||||
$locale
|
||||
$anal_filenames
|
||||
$file_board
|
||||
$add_to_config
|
||||
EOT;
|
||||
|
@ -22,3 +22,9 @@ function max_posts_per_hour($post) {
|
||||
function page_404() {
|
||||
include('404.php');
|
||||
}
|
||||
|
||||
function filename_func($a) {
|
||||
$f = basename($a['filename'], '.'.$a['extension']);
|
||||
$f = str_replace(array("\0", "\n", "<", ">", "/", "&"), array("?", "?", "«", "»", "⁄", "and"), $f);
|
||||
return $f;
|
||||
}
|
||||
|
@ -73,8 +73,9 @@
|
||||
<label><input type='checkbox' name='allowed_type[]' value='{{ type }}' {% if type in config.allowed_ext_files %}checked{% endif %}>{{ type }}</label>
|
||||
{% endfor %}
|
||||
</td></tr>
|
||||
<tr class='fileboard'><th>{% trans %}Disable OP image upload{% endtrans %}</th><td><input type="checkbox" name="allowed_ext_op" {% if config.allowed_ext_op %}checked{% endif %}></td></tr>
|
||||
<tr class='fileboard'>
|
||||
<tr class='fileboard'><th>{% trans %}Disable OP image upload{% endtrans %}</th><td><input type="checkbox" name="allowed_ext_op" {% if config.allowed_ext_op %}checked{% endif %}>
|
||||
<label> (<input type="checkbox" name="allowed_ext_op_video" {% if config.allowed_ext_op and 'webm' in config.allowed_ext_op %}checked{% endif %}> also allow video upload)</label></td></tr>
|
||||
<tr class='fileboard imgboard'><th>{% trans %}Keep original filename{% endtrans %}</th><td><input type="checkbox" name="anal_filenames" {% if config.filename_func == 'filename_func' %}checked{% endif %}></td></tr>
|
||||
</tr>
|
||||
<tr><th>{% trans %}Max images per post{% endtrans %}</th><td><select name="max_images">{% for i in 1..5 %}<option value="{{ i }}" {% if config.max_images == i %} selected {% endif %}>{{ i }}</option>{% endfor %}</select></td></tr>
|
||||
</table>
|
||||
|
Loading…
x
Reference in New Issue
Block a user