From 13c75110b997697f63f11b8ed873f8981f04d19d Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 20 Dec 2014 07:00:26 -0800 Subject: [PATCH 1/8] Fix board removal on 404, splice not pop @bui --- 404.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/404.php b/404.php index cee2ece6..b28dbd25 100644 --- a/404.php +++ b/404.php @@ -37,7 +37,7 @@ $page = << Date: Sat, 20 Dec 2014 07:00:43 -0800 Subject: [PATCH 2/8] Obscenity.html link in FAQ --- faq.php | 1 + 1 file changed, 1 insertion(+) diff --git a/faq.php b/faq.php index 6803b8d5..6261af42 100644 --- a/faq.php +++ b/faq.php @@ -26,6 +26,7 @@ $body = <<Do not post, request, or link to any content illegal in the United States of America. Do not create boards with the sole purpose of posting or spreading such content.

Other than that, you are free to institute whatever rules you want on your board.

+

More information about US obscenity laws and how they relate to 8chan boards

How do I add more volunteers?

You may do this in your board settings, click on "Edit board volunteers".

How do I manage my board?

From 5b5a0b9061bc15ab866b60ee11736ddd4df83e98 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 20 Dec 2014 07:01:25 -0800 Subject: [PATCH 3/8] Force subject OP --- inc/8chan-mod-pages.php | 2 ++ templates/mod/settings.html | 1 + 2 files changed, 3 insertions(+) diff --git a/inc/8chan-mod-pages.php b/inc/8chan-mod-pages.php index 33a6e752..0fe9255f 100644 --- a/inc/8chan-mod-pages.php +++ b/inc/8chan-mod-pages.php @@ -405,6 +405,7 @@ FLAGS; $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\';' : ''; $user_flags = isset($_POST['user_flags']) ? "if (file_exists('$b/flags.php')) { include 'flags.php'; }\n" : ''; $captcha = isset($_POST['captcha']) ? 'true' : 'false'; + $force_subject_op = isset($_POST['force_subject_op']) ? 'true' : 'false'; $oekaki_js = <<{% trans %}Forced anonymous{% endtrans %} {% trans %}YouTube/Voocaroo embedding{% endtrans %} {% trans %}Require image for OP{% endtrans %} + {% trans %}Require subject for OP{% endtrans %} {% trans %}Disable images{% endtrans %} {% trans %}Poster ID's{% endtrans %} {% trans %}Display SAGE! after saged posts{% endtrans %} From 025713547c1406af16452a267baf275b56055215 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 20 Dec 2014 07:01:40 -0800 Subject: [PATCH 4/8] Tweak flag size requirements --- inc/8chan-mod-pages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/8chan-mod-pages.php b/inc/8chan-mod-pages.php index 0fe9255f..aa9bc376 100644 --- a/inc/8chan-mod-pages.php +++ b/inc/8chan-mod-pages.php @@ -262,7 +262,7 @@ error($config['error']['invalidimg']); } - if ($size[0] > 20 or $size[0] < 11 or $size[1] != 11){ + if ($size[0] > 20 or $size[0] < 11 or $size[1] > 16 or $size[1] < 11){ error(_('Image wrong size!')); } if (sizeof($banners) > 256) { From e843f81f3cfa94852a61665881aafcf798ee1436 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 20 Dec 2014 07:02:00 -0800 Subject: [PATCH 5/8] Customize embed sizes --- js/youtube.js | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/js/youtube.js b/js/youtube.js index c4ef77fb..b40bbb66 100644 --- a/js/youtube.js +++ b/js/youtube.js @@ -23,11 +23,39 @@ */ -onready(function(){ +$(document).ready(function(){ + if (window.Options && Options.get_tab('general')) { + Options.extend_tab("general", "" + _('YouTube size') + ": x"); + + if (typeof localStorage.youtube_size === 'undefined') { + localStorage.youtube_size = '{"width":360,"height":270}'; + var our_yt = JSON.parse(localStorage.youtube_size); + } else { + var our_yt = JSON.parse(localStorage.youtube_size); + $('#youtube-height').val(our_yt.height); + $('#youtube-width').val(our_yt.width); + } + + + $('#youtube-width, #youtube-height').on('change', function() { + if ($(this).attr('id') === 'youtube-height') { + our_yt.height = $(this).val(); + } else { + our_yt.width = $(this).val(); + } + + localStorage.youtube_size = JSON.stringify(our_yt); + }); + } + var do_embed_yt = function(tag) { + if (typeof our_yt === "undefined") { + our_yt = {"width":360,"height":270}; + } + $('div.video-container a', tag).click(function() { $(this.parentNode).html('