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 %} +