From a25b5320ea8f4f0b68d5512a15b6c8d71ec7ee73 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 1 Nov 2014 16:00:39 -0700 Subject: [PATCH 1/4] Enable comment toolbar --- inc/instance-config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/instance-config.php b/inc/instance-config.php index da71d072..8a8232e7 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -132,6 +132,7 @@ $config['additional_javascript'][] = 'js/thread-watcher.js'; $config['additional_javascript'][] = 'js/ajax.js'; $config['additional_javascript'][] = 'js/show-own-posts.js'; + $config['additional_javascript'][] = 'js/comment-toolbar.js'; //$config['font_awesome_css'] = '/netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css'; From ff984694d43054a2568179a36c9c8e75c4599f27 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 1 Nov 2014 16:00:48 -0700 Subject: [PATCH 2/4] Revert breaking change --- js/auto-reload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/auto-reload.js b/js/auto-reload.js index 6935409e..47063984 100644 --- a/js/auto-reload.js +++ b/js/auto-reload.js @@ -158,7 +158,7 @@ $(document).ready(function(){ first_new_post = this; makeIcon(); } - $('div.thread').append($('
')).after(this); + $(this).insertAfter($('div.post:last').next()).after('
'); new_posts++; loaded_posts++; $(document).trigger('new_post', this); From 52602f8b9fa8f75647dc37340370c02a4d06fcbb Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 1 Nov 2014 16:01:05 -0700 Subject: [PATCH 3/4] PDF uploading --- templates/mod/settings.html | 1 + 1 file changed, 1 insertion(+) 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 %} From 364c1bc93b0c08105cb20d8d45afdd3474f91b72 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 1 Nov 2014 16:01:22 -0700 Subject: [PATCH 4/4] PDF uploading --- inc/8chan-mod-pages.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = <<