diff --git a/inc/8chan-mod-pages.php b/inc/8chan-mod-pages.php index ca4188f1..5f0e68dc 100644 --- a/inc/8chan-mod-pages.php +++ b/inc/8chan-mod-pages.php @@ -258,6 +258,9 @@ if (!in_array($b, $mod['boards']) and $mod['boards'][0] != '*') error($config['error']['noaccess']); + + if (!hasPermission($config['mod']['edit_settings'], $b)) + error($config['error']['noaccess']); if (!openBoard($b)) error("Could not open board!"); @@ -279,6 +282,7 @@ $image_reject_repost = isset($_POST['image_reject_repost']) ? 'true' : 'false'; $allow_delete = isset($_POST['allow_delete']) ? 'true' : 'false'; $allow_flash = isset($_POST['allow_flash']) ? '$config[\'allowed_ext_files\'][] = \'swf\';' : ''; + $allow_pdf = isset($_POST['allow_pdf']) ? '$config[\'allowed_ext_files\'][] = \'pdf\';' : ''; $code_tags = isset($_POST['code_tags']) ? '$config[\'additional_javascript\'][] = \'js/code_tags/run_prettify.js\';$config[\'markup\'][] = array("/\[code\](.+?)\[\/code\]/ms", "
\$1
");' : ''; $katex = isset($_POST['katex']) ? '$config[\'katex\'] = true;$config[\'additional_javascript\'][] = \'js/katex/katex.min.js\'; $config[\'markup\'][] = array("/\[tex\](.+?)\[\/tex\]/ms", "\$1"); $config[\'additional_javascript\'][] = \'js/katex-enable.js\';' : ''; $oekaki_js = <<')).after(this); + $(this).insertAfter($('div.post:last').next()).after('
'); new_posts++; loaded_posts++; $(document).trigger('new_post', this); diff --git a/templates/mod/settings.html b/templates/mod/settings.html index 305c650b..01a37dde 100644 --- a/templates/mod/settings.html +++ b/templates/mod/settings.html @@ -39,6 +39,7 @@ {% trans %}Oekaki{% endtrans %} {% trans %}Format math between [tex]{% endtrans %} {% trans %}Allow SWF uploading{% endtrans %} + {% trans %}Allow PDF uploading{% endtrans %} {% trans %}Enable dice rolling{% endtrans %} {% trans %}Don't allow users to repost images{% endtrans %} {% trans %}Allow a poster to delete his own posts{% endtrans %}