diff --git a/inc/config.php b/inc/config.php index f4951a40..c657cd82 100644 --- a/inc/config.php +++ b/inc/config.php @@ -227,6 +227,8 @@ 'embed', 'recaptcha_challenge_field', 'recaptcha_response_field', + 'imgcaptcha_hash', + 'imgcaptcha_verify', 'spoiler', 'quick-reply' ); diff --git a/js/imgcaptcha.js b/js/imgcaptcha.js new file mode 100644 index 00000000..dd313fad --- /dev/null +++ b/js/imgcaptcha.js @@ -0,0 +1,16 @@ +//function obecnyCzas() { +// return Math.round(new Date().getTime() / 1000); +//} + +function imgcaptcha_odswiezKapcze() { + $.get("/inc/imgcaptcha_p.php", function(data) { + $("#imgcaptcha_hash").val(data); + $("#imgcaptcha_img").prop("src","/inc/imgcaptcha_im.php?cr=" + data); + }); +} +//function resetujKapcze() { +// $("#imgcaptcha_img").prop("src","/zakrytek.png"); +//} +//$(document).ready(function(){ +// //resetujKapcze(); - to nie powinno byc na razie potrzebne +//}); diff --git a/templates/post_form.html b/templates/post_form.html index 8b7350c7..af8b22a7 100644 --- a/templates/post_form.html +++ b/templates/post_form.html @@ -58,6 +58,21 @@ {% endif %} + {% if config.imgcaptcha %} + + + {% trans %}Verification{% endtrans %} + {{ antibot.html() }} + + + +
+ {% config.imgcaptcha_question %}
+ Odswiez + {{ antibot.html() }} + + + {% endif %} {% trans %}File{% endtrans %} diff --git a/templates/post_form.html~ b/templates/post_form.html~ new file mode 100644 index 00000000..a77b9872 --- /dev/null +++ b/templates/post_form.html~ @@ -0,0 +1,136 @@ +
+{{ antibot.html() }} +{% if id %}{% endif %} +{{ antibot.html() }} + +{{ antibot.html() }} +{% if mod %}{% endif %} + + {% if not config.field_disable_name or (mod and post.mod|hasPermission(config.mod.bypass_field_disable, board.uri)) %} + + + {% endif %} + {% if not config.field_disable_email or (mod and post.mod|hasPermission(config.mod.bypass_field_disable, board.uri)) %} + + + {% endif %} + + + + + + + + + {% if config.recaptcha %} + + + + + {% endif %} + {% if config.imgcaptcha %} + + + + + {% endif %} + + + + + {% if config.enable_embedding %} + + + + + {% endif %} + {% if mod %} + + + + + {% endif %} + {% if not config.field_disable_password or (mod and post.mod|hasPermission(config.mod.bypass_field_disable, board.uri)) %} + + + {% endif %} +
+ {% trans %}Name{% endtrans %} + {{ antibot.html() }} + + + {{ antibot.html() }} +
+ {% trans %}Email{% endtrans %} + {{ antibot.html() }} + + + {{ antibot.html() }} +
+ {% trans %}Subject{% endtrans %} + {{ antibot.html() }} + + + {% if config.spoiler_images %} {% endif %} +
+ {% trans %}Comment{% endtrans %} + {{ antibot.html() }} + + + {{ antibot.html() }} +
+ {% trans %}Verification{% endtrans %} + {{ antibot.html() }} + + + {{ antibot.html() }} +
+ {% trans %}Verification{% endtrans %} + {{ antibot.html() }} + + +
+ {% config.imgcaptcha_question %}
+ Odswiez + {{ antibot.html() }} +
+ {% trans %}File{% endtrans %} + + + {{ antibot.html() }} +
+ {% trans %}Embed{% endtrans %} + {{ antibot.html() }} + + + {{ antibot.html() }} +
+ {% trans %}Flags{% endtrans %} + + {% if not id and post.mod|hasPermission(config.mod.sticky, board.uri) %}
+ +
+
{% endif %} + {% if not id and post.mod|hasPermission(config.mod.lock, board.uri) %}
+
+ +
{% endif %} + {% if post.mod|hasPermission(config.mod.rawhtml, board.uri) %}
+
+ +
{% endif %} +
+ {% trans %}Password{% endtrans %} + {{ antibot.html() }} + + + {% trans %}(For file deletion.){% endtrans %} + {{ antibot.html() }} +
+{{ antibot.html(true) }} + +
+ +